frame/column
column-int32
(column-int32 [vs :int nullable :int validity :int] :int)
build a column of int32 values from a cons list.
| vs | cons list of :int values (will be narrowed to int32) | |
| nullable | :int, 0 = no, 1 = yes | |
| validity | 0 (all-valid) or a parallel cons list of 0/1 :int values |
:int opaque column handle. Free with column-free.
(let [c (column-int32 (cons 1 (cons 2 (cons 3 0))) 0 0)]
(column-int32-at c 0)) ; => 1
Since: FR0
column-int64
(column-int64 [vs :int nullable :int validity :int] :int)
build a column of int64 values. Since: FR0
column-float32
(column-float32 [vs :int nullable :int validity :int] :int)
build a column of float32 values from a cons list
Since: FR0
column-float64
(column-float64 [vs :int nullable :int validity :int] :int)
build a column of float64 values from a cons list of
Since: FR0
column-bool
(column-bool [vs :int nullable :int validity :int] :int)
build a 1-bit-packed bool column from a cons list of 0/1 ints.
Since: FR0
column-date32
(column-date32 [vs :int nullable :int validity :int] :int)
build a date32 column from a cons list of int days-since-epoch.
Since: FR9
column-timestamp
(column-timestamp [vs :int nullable :int validity :int] :int)
build a timestamp column from a cons list of int64
column-date32-at
(column-date32-at [col :int i :int] :int)
read a date32 cell as :int (days since epoch). Since: FR9
column-timestamp-at
(column-timestamp-at [col :int i :int] :int)
read a timestamp cell as :int (us since epoch). Since: FR9
column-type
(column-type [col :int] :int)
type tag of a column. Since: FR0
column-length
(column-length [col :int] :int)
number of elements in a column. Since: FR0
column-null-count
(column-null-count [col :int] :int)
number of null entries. Since: FR0
column-valid?
(column-valid? [col :int i :int] :bool)
true if row i of col is non-null. Since: FR0
column-int32-at
(column-int32-at [col :int i :int] :int)
read int32 element at row i. Since: FR0
column-int64-at
(column-int64-at [col :int i :int] :int)
read int64 element at row i. Since: FR0
column-float32-at
(column-float32-at [col :int i :int] :float)
read float32 element at row i as :float (double). Since: FR0
column-float64-at
(column-float64-at [col :int i :int] :float)
read float64 element at row i. Since: FR0
column-bool-at
(column-bool-at [col :int i :int] :int)
read 1-bit-packed bool element at row i; returns 0 or 1. Since: FR0
column-slice
(column-slice [col :int offset :int length :int] :int)
new column containing rows [offset, offset+length).
Since: FR0
column-free
(column-free [col :int] :void)
release a reference to a column.
column-retain
(column-retain [col :int] :int)
bump the refcount on a shared column handle. Since: FR2
column-utf8
(column-utf8 [vs :int nullable :int validity :int] :int)
build a utf8 column from a cons list of :cstr values.
| vs | cons list whose `value` slots are :cstr pointers (NUL-terminated) | |
| nullable | :int, 0 = no, 1 = yes | |
| validity | 0 (all-valid) or a parallel cons list of 0/1 :int values |
:int opaque column handle. Free with column-free. Layout: Arrow utf8 -- (validity_bitmap?, int32 offsets[n+1], data_bytes).
Since: FR1
column-utf8-at
(column-utf8-at [col :int i :int] :cstr)
read the utf8 element at row i as a :cstr.
Since: FR1
column-builder
(column-builder [type-tag :int capacity :int] :int)
create a new builder for the given type with an initial
builder-append-int32
(builder-append-int32 [b :int v :int] :void)
append a value to an int32 builder. Since: FR1
builder-append-int64
(builder-append-int64 [b :int v :int] :void)
append a value to an int64 builder. Since: FR1
builder-append-float64
(builder-append-float64 [b :int v :float] :void)
append a double value to a float64 builder. Since: FR1
builder-append-bool
(builder-append-bool [b :int v :int] :void)
append 0/1 to a bool builder. Since: FR1
builder-append-utf8
(builder-append-utf8 [b :int s :cstr] :void)
append a string to a utf8 builder. Since: FR1
builder-append-null
(builder-append-null [b :int] :void)
mark the next row as null and bump length.
builder-finish
(builder-finish [b :int] :int)
materialize the accumulated rows into a column and free
column-cast
(column-cast [col :int target :int] :int)
numeric->numeric conversion producing a new column. Since: FR9
Internal definitions
__set-type-tag-- internal helper to retag a column. Since: FR9__builder-grow-- ensure capacity for one more row (internal). Since: FR1