forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibarrow.pxd
More file actions
3270 lines (2548 loc) · 118 KB
/
libarrow.pxd
File metadata and controls
3270 lines (2548 loc) · 118 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# distutils: language = c++
from pyarrow.includes.common cimport *
cdef extern from "arrow/util/key_value_metadata.h" namespace "arrow" nogil:
cdef cppclass CKeyValueMetadata" arrow::KeyValueMetadata":
CKeyValueMetadata()
CKeyValueMetadata(const unordered_map[c_string, c_string]&)
CKeyValueMetadata(const vector[c_string]& keys,
const vector[c_string]& values)
void reserve(int64_t n)
int64_t size() const
c_string key(int64_t i) const
c_string value(int64_t i) const
int FindKey(const c_string& key) const
shared_ptr[CKeyValueMetadata] Copy() const
c_bool Equals(const CKeyValueMetadata& other)
void Append(const c_string& key, const c_string& value)
void ToUnorderedMap(unordered_map[c_string, c_string]*) const
c_string ToString() const
CResult[c_string] Get(const c_string& key) const
CStatus Delete(const c_string& key)
CStatus Set(const c_string& key, const c_string& value)
c_bool Contains(const c_string& key) const
cdef extern from "arrow/util/decimal.h" namespace "arrow" nogil:
cdef cppclass CDecimal32" arrow::Decimal32":
c_string ToString(int32_t scale) const
cdef extern from "arrow/util/decimal.h" namespace "arrow" nogil:
cdef cppclass CDecimal64" arrow::Decimal64":
c_string ToString(int32_t scale) const
cdef extern from "arrow/util/decimal.h" namespace "arrow" nogil:
cdef cppclass CDecimal128" arrow::Decimal128":
c_string ToString(int32_t scale) const
cdef extern from "arrow/util/decimal.h" namespace "arrow" nogil:
cdef cppclass CDecimal256" arrow::Decimal256":
c_string ToString(int32_t scale) const
cdef extern from "arrow/config.h" namespace "arrow" nogil:
cdef cppclass CCppBuildInfo "arrow::BuildInfo":
int version
int version_major
int version_minor
int version_patch
c_string version_string
c_string so_version
c_string full_so_version
c_string compiler_id
c_string compiler_version
c_string compiler_flags
c_string git_id
c_string git_description
c_string package_kind
c_string build_type
const CCppBuildInfo& GetCppBuildInfo "arrow::GetBuildInfo"()
cdef cppclass CRuntimeInfo" arrow::RuntimeInfo":
c_string simd_level
c_string detected_simd_level
CRuntimeInfo GetRuntimeInfo()
cdef cppclass CGlobalOptions" arrow::GlobalOptions":
optional[c_string] timezone_db_path
CStatus Initialize(const CGlobalOptions& options)
cdef extern from "arrow/util/future.h" namespace "arrow" nogil:
cdef cppclass CFuture_Void" arrow::Future<>":
CStatus status()
cdef extern from "<variant>" namespace "std" nogil:
cdef cppclass CArrayStatisticsCountType" std::variant<int64_t, double>":
CArrayStatisticsCountType()
CArrayStatisticsCountType(int64_t)
CArrayStatisticsCountType(double)
cdef cppclass CArrayStatisticsValueType" std::variant<bool, int64_t, uint64_t, double, std::string>":
CArrayStatisticsValueType()
CArrayStatisticsValueType(c_bool)
CArrayStatisticsValueType(int64_t)
CArrayStatisticsValueType(uint64_t)
CArrayStatisticsValueType(double)
CArrayStatisticsValueType(c_string)
cdef extern from "arrow/api.h" namespace "arrow" nogil:
cdef enum Type" arrow::Type::type":
_Type_NA" arrow::Type::NA"
_Type_BOOL" arrow::Type::BOOL"
_Type_UINT8" arrow::Type::UINT8"
_Type_INT8" arrow::Type::INT8"
_Type_UINT16" arrow::Type::UINT16"
_Type_INT16" arrow::Type::INT16"
_Type_UINT32" arrow::Type::UINT32"
_Type_INT32" arrow::Type::INT32"
_Type_UINT64" arrow::Type::UINT64"
_Type_INT64" arrow::Type::INT64"
_Type_HALF_FLOAT" arrow::Type::HALF_FLOAT"
_Type_FLOAT" arrow::Type::FLOAT"
_Type_DOUBLE" arrow::Type::DOUBLE"
_Type_DECIMAL32" arrow::Type::DECIMAL32"
_Type_DECIMAL64" arrow::Type::DECIMAL64"
_Type_DECIMAL128" arrow::Type::DECIMAL128"
_Type_DECIMAL256" arrow::Type::DECIMAL256"
_Type_DATE32" arrow::Type::DATE32"
_Type_DATE64" arrow::Type::DATE64"
_Type_TIMESTAMP" arrow::Type::TIMESTAMP"
_Type_TIME32" arrow::Type::TIME32"
_Type_TIME64" arrow::Type::TIME64"
_Type_DURATION" arrow::Type::DURATION"
_Type_INTERVAL_MONTH_DAY_NANO" arrow::Type::INTERVAL_MONTH_DAY_NANO"
_Type_INTERVAL_DAY_TIME" arrow::Type::INTERVAL_DAY_TIME"
_Type_INTERVAL_MONTHS" arrow::Type::INTERVAL_MONTHS"
_Type_BINARY" arrow::Type::BINARY"
_Type_STRING" arrow::Type::STRING"
_Type_LARGE_BINARY" arrow::Type::LARGE_BINARY"
_Type_LARGE_STRING" arrow::Type::LARGE_STRING"
_Type_FIXED_SIZE_BINARY" arrow::Type::FIXED_SIZE_BINARY"
_Type_BINARY_VIEW" arrow::Type::BINARY_VIEW"
_Type_STRING_VIEW" arrow::Type::STRING_VIEW"
_Type_LIST" arrow::Type::LIST"
_Type_LARGE_LIST" arrow::Type::LARGE_LIST"
_Type_FIXED_SIZE_LIST" arrow::Type::FIXED_SIZE_LIST"
_Type_LIST_VIEW" arrow::Type::LIST_VIEW"
_Type_LARGE_LIST_VIEW" arrow::Type::LARGE_LIST_VIEW"
_Type_STRUCT" arrow::Type::STRUCT"
_Type_SPARSE_UNION" arrow::Type::SPARSE_UNION"
_Type_DENSE_UNION" arrow::Type::DENSE_UNION"
_Type_DICTIONARY" arrow::Type::DICTIONARY"
_Type_RUN_END_ENCODED" arrow::Type::RUN_END_ENCODED"
_Type_MAP" arrow::Type::MAP"
_Type_EXTENSION" arrow::Type::EXTENSION"
cdef enum UnionMode" arrow::UnionMode::type":
_UnionMode_SPARSE" arrow::UnionMode::SPARSE"
_UnionMode_DENSE" arrow::UnionMode::DENSE"
cdef enum TimeUnit" arrow::TimeUnit::type":
TimeUnit_SECOND" arrow::TimeUnit::SECOND"
TimeUnit_MILLI" arrow::TimeUnit::MILLI"
TimeUnit_MICRO" arrow::TimeUnit::MICRO"
TimeUnit_NANO" arrow::TimeUnit::NANO"
cdef cppclass CBufferSpec" arrow::DataTypeLayout::BufferSpec":
pass
cdef cppclass CDataTypeLayout" arrow::DataTypeLayout":
vector[CBufferSpec] buffers
optional[CBufferSpec] variadic_spec
c_bool has_dictionary
cdef cppclass CDataType" arrow::DataType":
Type id()
c_bool Equals(const CDataType& other, c_bool check_metadata)
c_bool Equals(const shared_ptr[CDataType]& other, c_bool check_metadata)
shared_ptr[CField] field(int i)
const vector[shared_ptr[CField]] fields()
int num_fields()
CDataTypeLayout layout()
c_string ToString()
c_bool is_primitive(Type type)
c_bool is_numeric(Type type)
cdef cppclass CArrayStatistics" arrow::ArrayStatistics":
optional[CArrayStatisticsCountType] null_count
optional[CArrayStatisticsCountType] distinct_count
optional[CArrayStatisticsValueType] min
c_bool is_min_exact
optional[CArrayStatisticsValueType] max
c_bool is_max_exact
c_bool Equals(const CArrayStatistics& statistics) const
cdef cppclass CArrayData" arrow::ArrayData":
shared_ptr[CDataType] type
int64_t length
int64_t null_count
int64_t offset
vector[shared_ptr[CBuffer]] buffers
vector[shared_ptr[CArrayData]] child_data
shared_ptr[CArrayData] dictionary
@staticmethod
shared_ptr[CArrayData] Make(const shared_ptr[CDataType]& type,
int64_t length,
vector[shared_ptr[CBuffer]]& buffers,
int64_t null_count,
int64_t offset)
@staticmethod
shared_ptr[CArrayData] MakeWithChildren" Make"(
const shared_ptr[CDataType]& type,
int64_t length,
vector[shared_ptr[CBuffer]]& buffers,
vector[shared_ptr[CArrayData]]& child_data,
int64_t null_count,
int64_t offset)
@staticmethod
shared_ptr[CArrayData] MakeWithChildrenAndDictionary" Make"(
const shared_ptr[CDataType]& type,
int64_t length,
vector[shared_ptr[CBuffer]]& buffers,
vector[shared_ptr[CArrayData]]& child_data,
shared_ptr[CArrayData]& dictionary,
int64_t null_count,
int64_t offset)
cdef cppclass CArray" arrow::Array":
shared_ptr[CDataType] type()
int64_t length()
int64_t null_count()
int64_t offset()
Type type_id()
int num_fields()
CResult[shared_ptr[CScalar]] GetScalar(int64_t i) const
c_string Diff(const CArray& other)
c_bool Equals(const CArray& arr)
c_bool IsNull(int i)
shared_ptr[CArrayData] data()
shared_ptr[CArray] Slice(int64_t offset)
shared_ptr[CArray] Slice(int64_t offset, int64_t length)
CStatus Validate() const
CStatus ValidateFull() const
CResult[shared_ptr[CArray]] View(const shared_ptr[CDataType]& type)
CDeviceAllocationType device_type()
CResult[shared_ptr[CArray]] CopyTo(const shared_ptr[CMemoryManager]& to) const
const shared_ptr[CArrayStatistics]& statistics() const
shared_ptr[CArray] MakeArray(const shared_ptr[CArrayData]& data)
CResult[shared_ptr[CArray]] MakeArrayOfNull(
const shared_ptr[CDataType]& type, int64_t length, CMemoryPool* pool)
CResult[shared_ptr[CArray]] MakeArrayFromScalar(
const CScalar& scalar, int64_t length, CMemoryPool* pool)
CStatus DebugPrint(const CArray& arr, int indent)
cdef cppclass CFixedWidthType" arrow::FixedWidthType"(CDataType):
int bit_width()
int byte_width()
cdef cppclass CNullArray" arrow::NullArray"(CArray):
CNullArray(int64_t length)
cdef cppclass CDictionaryArray" arrow::DictionaryArray"(CArray):
CDictionaryArray(const shared_ptr[CDataType]& type,
const shared_ptr[CArray]& indices,
const shared_ptr[CArray]& dictionary)
CDictionaryArray(const shared_ptr[CArrayData]& data)
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const shared_ptr[CDataType]& type,
const shared_ptr[CArray]& indices,
const shared_ptr[CArray]& dictionary)
shared_ptr[CArray] indices()
shared_ptr[CArray] dictionary()
cdef cppclass CDate32Type" arrow::Date32Type"(CFixedWidthType):
pass
cdef cppclass CDate64Type" arrow::Date64Type"(CFixedWidthType):
pass
cdef cppclass CTimestampType" arrow::TimestampType"(CFixedWidthType):
CTimestampType(TimeUnit unit)
TimeUnit unit()
const c_string& timezone()
cdef cppclass CTime32Type" arrow::Time32Type"(CFixedWidthType):
TimeUnit unit()
cdef cppclass CTime64Type" arrow::Time64Type"(CFixedWidthType):
TimeUnit unit()
shared_ptr[CDataType] ctime32" arrow::time32"(TimeUnit unit)
shared_ptr[CDataType] ctime64" arrow::time64"(TimeUnit unit)
cdef cppclass CDurationType" arrow::DurationType"(CFixedWidthType):
TimeUnit unit()
shared_ptr[CDataType] cduration" arrow::duration"(TimeUnit unit)
cdef cppclass CDictionaryType" arrow::DictionaryType"(CFixedWidthType):
CDictionaryType(const shared_ptr[CDataType]& index_type,
const shared_ptr[CDataType]& value_type,
c_bool ordered)
shared_ptr[CDataType] index_type()
shared_ptr[CDataType] value_type()
c_bool ordered()
shared_ptr[CDataType] ctimestamp" arrow::timestamp"(TimeUnit unit)
shared_ptr[CDataType] ctimestamp" arrow::timestamp"(
TimeUnit unit, const c_string& timezone)
cdef cppclass CMemoryPool" arrow::MemoryPool":
int64_t bytes_allocated()
int64_t max_memory()
int64_t total_bytes_allocated()
int64_t num_allocations()
c_string backend_name()
void ReleaseUnused()
void PrintStats()
cdef cppclass CLoggingMemoryPool" arrow::LoggingMemoryPool"(CMemoryPool):
CLoggingMemoryPool(CMemoryPool*)
cdef cppclass CProxyMemoryPool" arrow::ProxyMemoryPool"(CMemoryPool):
CProxyMemoryPool(CMemoryPool*)
ctypedef enum CDeviceAllocationType "arrow::DeviceAllocationType":
CDeviceAllocationType_kCPU "arrow::DeviceAllocationType::kCPU"
CDeviceAllocationType_kCUDA "arrow::DeviceAllocationType::kCUDA"
CDeviceAllocationType_kCUDA_HOST "arrow::DeviceAllocationType::kCUDA_HOST"
CDeviceAllocationType_kOPENCL "arrow::DeviceAllocationType::kOPENCL"
CDeviceAllocationType_kVULKAN "arrow::DeviceAllocationType::kVULKAN"
CDeviceAllocationType_kMETAL "arrow::DeviceAllocationType::kMETAL"
CDeviceAllocationType_kVPI "arrow::DeviceAllocationType::kVPI"
CDeviceAllocationType_kROCM "arrow::DeviceAllocationType::kROCM"
CDeviceAllocationType_kROCM_HOST "arrow::DeviceAllocationType::kROCM_HOST"
CDeviceAllocationType_kEXT_DEV "arrow::DeviceAllocationType::kEXT_DEV"
CDeviceAllocationType_kCUDA_MANAGED "arrow::DeviceAllocationType::kCUDA_MANAGED"
CDeviceAllocationType_kONEAPI "arrow::DeviceAllocationType::kONEAPI"
CDeviceAllocationType_kWEBGPU "arrow::DeviceAllocationType::kWEBGPU"
CDeviceAllocationType_kHEXAGON "arrow::DeviceAllocationType::kHEXAGON"
cdef cppclass CDevice" arrow::Device":
const char* type_name()
c_string ToString()
c_bool Equals(const CDevice& other)
int64_t device_id()
c_bool is_cpu() const
shared_ptr[CMemoryManager] default_memory_manager()
CDeviceAllocationType device_type()
cdef cppclass CMemoryManager" arrow::MemoryManager":
const shared_ptr[CDevice] device()
c_bool is_cpu() const
shared_ptr[CMemoryManager] c_default_cpu_memory_manager \
" arrow::default_cpu_memory_manager"()
cdef cppclass CBuffer" arrow::Buffer":
CBuffer(const uint8_t* data, int64_t size)
const uint8_t* data()
uint8_t* mutable_data()
uintptr_t address()
uintptr_t mutable_address()
int64_t size()
shared_ptr[CBuffer] parent()
c_bool is_cpu() const
c_bool is_mutable() const
c_string ToHexString()
c_bool Equals(const CBuffer& other)
shared_ptr[CDevice] device()
const shared_ptr[CMemoryManager] memory_manager()
CDeviceAllocationType device_type()
CResult[shared_ptr[CBuffer]] SliceBufferSafe(
const shared_ptr[CBuffer]& buffer, int64_t offset)
CResult[shared_ptr[CBuffer]] SliceBufferSafe(
const shared_ptr[CBuffer]& buffer, int64_t offset, int64_t length)
cdef cppclass CMutableBuffer" arrow::MutableBuffer"(CBuffer):
CMutableBuffer(const uint8_t* data, int64_t size)
cdef cppclass CResizableBuffer" arrow::ResizableBuffer"(CMutableBuffer):
CStatus Resize(const int64_t new_size, c_bool shrink_to_fit)
CStatus Reserve(const int64_t new_size)
CResult[unique_ptr[CBuffer]] AllocateBuffer(const int64_t size,
CMemoryPool* pool)
CResult[unique_ptr[CResizableBuffer]] AllocateResizableBuffer(
const int64_t size, CMemoryPool* pool)
cdef cppclass CSyncEvent" arrow::Device::SyncEvent":
pass
cdef cppclass CDevice" arrow::Device":
pass
cdef CMemoryPool* c_default_memory_pool" arrow::default_memory_pool"()
cdef CMemoryPool* c_system_memory_pool" arrow::system_memory_pool"()
cdef CStatus c_jemalloc_memory_pool" arrow::jemalloc_memory_pool"(
CMemoryPool** out)
cdef CStatus c_mimalloc_memory_pool" arrow::mimalloc_memory_pool"(
CMemoryPool** out)
cdef vector[c_string] c_supported_memory_backends \
" arrow::SupportedMemoryBackendNames"()
CStatus c_jemalloc_set_decay_ms" arrow::jemalloc_set_decay_ms"(int ms)
cdef cppclass CListType" arrow::ListType"(CDataType):
CListType(const shared_ptr[CDataType]& value_type)
CListType(const shared_ptr[CField]& field)
shared_ptr[CDataType] value_type()
shared_ptr[CField] value_field()
cdef cppclass CLargeListType" arrow::LargeListType"(CDataType):
CLargeListType(const shared_ptr[CDataType]& value_type)
CLargeListType(const shared_ptr[CField]& field)
shared_ptr[CDataType] value_type()
shared_ptr[CField] value_field()
cdef cppclass CListViewType" arrow::ListViewType"(CDataType):
CListViewType(const shared_ptr[CDataType]& value_type)
CListViewType(const shared_ptr[CField]& field)
shared_ptr[CDataType] value_type()
shared_ptr[CField] value_field()
cdef cppclass CLargeListViewType" arrow::LargeListViewType"(CDataType):
CLargeListViewType(const shared_ptr[CDataType]& value_type)
CLargeListViewType(const shared_ptr[CField]& field)
shared_ptr[CDataType] value_type()
shared_ptr[CField] value_field()
cdef cppclass CMapType" arrow::MapType"(CDataType):
CMapType(const shared_ptr[CField]& key_field,
const shared_ptr[CField]& item_field, c_bool keys_sorted)
shared_ptr[CDataType] key_type()
shared_ptr[CField] key_field()
shared_ptr[CDataType] item_type()
shared_ptr[CField] item_field()
c_bool keys_sorted()
cdef cppclass CFixedSizeListType" arrow::FixedSizeListType"(CDataType):
CFixedSizeListType(const shared_ptr[CDataType]& value_type,
int32_t list_size)
CFixedSizeListType(const shared_ptr[CField]& field, int32_t list_size)
shared_ptr[CDataType] value_type()
shared_ptr[CField] value_field()
int32_t list_size()
cdef cppclass CStringType" arrow::StringType"(CDataType):
pass
cdef cppclass CFixedSizeBinaryType \
" arrow::FixedSizeBinaryType"(CFixedWidthType):
CFixedSizeBinaryType(int byte_width)
int byte_width()
int bit_width()
cdef cppclass CDecimal32Type \
" arrow::Decimal32Type"(CFixedSizeBinaryType):
CDecimal32Type(int precision, int scale)
int precision()
int scale()
cdef cppclass CDecimal64Type \
" arrow::Decimal64Type"(CFixedSizeBinaryType):
CDecimal64Type(int precision, int scale)
int precision()
int scale()
cdef cppclass CDecimal128Type \
" arrow::Decimal128Type"(CFixedSizeBinaryType):
CDecimal128Type(int precision, int scale)
int precision()
int scale()
cdef cppclass CDecimal256Type \
" arrow::Decimal256Type"(CFixedSizeBinaryType):
CDecimal256Type(int precision, int scale)
int precision()
int scale()
cdef cppclass CRunEndEncodedType " arrow::RunEndEncodedType"(CDataType):
CRunEndEncodedType(const shared_ptr[CDataType]& run_end_type,
const shared_ptr[CDataType]& value_type)
const shared_ptr[CDataType]& run_end_type()
const shared_ptr[CDataType]& value_type()
cdef cppclass CField" arrow::Field":
cppclass CMergeOptions "MergeOptions":
CMergeOptions()
c_bool promote_nullability
@staticmethod
CMergeOptions Defaults()
@staticmethod
CMergeOptions Permissive()
const c_string& name()
shared_ptr[CDataType] type()
c_bool nullable()
c_string ToString()
c_bool Equals(const CField& other, c_bool check_metadata)
shared_ptr[const CKeyValueMetadata] metadata()
CField(const c_string& name, const shared_ptr[CDataType]& type,
c_bool nullable)
CField(const c_string& name, const shared_ptr[CDataType]& type,
c_bool nullable, const shared_ptr[CKeyValueMetadata]& metadata)
# Removed const in Cython so don't have to cast to get code to generate
shared_ptr[CField] AddMetadata(
const shared_ptr[CKeyValueMetadata]& metadata)
shared_ptr[CField] WithMetadata(
const shared_ptr[CKeyValueMetadata]& metadata)
shared_ptr[CField] RemoveMetadata()
shared_ptr[CField] WithType(const shared_ptr[CDataType]& type)
shared_ptr[CField] WithName(const c_string& name)
shared_ptr[CField] WithNullable(c_bool nullable)
vector[shared_ptr[CField]] Flatten()
cdef cppclass CFieldRef" arrow::FieldRef":
CFieldRef()
CFieldRef(c_string name)
CFieldRef(int index)
CFieldRef(vector[CFieldRef])
@staticmethod
CResult[CFieldRef] FromDotPath(c_string& dot_path)
const c_string* name() const
cdef cppclass CFieldRefHash" arrow::FieldRef::Hash":
pass
cdef cppclass CStructType" arrow::StructType"(CDataType):
CStructType(const vector[shared_ptr[CField]]& fields)
shared_ptr[CField] GetFieldByName(const c_string& name)
vector[shared_ptr[CField]] GetAllFieldsByName(const c_string& name)
int GetFieldIndex(const c_string& name)
vector[int] GetAllFieldIndices(const c_string& name)
cdef cppclass CUnionType" arrow::UnionType"(CDataType):
UnionMode mode()
const vector[int8_t]& type_codes()
const vector[int]& child_ids()
cdef shared_ptr[CDataType] CMakeSparseUnionType" arrow::sparse_union"(
vector[shared_ptr[CField]] fields,
vector[int8_t] type_codes)
cdef shared_ptr[CDataType] CMakeDenseUnionType" arrow::dense_union"(
vector[shared_ptr[CField]] fields,
vector[int8_t] type_codes)
cdef shared_ptr[CDataType] CMakeRunEndEncodedType" arrow::run_end_encoded"(
shared_ptr[CDataType] run_end_type,
shared_ptr[CDataType] value_type)
cdef shared_ptr[CDataType] CMakeListViewType" arrow::list_view"(
shared_ptr[CField] value_type)
cdef shared_ptr[CDataType] CMakeLargeListViewType" arrow::large_list_view"(
shared_ptr[CField] value_type)
cdef cppclass CSchema" arrow::Schema":
CSchema(const vector[shared_ptr[CField]]& fields)
CSchema(const vector[shared_ptr[CField]]& fields,
const shared_ptr[const CKeyValueMetadata]& metadata)
# Does not actually exist, but gets Cython to not complain
CSchema(const vector[shared_ptr[CField]]& fields,
const shared_ptr[CKeyValueMetadata]& metadata)
c_bool Equals(const CSchema& other, c_bool check_metadata)
shared_ptr[CField] field(int i)
shared_ptr[const CKeyValueMetadata] metadata()
shared_ptr[CField] GetFieldByName(const c_string& name)
vector[shared_ptr[CField]] GetAllFieldsByName(const c_string& name)
int GetFieldIndex(const c_string& name)
vector[int] GetAllFieldIndices(const c_string& name)
const vector[shared_ptr[CField]] fields()
int num_fields()
c_string ToString()
CResult[shared_ptr[CSchema]] AddField(int i,
const shared_ptr[CField]& field)
CResult[shared_ptr[CSchema]] RemoveField(int i)
CResult[shared_ptr[CSchema]] SetField(int i,
const shared_ptr[CField]& field)
# Removed const in Cython so don't have to cast to get code to generate
shared_ptr[CSchema] AddMetadata(
const shared_ptr[CKeyValueMetadata]& metadata)
shared_ptr[CSchema] WithMetadata(
const shared_ptr[CKeyValueMetadata]& metadata)
shared_ptr[CSchema] RemoveMetadata()
CResult[shared_ptr[CSchema]] UnifySchemas(
const vector[shared_ptr[CSchema]]& schemas,
CField.CMergeOptions field_merge_options)
cdef cppclass PrettyPrintOptions:
PrettyPrintOptions()
PrettyPrintOptions(int indent_arg)
PrettyPrintOptions(int indent_arg, int window_arg)
int indent
int indent_size
int window
int container_window
c_string null_rep
c_bool skip_new_lines
c_bool truncate_metadata
c_bool show_field_metadata
c_bool show_schema_metadata
int element_size_limit
@staticmethod
PrettyPrintOptions Defaults()
CStatus PrettyPrint(const CArray& schema,
const PrettyPrintOptions& options,
c_string* result)
CStatus PrettyPrint(const CChunkedArray& schema,
const PrettyPrintOptions& options,
c_string* result)
CStatus PrettyPrint(const CSchema& schema,
const PrettyPrintOptions& options,
c_string* result)
cdef cppclass CBooleanArray" arrow::BooleanArray"(CArray):
c_bool Value(int i)
int64_t false_count()
int64_t true_count()
cdef cppclass CUInt8Array" arrow::UInt8Array"(CArray):
uint8_t Value(int i)
cdef cppclass CInt8Array" arrow::Int8Array"(CArray):
int8_t Value(int i)
cdef cppclass CUInt16Array" arrow::UInt16Array"(CArray):
uint16_t Value(int i)
cdef cppclass CInt16Array" arrow::Int16Array"(CArray):
int16_t Value(int i)
cdef cppclass CUInt32Array" arrow::UInt32Array"(CArray):
uint32_t Value(int i)
cdef cppclass CInt32Array" arrow::Int32Array"(CArray):
int32_t Value(int i)
cdef cppclass CUInt64Array" arrow::UInt64Array"(CArray):
uint64_t Value(int i)
cdef cppclass CInt64Array" arrow::Int64Array"(CArray):
int64_t Value(int i)
cdef cppclass CDate32Array" arrow::Date32Array"(CArray):
int32_t Value(int i)
cdef cppclass CDate64Array" arrow::Date64Array"(CArray):
int64_t Value(int i)
cdef cppclass CTime32Array" arrow::Time32Array"(CArray):
int32_t Value(int i)
cdef cppclass CTime64Array" arrow::Time64Array"(CArray):
int64_t Value(int i)
cdef cppclass CTimestampArray" arrow::TimestampArray"(CArray):
int64_t Value(int i)
cdef cppclass CDurationArray" arrow::DurationArray"(CArray):
int64_t Value(int i)
cdef cppclass CMonthDayNanoIntervalArray \
"arrow::MonthDayNanoIntervalArray"(CArray):
pass
cdef cppclass CHalfFloatArray" arrow::HalfFloatArray"(CArray):
uint16_t Value(int i)
cdef cppclass CFloatArray" arrow::FloatArray"(CArray):
float Value(int i)
cdef cppclass CDoubleArray" arrow::DoubleArray"(CArray):
double Value(int i)
cdef cppclass CFixedSizeBinaryArray" arrow::FixedSizeBinaryArray"(CArray):
const uint8_t* GetValue(int i)
cdef cppclass CDecimal32Array" arrow::Decimal32Array"(
CFixedSizeBinaryArray
):
c_string FormatValue(int i)
cdef cppclass CDecimal64Array" arrow::Decimal64Array"(
CFixedSizeBinaryArray
):
c_string FormatValue(int i)
cdef cppclass CDecimal128Array" arrow::Decimal128Array"(
CFixedSizeBinaryArray
):
c_string FormatValue(int i)
cdef cppclass CDecimal256Array" arrow::Decimal256Array"(
CFixedSizeBinaryArray
):
c_string FormatValue(int i)
cdef cppclass CListArray" arrow::ListArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const CArray& offsets,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
shared_ptr[CDataType],
const CArray& offsets,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
const int32_t* raw_value_offsets()
int32_t value_offset(int i)
int32_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] offsets()
shared_ptr[CDataType] value_type()
cdef cppclass CLargeListArray" arrow::LargeListArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const CArray& offsets,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap
)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
shared_ptr[CDataType],
const CArray& offsets,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap
)
int64_t value_offset(int i)
int64_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] offsets()
shared_ptr[CDataType] value_type()
cdef cppclass CFixedSizeListArray" arrow::FixedSizeListArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const shared_ptr[CArray]& values,
int32_t list_size,
shared_ptr[CBuffer] null_bitmap)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
const shared_ptr[CArray]& values,
shared_ptr[CDataType],
shared_ptr[CBuffer] null_bitmap)
int64_t value_offset(int i)
int64_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CDataType] value_type()
cdef cppclass CListViewArray" arrow::ListViewArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const CArray& offsets,
const CArray& sizes,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
shared_ptr[CDataType],
const CArray& offsets,
const CArray& sizes,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
CResult[shared_ptr[CArray]] Flatten(
CMemoryPool* pool
)
const int32_t* raw_value_offsets()
const int32_t* raw_value_sizes()
int32_t value_offset(int i)
int32_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] offsets()
shared_ptr[CArray] sizes()
shared_ptr[CDataType] value_type()
cdef cppclass CLargeListViewArray" arrow::LargeListViewArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const CArray& offsets,
const CArray& sizes,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
shared_ptr[CDataType],
const CArray& offsets,
const CArray& sizes,
const CArray& values,
CMemoryPool* pool,
shared_ptr[CBuffer] null_bitmap,
)
CResult[shared_ptr[CArray]] Flatten(
CMemoryPool* pool
)
int64_t value_offset(int i)
int64_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] offsets()
shared_ptr[CArray] sizes()
shared_ptr[CDataType] value_type()
cdef cppclass CMapArray" arrow::MapArray"(CArray):
@staticmethod
CResult[shared_ptr[CArray]] FromArrays(
const shared_ptr[CArray]& offsets,
const shared_ptr[CArray]& keys,
const shared_ptr[CArray]& items,
CMemoryPool* pool,
const shared_ptr[CBuffer] null_bitmap,
)
@staticmethod
CResult[shared_ptr[CArray]] FromArraysAndType" FromArrays"(
shared_ptr[CDataType],
const shared_ptr[CArray]& offsets,
const shared_ptr[CArray]& keys,
const shared_ptr[CArray]& items,
CMemoryPool* pool,
const shared_ptr[CBuffer] null_bitmap,
)
shared_ptr[CArray] keys()
shared_ptr[CArray] items()
CMapType* map_type()
int64_t value_offset(int i)
int64_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CDataType] value_type()
cdef cppclass CUnionArray" arrow::UnionArray"(CArray):
shared_ptr[CBuffer] type_codes()
int8_t* raw_type_codes()
int child_id(int64_t index)
shared_ptr[CArray] field(int pos)
const CArray* UnsafeField(int pos)
UnionMode mode()
cdef cppclass CSparseUnionArray" arrow::SparseUnionArray"(CUnionArray):
@staticmethod
CResult[shared_ptr[CArray]] Make(
const CArray& type_codes,
const vector[shared_ptr[CArray]]& children,
const vector[c_string]& field_names,
const vector[int8_t]& type_codes)
cdef cppclass CDenseUnionArray" arrow::DenseUnionArray"(CUnionArray):
@staticmethod
CResult[shared_ptr[CArray]] Make(
const CArray& type_codes,
const CArray& value_offsets,
const vector[shared_ptr[CArray]]& children,
const vector[c_string]& field_names,
const vector[int8_t]& type_codes)
int32_t value_offset(int i)
shared_ptr[CBuffer] value_offsets()
cdef cppclass CBinaryArray" arrow::BinaryArray"(CArray):
const uint8_t* GetValue(int i, int32_t* length)
shared_ptr[CBuffer] value_data()
int32_t value_offset(int64_t i)
int32_t value_length(int64_t i)
int32_t total_values_length()
cdef cppclass CLargeBinaryArray" arrow::LargeBinaryArray"(CArray):
const uint8_t* GetValue(int i, int64_t* length)
shared_ptr[CBuffer] value_data()
int64_t value_offset(int64_t i)
int64_t value_length(int64_t i)
int64_t total_values_length()
cdef cppclass CStringArray" arrow::StringArray"(CBinaryArray):
CStringArray(int64_t length, shared_ptr[CBuffer] value_offsets,
shared_ptr[CBuffer] data,
shared_ptr[CBuffer] null_bitmap,
int64_t null_count,
int64_t offset)
c_string GetString(int i)
cdef cppclass CLargeStringArray" arrow::LargeStringArray" \
(CLargeBinaryArray):
CLargeStringArray(int64_t length, shared_ptr[CBuffer] value_offsets,
shared_ptr[CBuffer] data,
shared_ptr[CBuffer] null_bitmap,
int64_t null_count,
int64_t offset)
c_string GetString(int i)
cdef cppclass CStructArray" arrow::StructArray"(CArray):
CStructArray(shared_ptr[CDataType]& type, int64_t length,
vector[shared_ptr[CArray]]& children,
shared_ptr[CBuffer] null_bitmap=nullptr,
int64_t null_count=-1,
int64_t offset=0)
# XXX Cython crashes if default argument values are declared here
# https://github.com/cython/cython/issues/2167
@staticmethod
CResult[shared_ptr[CArray]] MakeFromFieldNames "Make"(
vector[shared_ptr[CArray]] children,
vector[c_string] field_names,
shared_ptr[CBuffer] null_bitmap,
int64_t null_count,
int64_t offset)
@staticmethod
CResult[shared_ptr[CArray]] MakeFromFields "Make"(
vector[shared_ptr[CArray]] children,
vector[shared_ptr[CField]] fields,