GArrowColumn

GArrowColumn — Column class

Functions

Properties

GArrowArray * array Read / Write / Construct Only
GArrowChunkedArray * chunked-array Read / Write / Construct Only
gpointer column Write / Construct Only
GArrowField * field Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowColumn

Description

GArrowColumn is a class for column. Column has a GArrowField and zero or more values. Values are GArrowChunkedArray.

Functions

garrow_column_new_array ()

GArrowColumn *
garrow_column_new_array (GArrowField *field,
                         GArrowArray *array);

Parameters

field

The metadata of the column.

 

array

The data of the column.

 

Returns

A newly created GArrowColumn.


garrow_column_new_chunked_array ()

GArrowColumn *
garrow_column_new_chunked_array (GArrowField *field,
                                 GArrowChunkedArray *chunked_array);

Parameters

field

The metadata of the column.

 

chunked_array

The data of the column.

 

Returns

A newly created GArrowColumn.


garrow_column_slice ()

GArrowColumn *
garrow_column_slice (GArrowColumn *column,
                     guint64 offset,
                     guint64 length);

Parameters

column

A GArrowColumn.

 

offset

The offset of sub GArrowColumn.

 

length

The length of sub GArrowColumn.

 

Returns

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

[transfer full]


garrow_column_equal ()

gboolean
garrow_column_equal (GArrowColumn *column,
                     GArrowColumn *other_column);

Parameters

column

A GArrowColumn.

 

other_column

A GArrowColumn to be compared.

 

Returns

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

Since: 0.4.0


garrow_column_get_length ()

guint64
garrow_column_get_length (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The number of data of the column.


garrow_column_get_n_nulls ()

guint64
garrow_column_get_n_nulls (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The number of nulls of the column.


garrow_column_get_field ()

GArrowField *
garrow_column_get_field (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The metadata of the column.

[transfer full]


garrow_column_get_name ()

const gchar *
garrow_column_get_name (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The name of the column.


garrow_column_get_data_type ()

GArrowDataType *
garrow_column_get_data_type (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The data type of the column.

[transfer full]


garrow_column_get_data ()

GArrowChunkedArray *
garrow_column_get_data (GArrowColumn *column);

Parameters

column

A GArrowColumn.

 

Returns

The data of the column.

[transfer full]


garrow_column_to_string ()

gchar *
garrow_column_to_string (GArrowColumn *column,
                         GError **error);

Parameters

column

A GArrowColumn.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The formatted column content or NULL on error.

The returned string should be freed when with g_free() when no longer needed.

[nullable][transfer full]

Since: 0.12.0

Types and Values

GARROW_TYPE_COLUMN

#define GARROW_TYPE_COLUMN (garrow_column_get_type())

struct GArrowColumnClass

struct GArrowColumnClass {
  GObjectClass parent_class;
};

GArrowColumn

typedef struct _GArrowColumn GArrowColumn;

Property Details

The “array” property

  “array”                    GArrowArray *

The array of the column.

Flags: Read / Write / Construct Only


The “chunked-array” property

  “chunked-array”            GArrowChunkedArray *

The chunked array of the column.

Flags: Read / Write / Construct Only


The “column” property

  “column”                   gpointer

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

Flags: Write / Construct Only


The “field” property

  “field”                    GArrowField *

The field of the column.

Flags: Read / Write / Construct Only