Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
Loading...
Searching...
No Matches
arrow_abi.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0 */
2/* SPDX-FileCopyrightText: Copyright The Lance Authors */
3
9#ifndef LANCE_ARROW_ABI_H
10#define LANCE_ARROW_ABI_H
11
12#include <stdint.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/* ─── Arrow C Data and Stream Interface declarations ─── */
19/* These match the canonical Arrow C ABI. Including arrow/c/abi.h first
20 defines the matching ARROW_C_* guard, so the declarations below are
21 skipped. */
22
23#ifndef ARROW_C_DATA_INTERFACE
24#define ARROW_C_DATA_INTERFACE
25
26#define ARROW_FLAG_DICTIONARY_ORDERED 1
27#define ARROW_FLAG_NULLABLE 2
28#define ARROW_FLAG_MAP_KEYS_SORTED 4
29
31 const char* format;
32 const char* name;
33 const char* metadata;
34 int64_t flags;
35 int64_t n_children;
38 void (*release)(struct ArrowSchema*);
40};
41
42struct ArrowArray {
43 int64_t length;
44 int64_t null_count;
45 int64_t offset;
46 int64_t n_buffers;
47 int64_t n_children;
48 const void** buffers;
51 void (*release)(struct ArrowArray*);
53};
54
55#endif /* ARROW_C_DATA_INTERFACE */
56
57#ifndef ARROW_C_STREAM_INTERFACE
58#define ARROW_C_STREAM_INTERFACE
59
61 int (*get_schema)(struct ArrowArrayStream*, struct ArrowSchema* out);
62 int (*get_next)(struct ArrowArrayStream*, struct ArrowArray* out);
63 const char* (*get_last_error)(struct ArrowArrayStream*);
64 void (*release)(struct ArrowArrayStream*);
66};
67
68#endif /* ARROW_C_STREAM_INTERFACE */
69
70#ifdef __cplusplus
71} /* extern "C" */
72#endif
73
74#endif /* LANCE_ARROW_ABI_H */
int(* get_next)(struct ArrowArrayStream *, struct ArrowArray *out)
Definition arrow_abi.h:62
void * private_data
Definition arrow_abi.h:65
void(* release)(struct ArrowArrayStream *)
Definition arrow_abi.h:64
int(* get_schema)(struct ArrowArrayStream *, struct ArrowSchema *out)
Definition arrow_abi.h:61
void(* release)(struct ArrowArray *)
Definition arrow_abi.h:51
void * private_data
Definition arrow_abi.h:52
int64_t n_children
Definition arrow_abi.h:47
int64_t null_count
Definition arrow_abi.h:44
struct ArrowArray ** children
Definition arrow_abi.h:49
int64_t offset
Definition arrow_abi.h:45
struct ArrowArray * dictionary
Definition arrow_abi.h:50
const void ** buffers
Definition arrow_abi.h:48
int64_t n_buffers
Definition arrow_abi.h:46
int64_t length
Definition arrow_abi.h:43
int64_t flags
Definition arrow_abi.h:34
const char * metadata
Definition arrow_abi.h:33
int64_t n_children
Definition arrow_abi.h:35
const char * name
Definition arrow_abi.h:32
void * private_data
Definition arrow_abi.h:39
const char * format
Definition arrow_abi.h:31
struct ArrowSchema * dictionary
Definition arrow_abi.h:37
void(* release)(struct ArrowSchema *)
Definition arrow_abi.h:38
struct ArrowSchema ** children
Definition arrow_abi.h:36