GArrowRecordBatch

GArrowRecordBatch — Record batch class

Functions

Properties

gpointer record-batch Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowRecordBatch

Description

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.

Functions

garrow_record_batch_new ()

GArrowRecordBatch *
garrow_record_batch_new (GArrowSchema *schema,
                         guint32 n_rows,
                         GList *columns);

Parameters

schema

The schema of the record batch.

 

n_rows

The number of the rows in the record batch.

 

columns

The columns in the record batch.

[element-type GArrowArray]

Returns

A newly created GArrowRecordBatch.


garrow_record_batch_equal ()

gboolean
garrow_record_batch_equal (GArrowRecordBatch *record_batch,
                           GArrowRecordBatch *other_record_batch);

Parameters

record_batch

A GArrowRecordBatch.

 

other_record_batch

A GArrowRecordBatch to be compared.

 

Returns

TRUE if both of them have the same data, FALSE otherwise.

Since 0.4.0


garrow_record_batch_get_schema ()

GArrowSchema *
garrow_record_batch_get_schema (GArrowRecordBatch *record_batch);

Parameters

record_batch

A GArrowRecordBatch.

 

Returns

The schema of the record batch.

[transfer full]


garrow_record_batch_get_column ()

GArrowArray *
garrow_record_batch_get_column (GArrowRecordBatch *record_batch,
                                guint i);

Parameters

record_batch

A GArrowRecordBatch.

 

i

The index of the target column.

 

Returns

The i-th column in the record batch.

[transfer full]


garrow_record_batch_get_columns ()

GList *
garrow_record_batch_get_columns (GArrowRecordBatch *record_batch);

Parameters

record_batch

A GArrowRecordBatch.

 

Returns

The columns in the record batch.

[element-type GArrowArray][transfer full]


garrow_record_batch_get_column_name ()

const gchar *
garrow_record_batch_get_column_name (GArrowRecordBatch *record_batch,
                                     guint i);

Parameters

record_batch

A GArrowRecordBatch.

 

i

The index of the target column.

 

Returns

The name of the i-th column in the record batch.


garrow_record_batch_get_n_columns ()

guint
garrow_record_batch_get_n_columns (GArrowRecordBatch *record_batch);

Parameters

record_batch

A GArrowRecordBatch.

 

Returns

The number of columns in the record batch.


garrow_record_batch_get_n_rows ()

gint64
garrow_record_batch_get_n_rows (GArrowRecordBatch *record_batch);

Parameters

record_batch

A GArrowRecordBatch.

 

Returns

The number of rows in the record batch.


garrow_record_batch_slice ()

GArrowRecordBatch *
garrow_record_batch_slice (GArrowRecordBatch *record_batch,
                           gint64 offset,
                           gint64 length);

Parameters

record_batch

A GArrowRecordBatch.

 

offset

The offset of sub GArrowRecordBatch.

 

length

The length of sub GArrowRecordBatch.

 

Returns

The sub GArrowRecordBatch. It covers only from offset to offset + length range. The sub GArrowRecordBatch shares values with the base GArrowRecordBatch.

[transfer full]


garrow_record_batch_to_string ()

gchar *
garrow_record_batch_to_string (GArrowRecordBatch *record_batch,
                               GError **error);

Parameters

record_batch

A GArrowRecordBatch.

 

error

Return location for a GError or NULL.

[nullable]

Returns

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

Types and Values

struct GArrowRecordBatch

struct GArrowRecordBatch;

It wraps arrow::RecordBatch.

Property Details

The “record-batch” property

  “record-batch”             gpointer

The raw std::shared<arrow::RecordBatch> *.

Flags: Write / Construct Only