Basic data type classes

Basic data type classes

Functions

GArrowDataType * garrow_data_type_import ()
gpointer garrow_data_type_export ()
gboolean garrow_data_type_equal ()
gchar * garrow_data_type_to_string ()
GArrowType garrow_data_type_get_id ()
gchar * garrow_data_type_get_name ()
gint garrow_fixed_width_data_type_get_bit_width ()
GArrowNullDataType * garrow_null_data_type_new ()
GArrowBooleanDataType * garrow_boolean_data_type_new ()
gboolean garrow_integer_data_type_is_signed ()
GArrowInt8DataType * garrow_int8_data_type_new ()
GArrowUInt8DataType * garrow_uint8_data_type_new ()
GArrowInt16DataType * garrow_int16_data_type_new ()
GArrowUInt16DataType * garrow_uint16_data_type_new ()
GArrowInt32DataType * garrow_int32_data_type_new ()
GArrowUInt32DataType * garrow_uint32_data_type_new ()
GArrowInt64DataType * garrow_int64_data_type_new ()
GArrowUInt64DataType * garrow_uint64_data_type_new ()
GArrowFloatDataType * garrow_float_data_type_new ()
GArrowDoubleDataType * garrow_double_data_type_new ()
GArrowBinaryDataType * garrow_binary_data_type_new ()
GArrowFixedSizeBinaryDataType * garrow_fixed_size_binary_data_type_new ()
gint32 garrow_fixed_size_binary_data_type_get_byte_width ()
GArrowLargeBinaryDataType * garrow_large_binary_data_type_new ()
GArrowStringDataType * garrow_string_data_type_new ()
GArrowLargeStringDataType * garrow_large_string_data_type_new ()
GArrowDate32DataType * garrow_date32_data_type_new ()
GArrowDate64DataType * garrow_date64_data_type_new ()
GArrowTimestampDataType * garrow_timestamp_data_type_new ()
GArrowTimeUnit garrow_timestamp_data_type_get_unit ()
GArrowTimeUnit garrow_time_data_type_get_unit ()
GArrowTime32DataType * garrow_time32_data_type_new ()
GArrowTime64DataType * garrow_time64_data_type_new ()
GArrowIntervalType garrow_interval_data_type_get_interval_type ()
GArrowMonthIntervalDataType * garrow_month_interval_data_type_new ()
GArrowDayTimeIntervalDataType * garrow_day_time_interval_data_type_new ()
GArrowMonthDayNanoIntervalDataType * garrow_month_day_nano_interval_data_type_new ()
GArrowDecimalDataType * garrow_decimal_data_type_new ()
gint32 garrow_decimal_data_type_get_precision ()
gint32 garrow_decimal_data_type_get_scale ()
gint32 garrow_decimal128_data_type_max_precision ()
GArrowDecimal128DataType * garrow_decimal128_data_type_new ()
gint32 garrow_decimal256_data_type_max_precision ()
GArrowDecimal256DataType * garrow_decimal256_data_type_new ()
gchar * garrow_extension_data_type_get_extension_name ()
GArrowExtensionArray * garrow_extension_data_type_wrap_array ()
GArrowChunkedArray * garrow_extension_data_type_wrap_chunked_array ()
GArrowExtensionDataTypeRegistry * garrow_extension_data_type_registry_default ()
gboolean garrow_extension_data_type_registry_register ()
gboolean garrow_extension_data_type_registry_unregister ()
GArrowExtensionDataType * garrow_extension_data_type_registry_lookup ()

Properties

gpointer data-type Write / Construct Only
GArrowDataType * storage-data-type Read / Write / Construct Only
gpointer registry Write / Construct Only

Types and Values

#define GARROW_TYPE_DATA_TYPE
struct GArrowDataTypeClass
#define GARROW_TYPE_FIXED_WIDTH_DATA_TYPE
struct GArrowFixedWidthDataTypeClass
#define GARROW_TYPE_NULL_DATA_TYPE
struct GArrowNullDataTypeClass
#define GARROW_TYPE_BOOLEAN_DATA_TYPE
struct GArrowBooleanDataTypeClass
#define GARROW_TYPE_NUMERIC_DATA_TYPE
struct GArrowNumericDataTypeClass
#define GARROW_TYPE_INTEGER_DATA_TYPE
struct GArrowIntegerDataTypeClass
#define GARROW_TYPE_INT8_DATA_TYPE
struct GArrowInt8DataTypeClass
#define GARROW_TYPE_UINT8_DATA_TYPE
struct GArrowUInt8DataTypeClass
#define GARROW_TYPE_INT16_DATA_TYPE
struct GArrowInt16DataTypeClass
#define GARROW_TYPE_UINT16_DATA_TYPE
struct GArrowUInt16DataTypeClass
#define GARROW_TYPE_INT32_DATA_TYPE
struct GArrowInt32DataTypeClass
#define GARROW_TYPE_UINT32_DATA_TYPE
struct GArrowUInt32DataTypeClass
#define GARROW_TYPE_INT64_DATA_TYPE
struct GArrowInt64DataTypeClass
#define GARROW_TYPE_UINT64_DATA_TYPE
struct GArrowUInt64DataTypeClass
#define GARROW_TYPE_FLOATING_POINT_DATA_TYPE
struct GArrowFloatingPointDataTypeClass
#define GARROW_TYPE_FLOAT_DATA_TYPE
struct GArrowFloatDataTypeClass
#define GARROW_TYPE_DOUBLE_DATA_TYPE
struct GArrowDoubleDataTypeClass
#define GARROW_TYPE_BINARY_DATA_TYPE
struct GArrowBinaryDataTypeClass
#define GARROW_TYPE_FIXED_SIZE_BINARY_DATA_TYPE
struct GArrowFixedSizeBinaryDataTypeClass
#define GARROW_TYPE_LARGE_BINARY_DATA_TYPE
struct GArrowLargeBinaryDataTypeClass
#define GARROW_TYPE_STRING_DATA_TYPE
struct GArrowStringDataTypeClass
#define GARROW_TYPE_LARGE_STRING_DATA_TYPE
struct GArrowLargeStringDataTypeClass
#define GARROW_TYPE_TEMPORAL_DATA_TYPE
struct GArrowTemporalDataTypeClass
#define GARROW_TYPE_DATE32_DATA_TYPE
struct GArrowDate32DataTypeClass
#define GARROW_TYPE_DATE64_DATA_TYPE
struct GArrowDate64DataTypeClass
#define GARROW_TYPE_TIMESTAMP_DATA_TYPE
struct GArrowTimestampDataTypeClass
#define GARROW_TYPE_TIME_DATA_TYPE
struct GArrowTimeDataTypeClass
#define GARROW_TYPE_TIME32_DATA_TYPE
struct GArrowTime32DataTypeClass
#define GARROW_TYPE_TIME64_DATA_TYPE
struct GArrowTime64DataTypeClass
#define GARROW_TYPE_INTERVAL_DATA_TYPE
struct GArrowIntervalDataTypeClass
#define GARROW_TYPE_MONTH_INTERVAL_DATA_TYPE
struct GArrowMonthIntervalDataTypeClass
#define GARROW_TYPE_DAY_TIME_INTERVAL_DATA_TYPE
struct GArrowDayTimeIntervalDataTypeClass
#define GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_DATA_TYPE
struct GArrowMonthDayNanoIntervalDataTypeClass
#define GARROW_TYPE_DECIMAL_DATA_TYPE
struct GArrowDecimalDataTypeClass
#define GARROW_TYPE_DECIMAL128_DATA_TYPE
struct GArrowDecimal128DataTypeClass
#define GARROW_TYPE_DECIMAL256_DATA_TYPE
struct GArrowDecimal256DataTypeClass
#define GARROW_TYPE_EXTENSION_DATA_TYPE
struct GArrowExtensionDataTypeClass
#define GARROW_TYPE_EXTENSION_DATA_TYPE_REGISTRY
struct GArrowExtensionDataTypeRegistryClass
  GArrowBinaryDataType
  GArrowBooleanDataType
  GArrowDataType
  GArrowDate32DataType
  GArrowDate64DataType
  GArrowDayTimeIntervalDataType
  GArrowDecimal128DataType
  GArrowDecimal256DataType
  GArrowDecimalDataType
  GArrowDoubleDataType
  GArrowExtensionDataType
  GArrowExtensionDataTypeRegistry
  GArrowFixedSizeBinaryDataType
  GArrowFixedWidthDataType
  GArrowFloatDataType
  GArrowFloatingPointDataType
  GArrowInt16DataType
  GArrowInt32DataType
  GArrowInt64DataType
  GArrowInt8DataType
  GArrowIntegerDataType
  GArrowIntervalDataType
  GArrowLargeBinaryDataType
  GArrowLargeStringDataType
  GArrowMonthDayNanoIntervalDataType
  GArrowMonthIntervalDataType
  GArrowNullDataType
  GArrowNumericDataType
  GArrowStringDataType
  GArrowTemporalDataType
  GArrowTime32DataType
  GArrowTime64DataType
  GArrowTimeDataType
  GArrowTimestampDataType
  GArrowUInt16DataType
  GArrowUInt32DataType
  GArrowUInt64DataType
  GArrowUInt8DataType

Object Hierarchy

    GObject
    ├── GArrowDataType
       ├── GArrowBinaryDataType
       ├── GArrowFixedWidthDataType
          ├── GArrowBooleanDataType
          ├── GArrowTemporalDataType
             ├── GArrowDate32DataType
             ├── GArrowDate64DataType
             ├── GArrowIntervalDataType
             ├── GArrowTimeDataType
                ├── GArrowTime32DataType
                ├── GArrowTime64DataType
                ├── GArrowTime32DataType
                ╰── GArrowTime64DataType
             ╰── GArrowTimestampDataType
          ├── GArrowFixedSizeBinaryDataType
          ├── GArrowDictionaryDataType
          ├── GArrowNumericDataType
             ├── GArrowFloatingPointDataType
             ├── GArrowIntegerDataType
             ╰── GArrowIntegerDataType
                 ├── GArrowInt16DataType
                 ├── GArrowInt32DataType
                 ├── GArrowInt64DataType
                 ├── GArrowInt8DataType
                 ├── GArrowUInt16DataType
                 ├── GArrowUInt32DataType
                 ├── GArrowUInt64DataType
                 ├── GArrowUInt8DataType
                 ├── GArrowInt16DataType
                 ├── GArrowInt32DataType
                 ├── GArrowInt64DataType
                 ╰── GArrowInt8DataType
          ├── GArrowFixedSizeBinaryDataType
             ├── GArrowDecimalDataType
             ╰── GArrowDecimalDataType
                 ├── GArrowDecimal128DataType
                 ├── GArrowDecimal256DataType
                 ├── GArrowDecimal128DataType
                 ╰── GArrowDecimal256DataType
          ├── GArrowNumericDataType
             ╰── GArrowFloatingPointDataType
                 ├── GArrowDoubleDataType
                 ├── GArrowFloatDataType
                 ├── GArrowDoubleDataType
                 ╰── GArrowFloatDataType
          ╰── GArrowTemporalDataType
              ├── GArrowIntervalDataType
                 ├── GArrowDayTimeIntervalDataType
                 ├── GArrowMonthDayNanoIntervalDataType
                 ├── GArrowMonthIntervalDataType
                 ╰── GArrowDayTimeIntervalDataType
              ├── GArrowDate32DataType
              ╰── GArrowDate64DataType
       ├── GArrowUnionDataType
       ├── GArrowExtensionDataType
       ├── GArrowLargeBinaryDataType
       ├── GArrowLargeListDataType
       ├── GArrowLargeStringDataType
       ├── GArrowListDataType
       ├── GArrowNullDataType
       ├── GArrowStringDataType
       ├── GArrowStructDataType
       ├── GArrowFixedWidthDataType
          ╰── GArrowBooleanDataType
       ╰── GArrowBinaryDataType
    ╰── GArrowExtensionDataTypeRegistry

Includes

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

Description

GArrowDataType is a base class for all data type classes such as GArrowBooleanDataType.

GArrowNullDataType is a class for the null data type.

GArrowBooleanDataType is a class for the boolean data type.

GArrowInt8DataType is a class for the 8-bit integer data type.

GArrowUInt8DataType is a class for the 8-bit unsigned integer data type.

GArrowInt16DataType is a class for the 16-bit integer data type.

GArrowUInt16DataType is a class for the 16-bit unsigned integer data type.

GArrowInt32DataType is a class for the 32-bit integer data type.

GArrowUInt32DataType is a class for the 32-bit unsigned integer data type.

GArrowInt64DataType is a class for the 64-bit integer data type.

GArrowUInt64DataType is a class for the 64-bit unsigned integer data type.

GArrowFloatDataType is a class for the 32-bit floating point data type.

GArrowDoubleDataType is a class for the 64-bit floating point data type.

GArrowBinaryDataType is a class for the binary data type.

GArrowLargeBinaryDataType is a class for the 64-bit offsets binary data type.

GArrowFixedSizeBinaryDataType is a class for the fixed-size binary data type.

GArrowStringDataType is a class for the UTF-8 encoded string data type.

GArrowLargeStringDataType is a class for the 64-bit offsets UTF-8 encoded string data type.

GArrowTemporalDataType is an abstract class for temporal related data type such as GArrowDate32DataType.

GArrowDate32DataType is a class for the number of days since UNIX epoch in the 32-bit signed integer data type.

GArrowDate64DataType is a class for the number of milliseconds since UNIX epoch in the 64-bit signed integer data type.

GArrowTimestampDataType is a class for the number of seconds/milliseconds/microseconds/nanoseconds since UNIX epoch in the 64-bit signed integer data type.

GArrowTime32DataType is a class for the number of seconds or milliseconds since midnight in the 32-bit signed integer data type.

GArrowTime64DataType is a class for the number of microseconds or nanoseconds since midnight in the 64-bit signed integer data type.

GArrowIntervalDataType is an abstract class for interval related data type such as GArrowMonthIntervalDataType.

GArrowMonthIntervalDataType is a class for the month intarval data type.

GArrowDayTimeIntervalDataType is a class for the day time intarval data type.

GArrowMonthDayNanoIntervalDataType is a class for the month day nano intarval data type.

GArrowDecimalDataType is a base class for the decimal data types.

GArrowDecimal128DataType is a class for the 128-bit decimal data type.

GArrowDecimal256DataType is a class for the 256-bit decimal data type.

GArrowExtensionDataType is a base class for user-defined extension data types.

GArrowExtensionDataTypeRegistry is a class to manage extension data types.

Functions

garrow_data_type_import ()

GArrowDataType *
garrow_data_type_import (gpointer c_abi_schema,
                         GError **error);

Parameters

c_abi_schema

A struct ArrowSchema *.

[not nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

An imported GArrowDataType on success, NULL on error.

You don't need to release the passed struct ArrowSchema *, even if this function reports an error.

[transfer full][nullable]

Since: 6.0.0


garrow_data_type_export ()

gpointer
garrow_data_type_export (GArrowDataType *data_type,
                         GError **error);

Parameters

data_type

A GArrowDataType.

 

error

Return location for a GError or NULL.

[nullable]

Returns

An exported GArrowDataType as struct ArrowStruct * on success, NULL on error.

It should be freed with the ArrowSchema::release callback then g_free() when no longer needed.

[transfer full][nullable]

Since: 6.0.0


garrow_data_type_equal ()

gboolean
garrow_data_type_equal (GArrowDataType *data_type,
                        GArrowDataType *other_data_type);

Parameters

data_type

A GArrowDataType.

 

other_data_type

A GArrowDataType to be compared.

 

Returns

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


garrow_data_type_to_string ()

gchar *
garrow_data_type_to_string (GArrowDataType *data_type);

Parameters

data_type

A GArrowDataType.

 

Returns

The string representation of the data type.

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


garrow_data_type_get_id ()

GArrowType
garrow_data_type_get_id (GArrowDataType *data_type);

Parameters

data_type

A GArrowDataType.

 

Returns

The GArrowType of the data type.


garrow_data_type_get_name ()

gchar *
garrow_data_type_get_name (GArrowDataType *data_type);

Parameters

data_type

A GArrowDataType.

 

Returns

The name of the data type.

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

Since: 3.0.0


garrow_fixed_width_data_type_get_bit_width ()

gint
garrow_fixed_width_data_type_get_bit_width
                               (GArrowFixedWidthDataType *data_type);

Parameters

data_type

A GArrowFixedWidthDataType.

 

Returns

The number of bits for one data.


garrow_null_data_type_new ()

GArrowNullDataType *
garrow_null_data_type_new (void);

Returns

The newly created null data type.


garrow_boolean_data_type_new ()

GArrowBooleanDataType *
garrow_boolean_data_type_new (void);

Returns

The newly created boolean data type.


garrow_integer_data_type_is_signed ()

gboolean
garrow_integer_data_type_is_signed (GArrowIntegerDataType *data_type);

Parameters

data_type

A GArrowIntegerDataType.

 

Returns

TRUE if the data type is signed, FALSE otherwise.

Since: 0.16.0


garrow_int8_data_type_new ()

GArrowInt8DataType *
garrow_int8_data_type_new (void);

Returns

The newly created 8-bit integer data type.


garrow_uint8_data_type_new ()

GArrowUInt8DataType *
garrow_uint8_data_type_new (void);

Returns

The newly created 8-bit unsigned integer data type.


garrow_int16_data_type_new ()

GArrowInt16DataType *
garrow_int16_data_type_new (void);

Returns

The newly created 16-bit integer data type.


garrow_uint16_data_type_new ()

GArrowUInt16DataType *
garrow_uint16_data_type_new (void);

Returns

The newly created 16-bit unsigned integer data type.


garrow_int32_data_type_new ()

GArrowInt32DataType *
garrow_int32_data_type_new (void);

Returns

The newly created 32-bit integer data type.


garrow_uint32_data_type_new ()

GArrowUInt32DataType *
garrow_uint32_data_type_new (void);

Returns

The newly created 32-bit unsigned integer data type.


garrow_int64_data_type_new ()

GArrowInt64DataType *
garrow_int64_data_type_new (void);

Returns

The newly created 64-bit integer data type.


garrow_uint64_data_type_new ()

GArrowUInt64DataType *
garrow_uint64_data_type_new (void);

Returns

The newly created 64-bit unsigned integer data type.


garrow_float_data_type_new ()

GArrowFloatDataType *
garrow_float_data_type_new (void);

Returns

The newly created float data type.


garrow_double_data_type_new ()

GArrowDoubleDataType *
garrow_double_data_type_new (void);

Returns

The newly created 64-bit floating point data type.


garrow_binary_data_type_new ()

GArrowBinaryDataType *
garrow_binary_data_type_new (void);

Returns

The newly created binary data type.


garrow_fixed_size_binary_data_type_new ()

GArrowFixedSizeBinaryDataType *
garrow_fixed_size_binary_data_type_new
                               (gint32 byte_width);

garrow_fixed_size_binary_data_type_get_byte_width ()

gint32
garrow_fixed_size_binary_data_type_get_byte_width
                               (GArrowFixedSizeBinaryDataType *data_type);

Parameters

Returns

The number of bytes for one data.

Since: 0.12.0


garrow_large_binary_data_type_new ()

GArrowLargeBinaryDataType *
garrow_large_binary_data_type_new (void);

Returns

The newly created GArrowLargeBinaryDataType.

Since: 0.17.0


garrow_string_data_type_new ()

GArrowStringDataType *
garrow_string_data_type_new (void);

Returns

The newly created UTF-8 encoded string data type.


garrow_large_string_data_type_new ()

GArrowLargeStringDataType *
garrow_large_string_data_type_new (void);

Returns

The newly created GArrowLargeStringDataType.

Since: 0.17.0


garrow_date32_data_type_new ()

GArrowDate32DataType *
garrow_date32_data_type_new (void);

Returns

A newly created the number of milliseconds since UNIX epoch in 32-bit signed integer data type.

Since: 0.7.0


garrow_date64_data_type_new ()

GArrowDate64DataType *
garrow_date64_data_type_new (void);

Returns

A newly created the number of milliseconds since UNIX epoch in 64-bit signed integer data type.

Since: 0.7.0


garrow_timestamp_data_type_new ()

GArrowTimestampDataType *
garrow_timestamp_data_type_new (GArrowTimeUnit unit);

Parameters

unit

The unit of the timestamp data.

 

Returns

A newly created the number of seconds/milliseconds/microseconds/nanoseconds since UNIX epoch in 64-bit signed integer data type.

Since: 0.7.0


garrow_timestamp_data_type_get_unit ()

GArrowTimeUnit
garrow_timestamp_data_type_get_unit (GArrowTimestampDataType *timestamp_data_type);

Parameters

timestamp_data_type

The GArrowTimestampDataType.

 

Returns

The unit of the timestamp data type.

Since: 0.8.0


garrow_time_data_type_get_unit ()

GArrowTimeUnit
garrow_time_data_type_get_unit (GArrowTimeDataType *time_data_type);

Parameters

time_data_type

The GArrowTimeDataType.

 

Returns

The unit of the time data type.

Since: 0.7.0


garrow_time32_data_type_new ()

GArrowTime32DataType *
garrow_time32_data_type_new (GArrowTimeUnit unit,
                             GError **error);

Parameters

unit

GARROW_TIME_UNIT_SECOND or GARROW_TIME_UNIT_MILLI.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created the number of seconds or milliseconds since midnight in 32-bit signed integer data type.

[nullable]

Since: 0.7.0


garrow_time64_data_type_new ()

GArrowTime64DataType *
garrow_time64_data_type_new (GArrowTimeUnit unit,
                             GError **error);

Parameters

unit

GARROW_TIME_UNIT_SECOND or GARROW_TIME_UNIT_MILLI.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created the number of seconds or milliseconds since midnight in 64-bit signed integer data type.

[nullable]

Since: 0.7.0


garrow_interval_data_type_get_interval_type ()

GArrowIntervalType
garrow_interval_data_type_get_interval_type
                               (GArrowIntervalDataType *type);

Parameters

type

The GArrowIntervalDataType.

 

Returns

The interval type of the given type .

Since: 7.0.0


garrow_month_interval_data_type_new ()

GArrowMonthIntervalDataType *
garrow_month_interval_data_type_new (void);

Returns

The newly created month interval data type.

Since: 7.0.0


garrow_day_time_interval_data_type_new ()

GArrowDayTimeIntervalDataType *
garrow_day_time_interval_data_type_new
                               (void);

Returns

The newly created day time interval data type.

Since: 7.0.0


garrow_month_day_nano_interval_data_type_new ()

GArrowMonthDayNanoIntervalDataType *
garrow_month_day_nano_interval_data_type_new
                               (void);

Returns

The newly created month day nano interval data type.

Since: 7.0.0


garrow_decimal_data_type_new ()

GArrowDecimalDataType *
garrow_decimal_data_type_new (gint32 precision,
                              gint32 scale,
                              GError **error);

Parameters

precision

The precision of decimal data.

 

scale

The scale of decimal data.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly created decimal data type on success, NULL on error.

GArrowDecimal256DataType is used if precision is larger than garrow_decimal128_data_type_max_precision(), GArrowDecimal128DataType is used otherwise.

[nullable]

Since: 0.10.0


garrow_decimal_data_type_get_precision ()

gint32
garrow_decimal_data_type_get_precision
                               (GArrowDecimalDataType *decimal_data_type);

Parameters

decimal_data_type

The GArrowDecimalDataType.

 

Returns

The precision of the decimal data type.

Since: 0.10.0


garrow_decimal_data_type_get_scale ()

gint32
garrow_decimal_data_type_get_scale (GArrowDecimalDataType *decimal_data_type);

Parameters

decimal_data_type

The GArrowDecimalDataType.

 

Returns

The scale of the decimal data type.

Since: 0.10.0


garrow_decimal128_data_type_max_precision ()

gint32
garrow_decimal128_data_type_max_precision
                               ();

Returns

The max precision of 128-bit decimal data type.

Since: 3.0.0


garrow_decimal128_data_type_new ()

GArrowDecimal128DataType *
garrow_decimal128_data_type_new (gint32 precision,
                                 gint32 scale,
                                 GError **error);

Parameters

precision

The precision of decimal data.

 

scale

The scale of decimal data.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly created 128-bit decimal data type on success, NULL on error.

[nullable]

Since: 0.12.0


garrow_decimal256_data_type_max_precision ()

gint32
garrow_decimal256_data_type_max_precision
                               ();

Returns

The max precision of 256-bit decimal data type.

Since: 3.0.0


garrow_decimal256_data_type_new ()

GArrowDecimal256DataType *
garrow_decimal256_data_type_new (gint32 precision,
                                 gint32 scale,
                                 GError **error);

Parameters

precision

The precision of decimal data.

 

scale

The scale of decimal data.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly created 256-bit decimal data type on success, NULL on error.

[nullable]

Since: 3.0.0


garrow_extension_data_type_get_extension_name ()

gchar *
garrow_extension_data_type_get_extension_name
                               (GArrowExtensionDataType *data_type);

Parameters

data_type

A GArrowExtensionDataType.

 

Returns

The extension name of the type.

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

Since: 3.0.0


garrow_extension_data_type_wrap_array ()

GArrowExtensionArray *
garrow_extension_data_type_wrap_array (GArrowExtensionDataType *data_type,
                                       GArrowArray *storage);

Parameters

data_type

A GArrowExtensionDataType.

 

storage

A GArrowArray.

 

Returns

The array that wraps underlying storage array.

[transfer full]

Since: 3.0.0


garrow_extension_data_type_wrap_chunked_array ()

GArrowChunkedArray *
garrow_extension_data_type_wrap_chunked_array
                               (GArrowExtensionDataType *data_type,
                                GArrowChunkedArray *storage);

Parameters

data_type

A GArrowExtensionDataType.

 

storage

A GArrowChunkedArray.

 

Returns

The chunked array that wraps underlying storage chunked array.

[transfer full]

Since: 3.0.0


garrow_extension_data_type_registry_default ()

GArrowExtensionDataTypeRegistry *
garrow_extension_data_type_registry_default
                               (void);

Returns

The default global extension data type registry.

[transfer full]

Since: 3.0.0


garrow_extension_data_type_registry_register ()

gboolean
garrow_extension_data_type_registry_register
                               (GArrowExtensionDataTypeRegistry *registry,
                                GArrowExtensionDataType *data_type,
                                GError **error);

Register the given data_type to the registry .

Parameters

registry

A GArrowExtensionDataTypeRegistry.

 

data_type

A GArrowExtensionDataType to be registered.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE on error.

Since: 3.0.0


garrow_extension_data_type_registry_unregister ()

gboolean
garrow_extension_data_type_registry_unregister
                               (GArrowExtensionDataTypeRegistry *registry,
                                const gchar *name,
                                GError **error);

Unregister an extension data type that has the given name from the registry .

Parameters

registry

A GArrowExtensionDataTypeRegistry.

 

name

An extension data type name to be unregistered.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE on error.

Since: 3.0.0


garrow_extension_data_type_registry_lookup ()

GArrowExtensionDataType *
garrow_extension_data_type_registry_lookup
                               (GArrowExtensionDataTypeRegistry *registry,
                                const gchar *name);

Parameters

registry

A GArrowExtensionDataTypeRegistry.

 

name

An extension data type name to be looked up.

 

Returns

A found GArrowExtensionDataType on found, NULL on not found.

[transfer full]

Since: 3.0.0

Types and Values

GARROW_TYPE_DATA_TYPE

#define GARROW_TYPE_DATA_TYPE (garrow_data_type_get_type())

struct GArrowDataTypeClass

struct GArrowDataTypeClass {
  GObjectClass parent_class;
};

GARROW_TYPE_FIXED_WIDTH_DATA_TYPE

#define GARROW_TYPE_FIXED_WIDTH_DATA_TYPE (garrow_fixed_width_data_type_get_type())

struct GArrowFixedWidthDataTypeClass

struct GArrowFixedWidthDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_NULL_DATA_TYPE

#define             GARROW_TYPE_NULL_DATA_TYPE

struct GArrowNullDataTypeClass

struct GArrowNullDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_BOOLEAN_DATA_TYPE

#define GARROW_TYPE_BOOLEAN_DATA_TYPE (garrow_boolean_data_type_get_type())

struct GArrowBooleanDataTypeClass

struct GArrowBooleanDataTypeClass {
  GArrowFixedWidthDataTypeClass parent_class;
};

GARROW_TYPE_NUMERIC_DATA_TYPE

#define GARROW_TYPE_NUMERIC_DATA_TYPE (garrow_numeric_data_type_get_type())

struct GArrowNumericDataTypeClass

struct GArrowNumericDataTypeClass {
  GArrowFixedWidthDataTypeClass parent_class;
};

GARROW_TYPE_INTEGER_DATA_TYPE

#define GARROW_TYPE_INTEGER_DATA_TYPE (garrow_integer_data_type_get_type())

struct GArrowIntegerDataTypeClass

struct GArrowIntegerDataTypeClass {
  GArrowNumericDataTypeClass parent_class;
};

GARROW_TYPE_INT8_DATA_TYPE

#define GARROW_TYPE_INT8_DATA_TYPE (garrow_int8_data_type_get_type())

struct GArrowInt8DataTypeClass

struct GArrowInt8DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_UINT8_DATA_TYPE

#define GARROW_TYPE_UINT8_DATA_TYPE (garrow_uint8_data_type_get_type())

struct GArrowUInt8DataTypeClass

struct GArrowUInt8DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_INT16_DATA_TYPE

#define GARROW_TYPE_INT16_DATA_TYPE (garrow_int16_data_type_get_type())

struct GArrowInt16DataTypeClass

struct GArrowInt16DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_UINT16_DATA_TYPE

#define GARROW_TYPE_UINT16_DATA_TYPE (garrow_uint16_data_type_get_type())

struct GArrowUInt16DataTypeClass

struct GArrowUInt16DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_INT32_DATA_TYPE

#define GARROW_TYPE_INT32_DATA_TYPE (garrow_int32_data_type_get_type())

struct GArrowInt32DataTypeClass

struct GArrowInt32DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_UINT32_DATA_TYPE

#define GARROW_TYPE_UINT32_DATA_TYPE (garrow_uint32_data_type_get_type())

struct GArrowUInt32DataTypeClass

struct GArrowUInt32DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_INT64_DATA_TYPE

#define GARROW_TYPE_INT64_DATA_TYPE (garrow_int64_data_type_get_type())

struct GArrowInt64DataTypeClass

struct GArrowInt64DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_UINT64_DATA_TYPE

#define GARROW_TYPE_UINT64_DATA_TYPE (garrow_uint64_data_type_get_type())

struct GArrowUInt64DataTypeClass

struct GArrowUInt64DataTypeClass {
  GArrowIntegerDataTypeClass parent_class;
};

GARROW_TYPE_FLOATING_POINT_DATA_TYPE

#define             GARROW_TYPE_FLOATING_POINT_DATA_TYPE

struct GArrowFloatingPointDataTypeClass

struct GArrowFloatingPointDataTypeClass {
  GArrowNumericDataTypeClass parent_class;
};

GARROW_TYPE_FLOAT_DATA_TYPE

#define GARROW_TYPE_FLOAT_DATA_TYPE (garrow_float_data_type_get_type())

struct GArrowFloatDataTypeClass

struct GArrowFloatDataTypeClass {
  GArrowFloatingPointDataTypeClass parent_class;
};

GARROW_TYPE_DOUBLE_DATA_TYPE

#define GARROW_TYPE_DOUBLE_DATA_TYPE (garrow_double_data_type_get_type())

struct GArrowDoubleDataTypeClass

struct GArrowDoubleDataTypeClass {
  GArrowFloatingPointDataTypeClass parent_class;
};

GARROW_TYPE_BINARY_DATA_TYPE

#define GARROW_TYPE_BINARY_DATA_TYPE (garrow_binary_data_type_get_type())

struct GArrowBinaryDataTypeClass

struct GArrowBinaryDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_FIXED_SIZE_BINARY_DATA_TYPE

#define GARROW_TYPE_FIXED_SIZE_BINARY_DATA_TYPE (garrow_fixed_size_binary_data_type_get_type())

struct GArrowFixedSizeBinaryDataTypeClass

struct GArrowFixedSizeBinaryDataTypeClass {
  GArrowFixedWidthDataTypeClass parent_class;
};

GARROW_TYPE_LARGE_BINARY_DATA_TYPE

#define GARROW_TYPE_LARGE_BINARY_DATA_TYPE (garrow_large_binary_data_type_get_type())

struct GArrowLargeBinaryDataTypeClass

struct GArrowLargeBinaryDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_STRING_DATA_TYPE

#define GARROW_TYPE_STRING_DATA_TYPE (garrow_string_data_type_get_type())

struct GArrowStringDataTypeClass

struct GArrowStringDataTypeClass {
  GArrowBinaryDataTypeClass parent_class;
};

GARROW_TYPE_LARGE_STRING_DATA_TYPE

#define GARROW_TYPE_LARGE_STRING_DATA_TYPE (garrow_large_string_data_type_get_type())

struct GArrowLargeStringDataTypeClass

struct GArrowLargeStringDataTypeClass {
  GArrowLargeBinaryDataTypeClass parent_class;
};

GARROW_TYPE_TEMPORAL_DATA_TYPE

#define GARROW_TYPE_TEMPORAL_DATA_TYPE (garrow_temporal_data_type_get_type())

struct GArrowTemporalDataTypeClass

struct GArrowTemporalDataTypeClass {
  GArrowFixedWidthDataTypeClass parent_class;
};

GARROW_TYPE_DATE32_DATA_TYPE

#define GARROW_TYPE_DATE32_DATA_TYPE (garrow_date32_data_type_get_type())

struct GArrowDate32DataTypeClass

struct GArrowDate32DataTypeClass {
  GArrowTemporalDataTypeClass parent_class;
};

GARROW_TYPE_DATE64_DATA_TYPE

#define GARROW_TYPE_DATE64_DATA_TYPE (garrow_date64_data_type_get_type())

struct GArrowDate64DataTypeClass

struct GArrowDate64DataTypeClass {
  GArrowTemporalDataTypeClass parent_class;
};

GARROW_TYPE_TIMESTAMP_DATA_TYPE

#define GARROW_TYPE_TIMESTAMP_DATA_TYPE (garrow_timestamp_data_type_get_type())

struct GArrowTimestampDataTypeClass

struct GArrowTimestampDataTypeClass {
  GArrowTemporalDataTypeClass parent_class;
};

GARROW_TYPE_TIME_DATA_TYPE

#define GARROW_TYPE_TIME_DATA_TYPE (garrow_time_data_type_get_type())

struct GArrowTimeDataTypeClass

struct GArrowTimeDataTypeClass {
  GArrowTemporalDataTypeClass parent_class;
};

GARROW_TYPE_TIME32_DATA_TYPE

#define GARROW_TYPE_TIME32_DATA_TYPE (garrow_time32_data_type_get_type())

struct GArrowTime32DataTypeClass

struct GArrowTime32DataTypeClass {
  GArrowTimeDataTypeClass parent_class;
};

GARROW_TYPE_TIME64_DATA_TYPE

#define GARROW_TYPE_TIME64_DATA_TYPE (garrow_time64_data_type_get_type())

struct GArrowTime64DataTypeClass

struct GArrowTime64DataTypeClass {
  GArrowTimeDataTypeClass parent_class;
};

GARROW_TYPE_INTERVAL_DATA_TYPE

#define GARROW_TYPE_INTERVAL_DATA_TYPE (garrow_interval_data_type_get_type())

struct GArrowIntervalDataTypeClass

struct GArrowIntervalDataTypeClass {
  GArrowTimeDataTypeClass parent_class;
};

GARROW_TYPE_MONTH_INTERVAL_DATA_TYPE

#define             GARROW_TYPE_MONTH_INTERVAL_DATA_TYPE

struct GArrowMonthIntervalDataTypeClass

struct GArrowMonthIntervalDataTypeClass {
  GArrowIntervalDataTypeClass parent_class;
};

GARROW_TYPE_DAY_TIME_INTERVAL_DATA_TYPE

#define             GARROW_TYPE_DAY_TIME_INTERVAL_DATA_TYPE

struct GArrowDayTimeIntervalDataTypeClass

struct GArrowDayTimeIntervalDataTypeClass {
  GArrowIntervalDataTypeClass parent_class;
};

GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_DATA_TYPE

#define             GARROW_TYPE_MONTH_DAY_NANO_INTERVAL_DATA_TYPE

struct GArrowMonthDayNanoIntervalDataTypeClass

struct GArrowMonthDayNanoIntervalDataTypeClass {
  GArrowIntervalDataTypeClass parent_class;
};

GARROW_TYPE_DECIMAL_DATA_TYPE

#define GARROW_TYPE_DECIMAL_DATA_TYPE (garrow_decimal_data_type_get_type())

struct GArrowDecimalDataTypeClass

struct GArrowDecimalDataTypeClass {
  GArrowFixedSizeBinaryDataTypeClass parent_class;
};

GARROW_TYPE_DECIMAL128_DATA_TYPE

#define GARROW_TYPE_DECIMAL128_DATA_TYPE (garrow_decimal128_data_type_get_type())

struct GArrowDecimal128DataTypeClass

struct GArrowDecimal128DataTypeClass {
  GArrowDecimalDataTypeClass parent_class;
};

GARROW_TYPE_DECIMAL256_DATA_TYPE

#define GARROW_TYPE_DECIMAL256_DATA_TYPE (garrow_decimal256_data_type_get_type())

struct GArrowDecimal256DataTypeClass

struct GArrowDecimal256DataTypeClass {
  GArrowDecimalDataTypeClass parent_class;
};

GARROW_TYPE_EXTENSION_DATA_TYPE

#define GARROW_TYPE_EXTENSION_DATA_TYPE (garrow_extension_data_type_get_type())

struct GArrowExtensionDataTypeClass

struct GArrowExtensionDataTypeClass {
  GArrowDataTypeClass parent_class;

  gchar *(*get_extension_name)(GArrowExtensionDataType *data_type);
  gboolean (*equal)(GArrowExtensionDataType *data_type,
                    GArrowExtensionDataType *other_data_type);
  GArrowDataType *(*deserialize)(GArrowExtensionDataType *data_type,
                                 GArrowDataType *storage_data_type,
                                 GBytes *serialized_data,
                                 GError **error);
  GBytes *(*serialize)(GArrowExtensionDataType *data_type);
  GType (*get_array_gtype)(GArrowExtensionDataType *data_type);
};

Members

get_extension_name ()

It must returns the name of this extension data type.

 

equal ()

It must returns TRUE only when the both data types equal, FALSE otherwise.

 

deserialize ()

It must returns a serialized GArrowDataType from the given serialized_data.

 

serialize ()

It must returns a serialized data of this extension data type to deserialize later.

 

get_array_gtype ()

It must returns GType for corresponding extension array class.

 

Since: 3.0.0


GARROW_TYPE_EXTENSION_DATA_TYPE_REGISTRY

#define             GARROW_TYPE_EXTENSION_DATA_TYPE_REGISTRY

struct GArrowExtensionDataTypeRegistryClass

struct GArrowExtensionDataTypeRegistryClass {
  GObjectClass parent_class;
};

GArrowBinaryDataType

typedef struct _GArrowBinaryDataType GArrowBinaryDataType;

GArrowBooleanDataType

typedef struct _GArrowBooleanDataType GArrowBooleanDataType;

GArrowDataType

typedef struct _GArrowDataType GArrowDataType;

GArrowDate32DataType

typedef struct _GArrowDate32DataType GArrowDate32DataType;

GArrowDate64DataType

typedef struct _GArrowDate64DataType GArrowDate64DataType;

GArrowDayTimeIntervalDataType

typedef struct _GArrowDayTimeIntervalDataType GArrowDayTimeIntervalDataType;

GArrowDecimal128DataType

typedef struct _GArrowDecimal128DataType GArrowDecimal128DataType;

GArrowDecimal256DataType

typedef struct _GArrowDecimal256DataType GArrowDecimal256DataType;

GArrowDecimalDataType

typedef struct _GArrowDecimalDataType GArrowDecimalDataType;

GArrowDoubleDataType

typedef struct _GArrowDoubleDataType GArrowDoubleDataType;

GArrowExtensionDataType

typedef struct _GArrowExtensionDataType GArrowExtensionDataType;

GArrowExtensionDataTypeRegistry

typedef struct _GArrowExtensionDataTypeRegistry GArrowExtensionDataTypeRegistry;

GArrowFixedSizeBinaryDataType

typedef struct _GArrowFixedSizeBinaryDataType GArrowFixedSizeBinaryDataType;

GArrowFixedWidthDataType

typedef struct _GArrowFixedWidthDataType GArrowFixedWidthDataType;

GArrowFloatDataType

typedef struct _GArrowFloatDataType GArrowFloatDataType;

GArrowFloatingPointDataType

typedef struct _GArrowFloatingPointDataType GArrowFloatingPointDataType;

GArrowInt16DataType

typedef struct _GArrowInt16DataType GArrowInt16DataType;

GArrowInt32DataType

typedef struct _GArrowInt32DataType GArrowInt32DataType;

GArrowInt64DataType

typedef struct _GArrowInt64DataType GArrowInt64DataType;

GArrowInt8DataType

typedef struct _GArrowInt8DataType GArrowInt8DataType;

GArrowIntegerDataType

typedef struct _GArrowIntegerDataType GArrowIntegerDataType;

GArrowIntervalDataType

typedef struct _GArrowIntervalDataType GArrowIntervalDataType;

GArrowLargeBinaryDataType

typedef struct _GArrowLargeBinaryDataType GArrowLargeBinaryDataType;

GArrowLargeStringDataType

typedef struct _GArrowLargeStringDataType GArrowLargeStringDataType;

GArrowMonthDayNanoIntervalDataType

typedef struct _GArrowMonthDayNanoIntervalDataType GArrowMonthDayNanoIntervalDataType;

GArrowMonthIntervalDataType

typedef struct _GArrowMonthIntervalDataType GArrowMonthIntervalDataType;

GArrowNullDataType

typedef struct _GArrowNullDataType GArrowNullDataType;

GArrowNumericDataType

typedef struct _GArrowNumericDataType GArrowNumericDataType;

GArrowStringDataType

typedef struct _GArrowStringDataType GArrowStringDataType;

GArrowTemporalDataType

typedef struct _GArrowTemporalDataType GArrowTemporalDataType;

GArrowTime32DataType

typedef struct _GArrowTime32DataType GArrowTime32DataType;

GArrowTime64DataType

typedef struct _GArrowTime64DataType GArrowTime64DataType;

GArrowTimeDataType

typedef struct _GArrowTimeDataType GArrowTimeDataType;

GArrowTimestampDataType

typedef struct _GArrowTimestampDataType GArrowTimestampDataType;

GArrowUInt16DataType

typedef struct _GArrowUInt16DataType GArrowUInt16DataType;

GArrowUInt32DataType

typedef struct _GArrowUInt32DataType GArrowUInt32DataType;

GArrowUInt64DataType

typedef struct _GArrowUInt64DataType GArrowUInt64DataType;

GArrowUInt8DataType

typedef struct _GArrowUInt8DataType GArrowUInt8DataType;

Property Details

The “data-type” property

  “data-type”                gpointer

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

Owner: GArrowDataType

Flags: Write / Construct Only


The “storage-data-type” property

  “storage-data-type”        GArrowDataType *

The underlying GArrowDataType.

Owner: GArrowExtensionDataType

Flags: Read / Write / Construct Only


The “registry” property

  “registry”                 gpointer

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

Owner: GArrowExtensionDataTypeRegistry

Flags: Write / Construct Only