Kùzu C++ API
Loading...
Searching...
No Matches
arrow.h
Go to the documentation of this file.
1#pragma once
2
3// The Arrow C data interface.
4// https://arrow.apache.org/docs/format/CDataInterface.html
5
6#include <stdint.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#ifndef ARROW_C_DATA_INTERFACE
13#define ARROW_C_DATA_INTERFACE
14
15#define ARROW_FLAG_DICTIONARY_ORDERED 1
16#define ARROW_FLAG_NULLABLE 2
17#define ARROW_FLAG_MAP_KEYS_SORTED 4
18
20 // Array type description
21 const char* format;
22 const char* name;
23 const char* metadata;
24 int64_t flags;
25 int64_t n_children;
28
29 // Release callback
30 void (*release)(struct ArrowSchema*);
31 // Opaque producer-specific data
33};
34
35struct ArrowArray {
36 // Array data description
37 int64_t length;
38 int64_t null_count;
39 int64_t offset;
40 int64_t n_buffers;
41 int64_t n_children;
42 const void** buffers;
45
46 // Release callback
47 void (*release)(struct ArrowArray*);
48 // Opaque producer-specific data
50};
51
52#endif // ARROW_C_DATA_INTERFACE
53
54#ifdef __cplusplus
55}
56#endif
57
59 ArrowSchemaWrapper() { release = nullptr; }
61 if (release) {
62 release(this);
63 }
64 }
65};
66
68 ArrowArrayWrapper() { release = nullptr; }
70 if (release) {
71 release(this);
72 }
73 }
74};
Definition arrow.h:35
void(* release)(struct ArrowArray *)
Definition arrow.h:47
void * private_data
Definition arrow.h:49
int64_t n_children
Definition arrow.h:41
int64_t null_count
Definition arrow.h:38
struct ArrowArray ** children
Definition arrow.h:43
int64_t offset
Definition arrow.h:39
struct ArrowArray * dictionary
Definition arrow.h:44
const void ** buffers
Definition arrow.h:42
int64_t n_buffers
Definition arrow.h:40
int64_t length
Definition arrow.h:37
Definition arrow.h:67
ArrowArrayWrapper()
Definition arrow.h:68
~ArrowArrayWrapper()
Definition arrow.h:69
Definition arrow.h:19
int64_t flags
Definition arrow.h:24
const char * metadata
Definition arrow.h:23
int64_t n_children
Definition arrow.h:25
const char * name
Definition arrow.h:22
void * private_data
Definition arrow.h:32
const char * format
Definition arrow.h:21
struct ArrowSchema * dictionary
Definition arrow.h:27
void(* release)(struct ArrowSchema *)
Definition arrow.h:30
struct ArrowSchema ** children
Definition arrow.h:26
Definition arrow.h:58
ArrowSchemaWrapper()
Definition arrow.h:59
~ArrowSchemaWrapper()
Definition arrow.h:60