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.
GArrowRecordBatch * garrow_record_batch_new (GArrowSchema *schema
,guint32 n_rows
,GList *columns
,GError **error
);
gboolean garrow_record_batch_equal (GArrowRecordBatch *record_batch
,GArrowRecordBatch *other_record_batch
);
Since: 0.4.0
GArrowSchema *
garrow_record_batch_get_schema (GArrowRecordBatch *record_batch
);
GArrowArray * garrow_record_batch_get_column (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]
GList *
garrow_record_batch_get_columns (GArrowRecordBatch *record_batch
);
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.
The returned string should be freed when 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
“record-batch”
property“record-batch” gpointer
The raw std::shared<arrow::RecordBatch> *.
Flags: Write / Construct Only