Class ArrowColumn
An ArrowColumn describes one named column and one or more Arrow C Data Interface
chunks. It does not own the native Arrow structs; ownership follows the rules documented on
cData(String, long, long) and chunks(String, List).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne Arrow C Data Interface chunk in a column. -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the array address for the first chunk.longarrayAddress(int chunkIndex) Return the array address for a chunk.static ArrowColumnCreate a column from Arrow C Data Interface struct addresses.static ArrowColumn.Chunkchunk(long schemaAddress, long arrayAddress) Create one Arrow C Data Interface chunk from struct addresses.intReturn the number of Arrow chunks in this column.chunks()Return the immutable chunk list.static ArrowColumnchunks(String name, ArrowColumn.Chunk... chunks) Create a chunked column from Arrow C Data Interface struct addresses.static ArrowColumnchunks(String name, List<ArrowColumn.Chunk> chunks) Create a chunked column from Arrow C Data Interface struct addresses.name()Return the column name exposed to Cypher.longReturn the schema address for the first chunk.longschemaAddress(int chunkIndex) Return the schema address for a chunk.
-
Method Details
-
cData
Create a column from Arrow C Data Interface struct addresses.The schema address points to an
ArrowSchemastruct borrowed for the duration ofbindArrow. The array address points to anArrowArraystruct whose payload is transferred to Velr bybindArrow. After a successful or failed bind call, callers should close wrapper objects that own the struct memory, but must not call the ArrowArray release callback.- Parameters:
name- column name exposed to Cypher as a field on rows fromBIND(...)schemaAddress- memory address of an ArrowSchema structarrayAddress- memory address of an ArrowArray struct- Returns:
- a single-chunk Arrow column descriptor
-
chunk
Create one Arrow C Data Interface chunk from struct addresses.- Parameters:
schemaAddress- memory address of an ArrowSchema structarrayAddress- memory address of an ArrowArray struct- Returns:
- a chunk descriptor for use with
chunks(String, Chunk...)
-
chunks
Create a chunked column from Arrow C Data Interface struct addresses.Each chunk follows the same ownership rules as
cData(String, long, long). Schemas are borrowed for the duration of the bind call. Array payloads are transferred to Velr.- Parameters:
name- column name exposed to Cypher as a field on rows fromBIND(...)chunks- one or more Arrow C Data Interface chunks- Returns:
- a chunked Arrow column descriptor
-
chunks
Create a chunked column from Arrow C Data Interface struct addresses.Each chunk follows the same ownership rules as
cData(String, long, long). Schemas are borrowed for the duration of the bind call. Array payloads are transferred to Velr.- Parameters:
name- column name exposed to Cypher as a field on rows fromBIND(...)chunks- one or more Arrow C Data Interface chunks- Returns:
- a chunked Arrow column descriptor
-
name
Return the column name exposed to Cypher.- Returns:
- column name
-
chunkCount
public int chunkCount()Return the number of Arrow chunks in this column.- Returns:
- chunk count
-
chunks
Return the immutable chunk list.- Returns:
- chunks in bind order
-
schemaAddress
public long schemaAddress()Return the schema address for the first chunk.- Returns:
- ArrowSchema address for chunk zero
-
arrayAddress
public long arrayAddress()Return the array address for the first chunk.- Returns:
- ArrowArray address for chunk zero
-
schemaAddress
public long schemaAddress(int chunkIndex) Return the schema address for a chunk.- Parameters:
chunkIndex- zero-based chunk index- Returns:
- ArrowSchema address
-
arrayAddress
public long arrayAddress(int chunkIndex) Return the array address for a chunk.- Parameters:
chunkIndex- zero-based chunk index- Returns:
- ArrowArray address
-