-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
composite-array.h
315 lines (264 loc) · 9.81 KB
/
composite-array.h
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
/*
* 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.
*/
#pragma once
#include <arrow-glib/version.h>
#include <arrow-glib/basic-array.h>
#include <arrow-glib/data-type.h>
G_BEGIN_DECLS
#define GARROW_TYPE_LIST_ARRAY (garrow_list_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowListArray, garrow_list_array, GARROW, LIST_ARRAY, GArrowArray)
struct _GArrowListArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_ALL
GArrowListArray *
garrow_list_array_new(GArrowDataType *data_type,
gint64 length,
GArrowBuffer *value_offsets,
GArrowArray *values,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
GARROW_AVAILABLE_IN_ALL
GArrowDataType *
garrow_list_array_get_value_type(GArrowListArray *array);
GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_list_array_get_value(GArrowListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
GArrowArray *
garrow_list_array_get_values(GArrowListArray *array);
GARROW_AVAILABLE_IN_2_0
gint32
garrow_list_array_get_value_offset(GArrowListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
gint32
garrow_list_array_get_value_length(GArrowListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
const gint32 *
garrow_list_array_get_value_offsets(GArrowListArray *array, gint64 *n_offsets);
#define GARROW_TYPE_LARGE_LIST_ARRAY (garrow_large_list_array_get_type())
GARROW_AVAILABLE_IN_0_16
G_DECLARE_DERIVABLE_TYPE(
GArrowLargeListArray, garrow_large_list_array, GARROW, LARGE_LIST_ARRAY, GArrowArray)
struct _GArrowLargeListArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_0_16
GArrowLargeListArray *
garrow_large_list_array_new(GArrowDataType *data_type,
gint64 length,
GArrowBuffer *value_offsets,
GArrowArray *values,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
GARROW_AVAILABLE_IN_0_16
GArrowDataType *
garrow_large_list_array_get_value_type(GArrowLargeListArray *array);
GARROW_AVAILABLE_IN_0_16
GArrowArray *
garrow_large_list_array_get_value(GArrowLargeListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
GArrowArray *
garrow_large_list_array_get_values(GArrowLargeListArray *array);
GARROW_AVAILABLE_IN_2_0
gint64
garrow_large_list_array_get_value_offset(GArrowLargeListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
gint64
garrow_large_list_array_get_value_length(GArrowLargeListArray *array, gint64 i);
GARROW_AVAILABLE_IN_2_0
const gint64 *
garrow_large_list_array_get_value_offsets(GArrowLargeListArray *array, gint64 *n_offsets);
#define GARROW_TYPE_STRUCT_ARRAY (garrow_struct_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowStructArray, garrow_struct_array, GARROW, STRUCT_ARRAY, GArrowArray)
struct _GArrowStructArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_ALL
GArrowStructArray *
garrow_struct_array_new(GArrowDataType *data_type,
gint64 length,
GList *fields,
GArrowBuffer *null_bitmap,
gint64 n_nulls);
GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_struct_array_get_field(GArrowStructArray *array, gint i);
GARROW_AVAILABLE_IN_ALL
GList *
garrow_struct_array_get_fields(GArrowStructArray *array);
GARROW_AVAILABLE_IN_0_10
GList *
garrow_struct_array_flatten(GArrowStructArray *array, GError **error);
#define GARROW_TYPE_MAP_ARRAY (garrow_map_array_get_type())
GARROW_AVAILABLE_IN_0_17
G_DECLARE_DERIVABLE_TYPE(
GArrowMapArray, garrow_map_array, GARROW, MAP_ARRAY, GArrowListArray)
struct _GArrowMapArrayClass
{
GArrowListArrayClass parent_class;
};
GARROW_AVAILABLE_IN_0_17
GArrowMapArray *
garrow_map_array_new(GArrowArray *offsets,
GArrowArray *keys,
GArrowArray *items,
GError **error);
GARROW_AVAILABLE_IN_0_17
GArrowArray *
garrow_map_array_get_keys(GArrowMapArray *array);
GARROW_AVAILABLE_IN_0_17
GArrowArray *
garrow_map_array_get_items(GArrowMapArray *array);
#define GARROW_TYPE_UNION_ARRAY (garrow_union_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowUnionArray, garrow_union_array, GARROW, UNION_ARRAY, GArrowArray)
struct _GArrowUnionArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_12_0
gint8
garrow_union_array_get_type_code(GArrowUnionArray *array, gint64 i);
GARROW_AVAILABLE_IN_12_0
gint
garrow_union_array_get_child_id(GArrowUnionArray *array, gint64 i);
GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_union_array_get_field(GArrowUnionArray *array, gint i);
#define GARROW_TYPE_SPARSE_UNION_ARRAY (garrow_sparse_union_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowSparseUnionArray,
garrow_sparse_union_array,
GARROW,
SPARSE_UNION_ARRAY,
GArrowUnionArray)
struct _GArrowSparseUnionArrayClass
{
GArrowUnionArrayClass parent_class;
};
GARROW_AVAILABLE_IN_ALL
GArrowSparseUnionArray *
garrow_sparse_union_array_new(GArrowInt8Array *type_ids, GList *fields, GError **error);
GARROW_AVAILABLE_IN_ALL
GArrowSparseUnionArray *
garrow_sparse_union_array_new_data_type(GArrowSparseUnionDataType *data_type,
GArrowInt8Array *type_ids,
GList *fields,
GError **error);
#define GARROW_TYPE_DENSE_UNION_ARRAY (garrow_dense_union_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(GArrowDenseUnionArray,
garrow_dense_union_array,
GARROW,
DENSE_UNION_ARRAY,
GArrowUnionArray)
struct _GArrowDenseUnionArrayClass
{
GArrowUnionArrayClass parent_class;
};
GARROW_AVAILABLE_IN_ALL
GArrowDenseUnionArray *
garrow_dense_union_array_new(GArrowInt8Array *type_ids,
GArrowInt32Array *value_offsets,
GList *fields,
GError **error);
GARROW_AVAILABLE_IN_ALL
GArrowDenseUnionArray *
garrow_dense_union_array_new_data_type(GArrowDenseUnionDataType *data_type,
GArrowInt8Array *type_ids,
GArrowInt32Array *value_offsets,
GList *fields,
GError **error);
GARROW_AVAILABLE_IN_12_0
gint32
garrow_dense_union_array_get_value_offset(GArrowDenseUnionArray *array, gint64 i);
#define GARROW_TYPE_DICTIONARY_ARRAY (garrow_dictionary_array_get_type())
GARROW_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE(
GArrowDictionaryArray, garrow_dictionary_array, GARROW, DICTIONARY_ARRAY, GArrowArray)
struct _GArrowDictionaryArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_ALL
GArrowDictionaryArray *
garrow_dictionary_array_new(GArrowDataType *data_type,
GArrowArray *indices,
GArrowArray *dictionary,
GError **error);
GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_dictionary_array_get_indices(GArrowDictionaryArray *array);
GARROW_AVAILABLE_IN_ALL
GArrowArray *
garrow_dictionary_array_get_dictionary(GArrowDictionaryArray *array);
#ifndef GARROW_DISABLE_DEPRECATED
GARROW_AVAILABLE_IN_ALL
GARROW_DEPRECATED_IN_1_0_FOR(garrow_array_get_value_data_type)
GArrowDictionaryDataType *
garrow_dictionary_array_get_dictionary_data_type(GArrowDictionaryArray *array);
#endif
#define GARROW_TYPE_RUN_END_ENCODED_ARRAY (garrow_run_end_encoded_array_get_type())
GARROW_AVAILABLE_IN_13_0
G_DECLARE_DERIVABLE_TYPE(GArrowRunEndEncodedArray,
garrow_run_end_encoded_array,
GARROW,
RUN_END_ENCODED_ARRAY,
GArrowArray)
struct _GArrowRunEndEncodedArrayClass
{
GArrowArrayClass parent_class;
};
GARROW_AVAILABLE_IN_13_0
GArrowRunEndEncodedArray *
garrow_run_end_encoded_array_new(GArrowDataType *data_type,
gint64 logical_length,
GArrowArray *run_ends,
GArrowArray *values,
gint64 logical_offset,
GError **error);
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_run_ends(GArrowRunEndEncodedArray *array);
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_values(GArrowRunEndEncodedArray *array);
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_logical_run_ends(GArrowRunEndEncodedArray *array,
GError **error);
GARROW_AVAILABLE_IN_13_0
GArrowArray *
garrow_run_end_encoded_array_get_logical_values(GArrowRunEndEncodedArray *array);
GARROW_AVAILABLE_IN_13_0
gint64
garrow_run_end_encoded_array_find_physical_offset(GArrowRunEndEncodedArray *array);
GARROW_AVAILABLE_IN_13_0
gint64
garrow_run_end_encoded_array_find_physical_length(GArrowRunEndEncodedArray *array);
G_END_DECLS