@@ -133,6 +133,44 @@ public Apache.Arrow.Types.ArrowTypeId BinaryType
133133 }
134134 }
135135
136+ /// <summary>
137+ /// The Arrow list type to read Parquet list columns as.
138+ ///
139+ /// Allowed values are ArrowTypeId.List, ArrowTypeId.LargeList and ArrowTypeId.ListView.
140+ /// Default is ArrowTypeId.List.
141+ ///
142+ /// If a serialized Arrow schema is found in the Parquet metadata,
143+ /// this setting is ignored and the Arrow schema takes precedence
144+ /// </summary>
145+ public Apache . Arrow . Types . ArrowTypeId ListType
146+ {
147+ get
148+ {
149+ ParquetSharp . CppTypeId value = ExceptionInfo . Return < ParquetSharp . CppTypeId > ( Handle , ArrowReaderProperties_ListType ) ;
150+ return value . toPublicEnum ( ) ;
151+ }
152+ set
153+ {
154+ ParquetSharp . CppTypeId cppValue = value . toCppEnum ( ) ;
155+ ExceptionInfo . Check ( ArrowReaderProperties_SetListType ( Handle . IntPtr , cppValue ) ) ;
156+ GC . KeepAlive ( Handle ) ;
157+ }
158+ }
159+
160+ /// <summary>
161+ /// Whether to enable Parquet-supported Arrow extension types.
162+ /// Default is false.
163+ /// </summary>
164+ public bool ArrowExtensionEnabled
165+ {
166+ get => ExceptionInfo . Return < bool > ( Handle , ArrowReaderProperties_GetArrowExtensionEnabled ) ;
167+ set
168+ {
169+ ExceptionInfo . Check ( ArrowReaderProperties_SetArrowExtensionEnabled ( Handle . IntPtr , value ) ) ;
170+ GC . KeepAlive ( Handle ) ;
171+ }
172+ }
173+
136174 [ DllImport ( ParquetDll . Name ) ]
137175 private static extern IntPtr ArrowReaderProperties_GetDefault ( out IntPtr readerProperties ) ;
138176
@@ -175,6 +213,18 @@ public Apache.Arrow.Types.ArrowTypeId BinaryType
175213 [ DllImport ( ParquetDll . Name ) ]
176214 private static extern IntPtr ArrowReaderProperties_SetBinaryType ( IntPtr readerProperties , ParquetSharp . CppTypeId value ) ;
177215
216+ [ DllImport ( ParquetDll . Name ) ]
217+ private static extern IntPtr ArrowReaderProperties_ListType ( IntPtr readerProperties , out ParquetSharp . CppTypeId value ) ;
218+
219+ [ DllImport ( ParquetDll . Name ) ]
220+ private static extern IntPtr ArrowReaderProperties_SetListType ( IntPtr readerProperties , ParquetSharp . CppTypeId value ) ;
221+
222+ [ DllImport ( ParquetDll . Name ) ]
223+ private static extern IntPtr ArrowReaderProperties_GetArrowExtensionEnabled ( IntPtr readerProperties , out bool extensionsEnabled ) ;
224+
225+ [ DllImport ( ParquetDll . Name ) ]
226+ private static extern IntPtr ArrowReaderProperties_SetArrowExtensionEnabled ( IntPtr readerProperties , bool extensionsEnabled ) ;
227+
178228 internal readonly ParquetHandle Handle ;
179229 }
180230}
0 commit comments