Basic array classes

Basic array classes

Functions

gboolean garrow_array_equal ()
gboolean garrow_array_equal_approx ()
gboolean garrow_array_equal_range ()
gboolean garrow_array_is_null ()
gboolean garrow_array_is_valid ()
gint64 garrow_array_get_length ()
gint64 garrow_array_get_offset ()
gint64 garrow_array_get_n_nulls ()
GArrowBuffer * garrow_array_get_null_bitmap ()
GArrowDataType * garrow_array_get_value_data_type ()
GArrowType garrow_array_get_value_type ()
GArrowArray * garrow_array_slice ()
gchar * garrow_array_to_string ()
GArrowArray * garrow_array_cast ()
GArrowArray * garrow_array_unique ()
GArrowArray * garrow_array_dictionary_encode ()
GArrowNullArray * garrow_null_array_new ()
GArrowBuffer * garrow_primitive_array_get_buffer ()
GArrowBooleanArray * garrow_boolean_array_new ()
gboolean garrow_boolean_array_get_value ()
gboolean * garrow_boolean_array_get_values ()
GArrowInt8Array * garrow_int8_array_new ()
gint8 garrow_int8_array_get_value ()
const gint8 * garrow_int8_array_get_values ()
GArrowUInt8Array * garrow_uint8_array_new ()
guint8 garrow_uint8_array_get_value ()
const guint8 * garrow_uint8_array_get_values ()
GArrowInt16Array * garrow_int16_array_new ()
gint16 garrow_int16_array_get_value ()
const gint16 * garrow_int16_array_get_values ()
GArrowUInt16Array * garrow_uint16_array_new ()
guint16 garrow_uint16_array_get_value ()
const guint16 * garrow_uint16_array_get_values ()
GArrowInt32Array * garrow_int32_array_new ()
gint32 garrow_int32_array_get_value ()
const gint32 * garrow_int32_array_get_values ()
GArrowUInt32Array * garrow_uint32_array_new ()
guint32 garrow_uint32_array_get_value ()
const guint32 * garrow_uint32_array_get_values ()
GArrowInt64Array * garrow_int64_array_new ()
gint64 garrow_int64_array_get_value ()
const gint64 * garrow_int64_array_get_values ()
GArrowUInt64Array * garrow_uint64_array_new ()
guint64 garrow_uint64_array_get_value ()
const guint64 * garrow_uint64_array_get_values ()
GArrowFloatArray * garrow_float_array_new ()
gfloat garrow_float_array_get_value ()
const gfloat * garrow_float_array_get_values ()
GArrowDoubleArray * garrow_double_array_new ()
gdouble garrow_double_array_get_value ()
const gdouble * garrow_double_array_get_values ()
GArrowBinaryArray * garrow_binary_array_new ()
GBytes * garrow_binary_array_get_value ()
GArrowBuffer * garrow_binary_array_get_buffer ()
GArrowBuffer * garrow_binary_array_get_offsets_buffer ()
GArrowStringArray * garrow_string_array_new ()
gchar * garrow_string_array_get_string ()
GArrowDate32Array * garrow_date32_array_new ()
gint32 garrow_date32_array_get_value ()
const gint32 * garrow_date32_array_get_values ()
GArrowDate64Array * garrow_date64_array_new ()
gint64 garrow_date64_array_get_value ()
const gint64 * garrow_date64_array_get_values ()
GArrowTimestampArray * garrow_timestamp_array_new ()
gint64 garrow_timestamp_array_get_value ()
const gint64 * garrow_timestamp_array_get_values ()
GArrowTime32Array * garrow_time32_array_new ()
gint32 garrow_time32_array_get_value ()
const gint32 * garrow_time32_array_get_values ()
GArrowTime64Array * garrow_time64_array_new ()
gint64 garrow_time64_array_get_value ()
const gint64 * garrow_time64_array_get_values ()

Properties

gpointer array Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowArray
        ├── GArrowBinaryArray
        ├── GArrowPrimitiveArray
        ├── GArrowDictionaryArray
        ├── GArrowListArray
        ├── GArrowNullArray
        ├── GArrowStructArray
        ├── GArrowBinaryArray
           ╰── GArrowStringArray
        ├── GArrowNullArray
        ╰── GArrowPrimitiveArray
            ├── GArrowBooleanArray
            ├── GArrowDate32Array
            ├── GArrowDate64Array
            ├── GArrowDoubleArray
            ├── GArrowFloatArray
            ├── GArrowInt16Array
            ├── GArrowInt32Array
            ├── GArrowInt64Array
            ├── GArrowInt8Array
            ├── GArrowTime32Array
            ├── GArrowTime64Array
            ├── GArrowTimestampArray
            ├── GArrowUInt16Array
            ├── GArrowUInt32Array
            ├── GArrowUInt64Array
            ╰── GArrowUInt8Array

Includes

#include <arrow-glib/arrow-glib.h>

Description

GArrowArray is a base class for all array classes such as GArrowBooleanArray.

All array classes are immutable. You need to use binary data or array builder to create a new array except GArrowNullArray. If you have binary data that uses Arrow format data, you can create a new array with the binary data as GArrowBuffer object. If you don't have binary data, you can use array builder class such as GArrowBooleanArrayBuilder that creates Arrow format data internally and a new array from the data.

GArrowNullArray is a class for null array. It can store zero or more null values. You need to specify an array length to create a new array.

GArrowBooleanArray is a class for binary array. It can store zero or more boolean data. If you don't have Arrow format data, you need to use GArrowBooleanArrayBuilder to create a new array.

GArrowInt8Array is a class for 8-bit integer array. It can store zero or more 8-bit integer data. If you don't have Arrow format data, you need to use GArrowInt8ArrayBuilder to create a new array.

GArrowUInt8Array is a class for 8-bit unsigned integer array. It can store zero or more 8-bit unsigned integer data. If you don't have Arrow format data, you need to use GArrowUInt8ArrayBuilder to create a new array.

GArrowInt16Array is a class for 16-bit integer array. It can store zero or more 16-bit integer data. If you don't have Arrow format data, you need to use GArrowInt16ArrayBuilder to create a new array.

GArrowUInt16Array is a class for 16-bit unsigned integer array. It can store zero or more 16-bit unsigned integer data. If you don't have Arrow format data, you need to use GArrowUInt16ArrayBuilder to create a new array.

GArrowInt32Array is a class for 32-bit integer array. It can store zero or more 32-bit integer data. If you don't have Arrow format data, you need to use GArrowInt32ArrayBuilder to create a new array.

GArrowUInt32Array is a class for 32-bit unsigned integer array. It can store zero or more 32-bit unsigned integer data. If you don't have Arrow format data, you need to use GArrowUInt32ArrayBuilder to create a new array.

GArrowInt64Array is a class for 64-bit integer array. It can store zero or more 64-bit integer data. If you don't have Arrow format data, you need to use GArrowInt64ArrayBuilder to create a new array.

GArrowUInt64Array is a class for 64-bit unsigned integer array. It can store zero or more 64-bit unsigned integer data. If you don't have Arrow format data, you need to use GArrowUInt64ArrayBuilder to create a new array.

GArrowFloatArray is a class for 32-bit floating point array. It can store zero or more 32-bit floating data. If you don't have Arrow format data, you need to use GArrowFloatArrayBuilder to create a new array.

GArrowDoubleArray is a class for 64-bit floating point array. It can store zero or more 64-bit floating data. If you don't have Arrow format data, you need to use GArrowDoubleArrayBuilder to create a new array.

GArrowBinaryArray is a class for binary array. It can store zero or more binary data. If you don't have Arrow format data, you need to use GArrowBinaryArrayBuilder to create a new array.

GArrowStringArray is a class for UTF-8 encoded string array. It can store zero or more UTF-8 encoded string data. If you don't have Arrow format data, you need to use GArrowStringArrayBuilder to create a new array.

GArrowDate32Array is a class for the number of days since UNIX epoch in 32-bit signed integer array. It can store zero or more date data. If you don't have Arrow format data, you need to use GArrowDate32ArrayBuilder to create a new array.

GArrowDate64Array is a class for the number of milliseconds since UNIX epoch in 64-bit signed integer array. It can store zero or more date data. If you don't have Arrow format data, you need to use GArrowDate64ArrayBuilder to create a new array.

GArrowTimestampArray is a class for the number of seconds/milliseconds/microseconds/nanoseconds since UNIX epoch in 64-bit signed integer array. It can store zero or more timestamp data. If you don't have Arrow format data, you need to use GArrowTimestampArrayBuilder to create a new array.

GArrowTime32Array is a class for the number of seconds or milliseconds since midnight in 32-bit signed integer array. It can store zero or more time data. If you don't have Arrow format data, you need to use GArrowTime32ArrayBuilder to create a new array.

GArrowTime64Array is a class for the number of microseconds or nanoseconds since midnight in 64-bit signed integer array. It can store zero or more time data. If you don't have Arrow format data, you need to use GArrowTime64ArrayBuilder to create a new array.

Functions

garrow_array_equal ()

gboolean
garrow_array_equal (GArrowArray *array,
                    GArrowArray *other_array);

Parameters

array

A GArrowArray.

 

other_array

A GArrowArray to be compared.

 

Returns

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

Since: 0.4.0


garrow_array_equal_approx ()

gboolean
garrow_array_equal_approx (GArrowArray *array,
                           GArrowArray *other_array);

Parameters

array

A GArrowArray.

 

other_array

A GArrowArray to be compared.

 

Returns

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

Since: 0.4.0


garrow_array_equal_range ()

gboolean
garrow_array_equal_range (GArrowArray *array,
                          gint64 start_index,
                          GArrowArray *other_array,
                          gint64 other_start_index,
                          gint64 end_index);

Parameters

array

A GArrowArray.

 

start_index

The start index of array to be used.

 

other_array

A GArrowArray to be compared.

 

other_start_index

The start index of other_array to be used.

 

end_index

The end index of array to be used. The end index of other_array is "other_start_index + (end_index - start_index )".

 

Returns

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

Since: 0.4.0


garrow_array_is_null ()

gboolean
garrow_array_is_null (GArrowArray *array,
                      gint64 i);

Parameters

array

A GArrowArray.

 

i

The index of the target value.

 

Returns

Whether the i-th value is null or not.

Since: 0.3.0


garrow_array_is_valid ()

gboolean
garrow_array_is_valid (GArrowArray *array,
                       gint64 i);

Parameters

array

A GArrowArray.

 

i

The index of the target value.

 

Returns

Whether the i-th value is valid (not null) or not.

Since: 0.8.0


garrow_array_get_length ()

gint64
garrow_array_get_length (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The number of rows in the array.


garrow_array_get_offset ()

gint64
garrow_array_get_offset (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The number of values in the array.


garrow_array_get_n_nulls ()

gint64
garrow_array_get_n_nulls (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The number of NULLs in the array.


garrow_array_get_null_bitmap ()

GArrowBuffer *
garrow_array_get_null_bitmap (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The bitmap that indicates null value indexes for the array as GArrowBuffer or NULL when garrow_array_get_n_nulls() returns 0.

[transfer full][nullable]

Since: 0.3.0


garrow_array_get_value_data_type ()

GArrowDataType *
garrow_array_get_value_data_type (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The GArrowDataType for each value of the array.

[transfer full]

Since: 0.3.0


garrow_array_get_value_type ()

GArrowType
garrow_array_get_value_type (GArrowArray *array);

Parameters

array

A GArrowArray.

 

Returns

The GArrowType for each value of the array.

Since: 0.3.0


garrow_array_slice ()

GArrowArray *
garrow_array_slice (GArrowArray *array,
                    gint64 offset,
                    gint64 length);

Parameters

array

A GArrowArray.

 

offset

The offset of sub GArrowArray.

 

length

The length of sub GArrowArray.

 

Returns

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

[transfer full]


garrow_array_to_string ()

gchar *
garrow_array_to_string (GArrowArray *array,
                        GError **error);

Parameters

array

A GArrowArray.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The formatted array content or NULL on error.

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

[nullable]

Since: 0.4.0


garrow_array_cast ()

GArrowArray *
garrow_array_cast (GArrowArray *array,
                   GArrowDataType *target_data_type,
                   GArrowCastOptions *options,
                   GError **error);

Parameters

array

A GArrowArray.

 

target_data_type

A GArrowDataType of cast target data.

 

options

A GArrowCastOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created casted array on success, NULL on error.

[nullable][transfer full]

Since: 0.7.0


garrow_array_unique ()

GArrowArray *
garrow_array_unique (GArrowArray *array,
                     GError **error);

Parameters

array

A GArrowArray.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created unique elements array on success, NULL on error.

[nullable][transfer full]

Since: 0.8.0


garrow_array_dictionary_encode ()

GArrowArray *
garrow_array_dictionary_encode (GArrowArray *array,
                                GError **error);

Parameters

array

A GArrowArray.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created GArrowDictionarArray for the array on success, NULL on error.

[nullable][transfer full]

Since: 0.8.0


garrow_null_array_new ()

GArrowNullArray *
garrow_null_array_new (gint64 length);

Parameters

length

An array length.

 

Returns

A newly created GArrowNullArray.


garrow_primitive_array_get_buffer ()

GArrowBuffer *
garrow_primitive_array_get_buffer (GArrowPrimitiveArray *array);

Parameters

array

A GArrowPrimitiveArray.

 

Returns

The data of the array as GArrowBuffer.

[transfer full]


garrow_boolean_array_new ()

GArrowBooleanArray *
garrow_boolean_array_new (gint64 length,
                          GArrowBuffer *data,
                          GArrowBuffer *null_bitmap,
                          gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowBooleanArray.

Since: 0.4.0


garrow_boolean_array_get_value ()

gboolean
garrow_boolean_array_get_value (GArrowBooleanArray *array,
                                gint64 i);

Parameters

array

A GArrowBooleanArray.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_boolean_array_get_values ()

gboolean *
garrow_boolean_array_get_values (GArrowBooleanArray *array,
                                 gint64 *length);

Parameters

array

A GArrowBooleanArray.

 

length

The number of values.

[out]

Returns

The raw boolean values.

It should be freed with g_free() when no longer needed.

[array length=length]


garrow_int8_array_new ()

GArrowInt8Array *
garrow_int8_array_new (gint64 length,
                       GArrowBuffer *data,
                       GArrowBuffer *null_bitmap,
                       gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowInt8Array.

Since: 0.4.0


garrow_int8_array_get_value ()

gint8
garrow_int8_array_get_value (GArrowInt8Array *array,
                             gint64 i);

Parameters

array

A GArrowInt8Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_int8_array_get_values ()

const gint8 *
garrow_int8_array_get_values (GArrowInt8Array *array,
                              gint64 *length);

Parameters

array

A GArrowInt8Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_uint8_array_new ()

GArrowUInt8Array *
garrow_uint8_array_new (gint64 length,
                        GArrowBuffer *data,
                        GArrowBuffer *null_bitmap,
                        gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowUInt8Array.

Since: 0.4.0


garrow_uint8_array_get_value ()

guint8
garrow_uint8_array_get_value (GArrowUInt8Array *array,
                              gint64 i);

Parameters

array

A GArrowUInt8Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_uint8_array_get_values ()

const guint8 *
garrow_uint8_array_get_values (GArrowUInt8Array *array,
                               gint64 *length);

Parameters

array

A GArrowUInt8Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_int16_array_new ()

GArrowInt16Array *
garrow_int16_array_new (gint64 length,
                        GArrowBuffer *data,
                        GArrowBuffer *null_bitmap,
                        gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowInt16Array.

Since: 0.4.0


garrow_int16_array_get_value ()

gint16
garrow_int16_array_get_value (GArrowInt16Array *array,
                              gint64 i);

Parameters

array

A GArrowInt16Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_int16_array_get_values ()

const gint16 *
garrow_int16_array_get_values (GArrowInt16Array *array,
                               gint64 *length);

Parameters

array

A GArrowInt16Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_uint16_array_new ()

GArrowUInt16Array *
garrow_uint16_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowUInt16Array.

Since: 0.4.0


garrow_uint16_array_get_value ()

guint16
garrow_uint16_array_get_value (GArrowUInt16Array *array,
                               gint64 i);

Parameters

array

A GArrowUInt16Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_uint16_array_get_values ()

const guint16 *
garrow_uint16_array_get_values (GArrowUInt16Array *array,
                                gint64 *length);

Parameters

array

A GArrowUInt16Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_int32_array_new ()

GArrowInt32Array *
garrow_int32_array_new (gint64 length,
                        GArrowBuffer *data,
                        GArrowBuffer *null_bitmap,
                        gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowInt32Array.

Since: 0.4.0


garrow_int32_array_get_value ()

gint32
garrow_int32_array_get_value (GArrowInt32Array *array,
                              gint64 i);

Parameters

array

A GArrowInt32Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_int32_array_get_values ()

const gint32 *
garrow_int32_array_get_values (GArrowInt32Array *array,
                               gint64 *length);

Parameters

array

A GArrowInt32Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_uint32_array_new ()

GArrowUInt32Array *
garrow_uint32_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowUInt32Array.

Since: 0.4.0


garrow_uint32_array_get_value ()

guint32
garrow_uint32_array_get_value (GArrowUInt32Array *array,
                               gint64 i);

Parameters

array

A GArrowUInt32Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_uint32_array_get_values ()

const guint32 *
garrow_uint32_array_get_values (GArrowUInt32Array *array,
                                gint64 *length);

Parameters

array

A GArrowUInt32Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_int64_array_new ()

GArrowInt64Array *
garrow_int64_array_new (gint64 length,
                        GArrowBuffer *data,
                        GArrowBuffer *null_bitmap,
                        gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowInt64Array.

Since: 0.4.0


garrow_int64_array_get_value ()

gint64
garrow_int64_array_get_value (GArrowInt64Array *array,
                              gint64 i);

Parameters

array

A GArrowInt64Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_int64_array_get_values ()

const gint64 *
garrow_int64_array_get_values (GArrowInt64Array *array,
                               gint64 *length);

Parameters

array

A GArrowInt64Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_uint64_array_new ()

GArrowUInt64Array *
garrow_uint64_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowUInt64Array.

Since: 0.4.0


garrow_uint64_array_get_value ()

guint64
garrow_uint64_array_get_value (GArrowUInt64Array *array,
                               gint64 i);

Parameters

array

A GArrowUInt64Array.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_uint64_array_get_values ()

const guint64 *
garrow_uint64_array_get_values (GArrowUInt64Array *array,
                                gint64 *length);

Parameters

array

A GArrowUInt64Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_float_array_new ()

GArrowFloatArray *
garrow_float_array_new (gint64 length,
                        GArrowBuffer *data,
                        GArrowBuffer *null_bitmap,
                        gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowFloatArray.

Since: 0.4.0


garrow_float_array_get_value ()

gfloat
garrow_float_array_get_value (GArrowFloatArray *array,
                              gint64 i);

Parameters

array

A GArrowFloatArray.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_float_array_get_values ()

const gfloat *
garrow_float_array_get_values (GArrowFloatArray *array,
                               gint64 *length);

Parameters

array

A GArrowFloatArray.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_double_array_new ()

GArrowDoubleArray *
garrow_double_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowDoubleArray.

Since: 0.4.0


garrow_double_array_get_value ()

gdouble
garrow_double_array_get_value (GArrowDoubleArray *array,
                               gint64 i);

Parameters

array

A GArrowDoubleArray.

 

i

The index of the target value.

 

Returns

The i-th value.


garrow_double_array_get_values ()

const gdouble *
garrow_double_array_get_values (GArrowDoubleArray *array,
                                gint64 *length);

Parameters

array

A GArrowDoubleArray.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]


garrow_binary_array_new ()

GArrowBinaryArray *
garrow_binary_array_new (gint64 length,
                         GArrowBuffer *value_offsets,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

value_offsets

The value offsets of data in Arrow format.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowBinaryArray.

Since: 0.4.0


garrow_binary_array_get_value ()

GBytes *
garrow_binary_array_get_value (GArrowBinaryArray *array,
                               gint64 i);

Parameters

array

A GArrowBinaryArray.

 

i

The index of the target value.

 

Returns

The i-th value.

[transfer full]


garrow_binary_array_get_buffer ()

GArrowBuffer *
garrow_binary_array_get_buffer (GArrowBinaryArray *array);

Parameters

array

A GArrowBinaryArray.

 

Returns

The data of the array as GArrowBuffer.

[transfer full]


garrow_binary_array_get_offsets_buffer ()

GArrowBuffer *
garrow_binary_array_get_offsets_buffer
                               (GArrowBinaryArray *array);

Parameters

array

A GArrowBinaryArray.

 

Returns

The offsets of the array as GArrowBuffer.

[transfer full]


garrow_string_array_new ()

GArrowStringArray *
garrow_string_array_new (gint64 length,
                         GArrowBuffer *value_offsets,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

value_offsets

The value offsets of data in Arrow format.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowStringArray.

Since: 0.4.0


garrow_string_array_get_string ()

gchar *
garrow_string_array_get_string (GArrowStringArray *array,
                                gint64 i);

Parameters

array

A GArrowStringArray.

 

i

The index of the target value.

 

Returns

The i-th UTF-8 encoded string.


garrow_date32_array_new ()

GArrowDate32Array *
garrow_date32_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowDate32Array.

Since: 0.7.0


garrow_date32_array_get_value ()

gint32
garrow_date32_array_get_value (GArrowDate32Array *array,
                               gint64 i);

Parameters

array

A GArrowDate32Array.

 

i

The index of the target value.

 

Returns

The i-th value.

Since: 0.7.0


garrow_date32_array_get_values ()

const gint32 *
garrow_date32_array_get_values (GArrowDate32Array *array,
                                gint64 *length);

Parameters

array

A GArrowDate32Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]

Since: 0.7.0


garrow_date64_array_new ()

GArrowDate64Array *
garrow_date64_array_new (gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowDate64Array.

Since: 0.7.0


garrow_date64_array_get_value ()

gint64
garrow_date64_array_get_value (GArrowDate64Array *array,
                               gint64 i);

Parameters

array

A GArrowDate64Array.

 

i

The index of the target value.

 

Returns

The i-th value.

Since: 0.7.0


garrow_date64_array_get_values ()

const gint64 *
garrow_date64_array_get_values (GArrowDate64Array *array,
                                gint64 *length);

Parameters

array

A GArrowDate64Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]

Since: 0.7.0


garrow_timestamp_array_new ()

GArrowTimestampArray *
garrow_timestamp_array_new (GArrowTimestampDataType *data_type,
                            gint64 length,
                            GArrowBuffer *data,
                            GArrowBuffer *null_bitmap,
                            gint64 n_nulls);

Parameters

data_type

The GArrowTimestampDataType.

 

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowTimestampArray.

Since: 0.7.0


garrow_timestamp_array_get_value ()

gint64
garrow_timestamp_array_get_value (GArrowTimestampArray *array,
                                  gint64 i);

Parameters

array

A GArrowTimestampArray.

 

i

The index of the target value.

 

Returns

The i-th value.

Since: 0.7.0


garrow_timestamp_array_get_values ()

const gint64 *
garrow_timestamp_array_get_values (GArrowTimestampArray *array,
                                   gint64 *length);

Parameters

array

A GArrowTimestampArray.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]

Since: 0.7.0


garrow_time32_array_new ()

GArrowTime32Array *
garrow_time32_array_new (GArrowTime32DataType *data_type,
                         gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

data_type

The GArrowTime32DataType.

 

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowTime32Array.

Since: 0.7.0


garrow_time32_array_get_value ()

gint32
garrow_time32_array_get_value (GArrowTime32Array *array,
                               gint64 i);

Parameters

array

A GArrowTime32Array.

 

i

The index of the target value.

 

Returns

The i-th value.

Since: 0.7.0


garrow_time32_array_get_values ()

const gint32 *
garrow_time32_array_get_values (GArrowTime32Array *array,
                                gint64 *length);

Parameters

array

A GArrowTime32Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]

Since: 0.7.0


garrow_time64_array_new ()

GArrowTime64Array *
garrow_time64_array_new (GArrowTime64DataType *data_type,
                         gint64 length,
                         GArrowBuffer *data,
                         GArrowBuffer *null_bitmap,
                         gint64 n_nulls);

Parameters

data_type

The GArrowTime64DataType.

 

length

The number of elements.

 

data

The binary data in Arrow format of the array.

 

null_bitmap

The bitmap that shows null elements. The N-th element is null when the N-th bit is 0, not null otherwise. If the array has no null elements, the bitmap must be NULL and n_nulls is 0.

[nullable]

n_nulls

The number of null elements. If -1 is specified, the number of nulls are computed from null_bitmap .

 

Returns

A newly created GArrowTime64Array.

Since: 0.7.0


garrow_time64_array_get_value ()

gint64
garrow_time64_array_get_value (GArrowTime64Array *array,
                               gint64 i);

Parameters

array

A GArrowTime64Array.

 

i

The index of the target value.

 

Returns

The i-th value.

Since: 0.7.0


garrow_time64_array_get_values ()

const gint64 *
garrow_time64_array_get_values (GArrowTime64Array *array,
                                gint64 *length);

Parameters

array

A GArrowTime64Array.

 

length

The number of values.

[out]

Returns

The raw values.

[array length=length]

Since: 0.7.0

Types and Values

GARROW_TYPE_ARRAY

#define GARROW_TYPE_ARRAY (garrow_array_get_type())

struct GArrowArrayClass

struct GArrowArrayClass {
  GObjectClass parent_class;
};

struct GArrowNullArray

struct GArrowNullArray;

It wraps arrow::NullArray.


struct GArrowPrimitiveArray

struct GArrowPrimitiveArray;

It wraps arrow::PrimitiveArray.


struct GArrowBooleanArray

struct GArrowBooleanArray;

It wraps arrow::BooleanArray.


struct GArrowInt8Array

struct GArrowInt8Array;

It wraps arrow::Int8Array.


struct GArrowUInt8Array

struct GArrowUInt8Array;

It wraps arrow::UInt8Array.


struct GArrowInt16Array

struct GArrowInt16Array;

It wraps arrow::Int16Array.


struct GArrowUInt16Array

struct GArrowUInt16Array;

It wraps arrow::UInt16Array.


struct GArrowInt32Array

struct GArrowInt32Array;

It wraps arrow::Int32Array.


struct GArrowUInt32Array

struct GArrowUInt32Array;

It wraps arrow::UInt32Array.


struct GArrowInt64Array

struct GArrowInt64Array;

It wraps arrow::Int64Array.


struct GArrowUInt64Array

struct GArrowUInt64Array;

It wraps arrow::UInt64Array.


struct GArrowFloatArray

struct GArrowFloatArray;

It wraps arrow::FloatArray.


struct GArrowDoubleArray

struct GArrowDoubleArray;

It wraps arrow::DoubleArray.


struct GArrowBinaryArray

struct GArrowBinaryArray;

It wraps arrow::BinaryArray.


struct GArrowStringArray

struct GArrowStringArray;

It wraps arrow::StringArray.


struct GArrowDate32Array

struct GArrowDate32Array;

It wraps arrow::Date32Array.


struct GArrowDate64Array

struct GArrowDate64Array;

It wraps arrow::Date64Array.


struct GArrowTimestampArray

struct GArrowTimestampArray;

It wraps arrow::TimestampArray.


struct GArrowTime32Array

struct GArrowTime32Array;

It wraps arrow::Time32Array.


struct GArrowTime64Array

struct GArrowTime64Array;

It wraps arrow::Time64Array.


GArrowArray

typedef struct _GArrowArray GArrowArray;

Property Details

The “array” property

  “array”                    gpointer

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

Flags: Write / Construct Only