@@ -39,6 +39,10 @@ cdef extern from "nanoarrow/nanoarrow.c":
39
39
40
40
ctypedef int ArrowErrorCode
41
41
42
+ cdef struct ArrowBuffer:
43
+ uint8_t * data
44
+ int64_t size_bytes
45
+
42
46
cdef union ArrowBufferViewData:
43
47
const void * data
44
48
@@ -49,10 +53,6 @@ cdef extern from "nanoarrow/nanoarrow.c":
49
53
cdef struct ArrowArrayView:
50
54
ArrowBufferView * buffer_views
51
55
52
- cdef struct ArrowBuffer:
53
- uint8_t * data
54
- int64_t size_bytes
55
-
56
56
cdef struct ArrowDecimal:
57
57
pass
58
58
@@ -65,21 +65,19 @@ cdef extern from "nanoarrow/nanoarrow.c":
65
65
66
66
cdef ArrowErrorCode NANOARROW_OK
67
67
68
- void ArrowArrayRelease(ArrowArray * array)
69
- void ArrowSchemaRelease(ArrowSchema * schema)
70
-
71
- ArrowErrorCode ArrowArrayInitFromType(ArrowArray* array,
72
- ArrowType storage_type)
73
68
ArrowErrorCode ArrowArrayAppendBytes(ArrowArray* array,
74
69
ArrowBufferView value)
75
- ArrowErrorCode ArrowArrayAppendDouble(ArrowArray* array, double value)
76
- ArrowErrorCode ArrowArrayAppendNull(ArrowArray* array, int64_t n)
77
- ArrowErrorCode ArrowArrayAppendInt(ArrowArray* array, int64_t value)
78
70
ArrowErrorCode ArrowArrayAppendDecimal(ArrowArray* array,
79
71
const ArrowDecimal* value)
72
+ ArrowErrorCode ArrowArrayAppendDouble(ArrowArray* array, double value)
73
+ ArrowErrorCode ArrowArrayAppendInt(ArrowArray* array, int64_t value)
74
+ ArrowErrorCode ArrowArrayAppendNull(ArrowArray* array, int64_t n)
80
75
ArrowBuffer* ArrowArrayBuffer(ArrowArray* array, int64_t i)
81
76
ArrowErrorCode ArrowArrayFinishBuildingDefault(ArrowArray* array,
82
77
ArrowError* error)
78
+ ArrowErrorCode ArrowArrayInitFromType(ArrowArray* array,
79
+ ArrowType storage_type)
80
+ void ArrowArrayRelease(ArrowArray * array)
83
81
ArrowErrorCode ArrowArrayReserve(ArrowArray* array,
84
82
int64_t additional_size_elements)
85
83
ArrowErrorCode ArrowArrayStartAppending(ArrowArray* array)
@@ -90,8 +88,15 @@ cdef extern from "nanoarrow/nanoarrow.c":
90
88
const ArrowArray* array,
91
89
ArrowError* error)
92
90
int8_t ArrowBitGet(const uint8_t* bits, int64_t i)
91
+ void ArrowDecimalInit(ArrowDecimal* decimal, int32_t bitwidth,
92
+ int32_t precision, int32_t scale)
93
+ void ArrowDecimalSetBytes(ArrowDecimal * decimal, const uint8_t* value)
94
+ ArrowErrorCode ArrowDecimalSetDigits(ArrowDecimal* decimal,
95
+ ArrowStringView value)
93
96
void ArrowSchemaInit(ArrowSchema* schema)
94
97
ArrowErrorCode ArrowSchemaInitFromType(ArrowSchema* schema, ArrowType type )
98
+ void ArrowSchemaRelease(ArrowSchema * schema)
99
+ ArrowErrorCode ArrowSchemaSetName(ArrowSchema* schema, const char * name)
95
100
ArrowErrorCode ArrowSchemaSetTypeDateTime(ArrowSchema* schema,
96
101
ArrowType arrow_type,
97
102
ArrowTimeUnit time_unit,
@@ -100,15 +105,8 @@ cdef extern from "nanoarrow/nanoarrow.c":
100
105
ArrowType type ,
101
106
int32_t decimal_precision,
102
107
int32_t decimal_scale)
103
- ArrowErrorCode ArrowSchemaSetName(ArrowSchema* schema, const char * name)
104
108
int64_t ArrowSchemaToString(const ArrowSchema* schema, char * out,
105
109
int64_t n, char recursive)
106
- void ArrowDecimalInit(ArrowDecimal* decimal, int32_t bitwidth,
107
- int32_t precision, int32_t scale)
108
- void ArrowDecimalSetBytes(ArrowDecimal * decimal, const uint8_t* value)
109
- ArrowErrorCode ArrowDecimalSetDigits(ArrowDecimal* decimal,
110
- ArrowStringView value)
111
-
112
110
113
111
cdef int _check_nanoarrow(int code) except - 1 :
114
112
"""
0 commit comments