Top |
GArrowRecordBatch is a class for record batch. Record batch is similar to GArrowTable. Record batch also has also zero or more columns and zero or more records.
Record batch is used for shared memory IPC.
GArrowRecordBatchIterator is a class for iterating record batches.
GArrowRecordBatch * garrow_record_batch_import (gpointer c_abi_array
,GArrowSchema *schema
,GError **error
);
c_abi_array |
A |
[not nullable] |
schema |
A GArrowSchema of the C ABI array. |
|
error |
[nullable] |
An imported GArrowRecordBatch
on success, NULL
on error.
You don't need to release the passed struct ArrowArray *
,
even if this function reports an error.
[transfer full][nullable]
Since: 6.0.0
GArrowRecordBatch * garrow_record_batch_new (GArrowSchema *schema
,guint32 n_rows
,GList *columns
,GError **error
);
gboolean garrow_record_batch_export (GArrowRecordBatch *record_batch
,gpointer *c_abi_array
,gpointer *c_abi_schema
,GError **error
);
record_batch |
||
c_abi_array |
Return location for a |
[out] |
c_abi_schema |
Return location for a
|
[out][nullable] |
error |
[nullable] |
Since: 6.0.0
gboolean garrow_record_batch_equal (GArrowRecordBatch *record_batch
,GArrowRecordBatch *other_record_batch
);
Since: 0.4.0
gboolean garrow_record_batch_equal_metadata (GArrowRecordBatch *record_batch
,GArrowRecordBatch *other_record_batch
,gboolean check_metadata
);
record_batch |
||
other_record_batch |
A GArrowRecordBatch to be compared. |
|
check_metadata |
Whether to compare metadata. |
Since: 0.17.0
GArrowSchema *
garrow_record_batch_get_schema (GArrowRecordBatch *record_batch
);
GArrowArray * garrow_record_batch_get_column_data (GArrowRecordBatch *record_batch
,gint i
);
record_batch |
||
i |
The index of the target column. If it's negative, index is
counted backward from the end of the columns. |
The i-th column in the record batch
on success, NULL
on out of index.
[transfer full][nullable]
Since: 0.15.0
const gchar * garrow_record_batch_get_column_name (GArrowRecordBatch *record_batch
,gint i
);
record_batch |
||
i |
The index of the target column. If it's negative, index is
counted backward from the end of the columns. |
The name of the i-th column in the record batch
on success, NULL
on out of index.
[nullable]
guint
garrow_record_batch_get_n_columns (GArrowRecordBatch *record_batch
);
gint64
garrow_record_batch_get_n_rows (GArrowRecordBatch *record_batch
);
GArrowRecordBatch * garrow_record_batch_slice (GArrowRecordBatch *record_batch
,gint64 offset
,gint64 length
);
record_batch |
||
offset |
The offset of sub GArrowRecordBatch. |
|
length |
The length of sub GArrowRecordBatch. |
The sub GArrowRecordBatch. It covers
only from offset
to offset + length
range. The sub
GArrowRecordBatch shares values with the base
GArrowRecordBatch.
[transfer full]
gchar * garrow_record_batch_to_string (GArrowRecordBatch *record_batch
,GError **error
);
The formatted record batch content or NULL
on error.
It should be freed with g_free()
when no longer needed.
[nullable]
Since: 0.4.0
GArrowRecordBatch * garrow_record_batch_add_column (GArrowRecordBatch *record_batch
,guint i
,GArrowField *field
,GArrowArray *column
,GError **error
);
record_batch |
||
i |
The index of the new column. |
|
field |
The field to be added. |
|
column |
The column to be added. |
|
error |
[nullable] |
The newly allocated
GArrowRecordBatch that has a new column or NULL
on error.
[nullable][transfer full]
Since: 0.9.0
GArrowRecordBatch * garrow_record_batch_remove_column (GArrowRecordBatch *record_batch
,guint i
,GError **error
);
The newly allocated
GArrowRecordBatch that doesn't have the column or NULL
on error.
[nullable][transfer full]
Since: 0.9.0
GArrowBuffer * garrow_record_batch_serialize (GArrowRecordBatch *record_batch
,GArrowWriteOptions *options
,GError **error
);
The newly allocated
GArrowBuffer that contains a serialized record batch or NULL
on
error.
[nullable][transfer full]
Since: 1.0.0
GArrowRecordBatchIterator *
garrow_record_batch_iterator_new (GList *record_batches
);
Since: 0.17.0
GArrowRecordBatch * garrow_record_batch_iterator_next (GArrowRecordBatchIterator *iterator
,GError **error
);
The next GArrowRecordBatch, or NULL
when the iterator is completed.
[nullable][transfer full]
Since: 0.17.0
gboolean garrow_record_batch_iterator_equal (GArrowRecordBatchIterator *iterator
,GArrowRecordBatchIterator *other_iterator
);
Since: 0.17.0
GList * garrow_record_batch_iterator_to_list (GArrowRecordBatchIterator *iterator
,GError **error
);
A GList contains every moved elements from the iterator.
[element-type GArrowRecordBatch][transfer full]
Since: 0.17.0
struct GArrowRecordBatchIteratorClass { GObjectClass parent_class; };
“record-batch”
property“record-batch” gpointer
The raw std::shared<arrow::RecordBatch> *.
Owner: GArrowRecordBatch
Flags: Write / Construct Only
“iterator”
property“iterator” gpointer
The raw arrow::RecordBatchIterator.
Owner: GArrowRecordBatchIterator
Flags: Write / Construct Only