Composite data type classes

Composite data type classes

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowDataType
        ├── GArrowFixedWidthDataType
           ╰── GArrowDictionaryDataType
        ├── GArrowLargeListDataType
        ├── GArrowListDataType
           ╰── GArrowMapDataType
        ├── GArrowStructDataType
        ╰── GArrowUnionDataType
            ├── GArrowDenseUnionDataType
            ├── GArrowSparseUnionDataType
            ├── GArrowDenseUnionDataType
            ╰── GArrowSparseUnionDataType

Includes

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

Description

GArrowListDataType is a class for list data type.

GArrowLargeListDataType is a class for 64-bit offsets list data type.

GArrowStructDataType is a class for struct data type.

GArrowMapDataType is a class for map data type.

GArrowUnionDataType is a base class for union data types.

GArrowSparseUnionDataType is a class for sparse union data type.

GArrowDenseUnionDataType is a class for dense union data type.

GArrowDictionaryDataType is a class for dictionary data type.

Functions

garrow_list_data_type_new ()

GArrowListDataType *
garrow_list_data_type_new (GArrowField *field);

Parameters

field

The field of elements

 

Returns

The newly created list data type.


garrow_list_data_type_get_value_field ()

GArrowField *
garrow_list_data_type_get_value_field (GArrowListDataType *list_data_type);

garrow_list_data_type_get_value_field has been deprecated since version 0.13.0 and should not be used in newly-written code.

Use garrow_list_data_type_get_field() instead.

Parameters

list_data_type

A GArrowListDataType.

 

Returns

The field of value.

[transfer full]


garrow_list_data_type_get_field ()

GArrowField *
garrow_list_data_type_get_field (GArrowListDataType *list_data_type);

Parameters

list_data_type

A GArrowListDataType.

 

Returns

The field of value.

[transfer full]

Since: 0.13.0


garrow_large_list_data_type_new ()

GArrowLargeListDataType *
garrow_large_list_data_type_new (GArrowField *field);

Parameters

field

The field of elements

 

Returns

The newly created large list data type.

Since: 0.16.0


garrow_large_list_data_type_get_field ()

GArrowField *
garrow_large_list_data_type_get_field (GArrowLargeListDataType *large_list_data_type);

Parameters

large_list_data_type

A GArrowLargeListDataType.

 

Returns

The field of value.

[transfer full]

Since: 0.16.0


garrow_struct_data_type_new ()

GArrowStructDataType *
garrow_struct_data_type_new (GList *fields);

Parameters

fields

The fields of the struct.

[element-type GArrowField]

Returns

The newly created struct data type.


garrow_struct_data_type_get_n_fields ()

gint
garrow_struct_data_type_get_n_fields (GArrowStructDataType *struct_data_type);

Parameters

struct_data_type

A GArrowStructDataType.

 

Returns

The number of fields of the struct data type.

Since: 0.12.0


garrow_struct_data_type_get_fields ()

GList *
garrow_struct_data_type_get_fields (GArrowStructDataType *struct_data_type);

Parameters

struct_data_type

A GArrowStructDataType.

 

Returns

The fields of the struct data type.

[transfer full][element-type GArrowField]

Since: 0.12.0


garrow_struct_data_type_get_field ()

GArrowField *
garrow_struct_data_type_get_field (GArrowStructDataType *struct_data_type,
                                   gint i);

Parameters

struct_data_type

A GArrowStructDataType.

 

i

The index of the target field.

 

Returns

The field at the index in the struct data type or NULL on not found.

[transfer full][nullable]

Since: 0.12.0


garrow_struct_data_type_get_field_by_name ()

GArrowField *
garrow_struct_data_type_get_field_by_name
                               (GArrowStructDataType *struct_data_type,
                                const gchar *name);

Parameters

struct_data_type

A GArrowStructDataType.

 

name

The name of the target field.

 

Returns

The field that has the name in the struct data type or NULL on not found.

[transfer full][nullable]

Since: 0.12.0


garrow_struct_data_type_get_field_index ()

gint
garrow_struct_data_type_get_field_index
                               (GArrowStructDataType *struct_data_type,
                                const gchar *name);

Parameters

struct_data_type

A GArrowStructDataType.

 

name

The name of the target field.

 

Returns

The index of the target index in the struct data type or -1 on not found.

Since: 0.12.0


garrow_map_data_type_new ()

GArrowMapDataType *
garrow_map_data_type_new (GArrowDataType *key_type,
                          GArrowDataType *item_type);

Parameters

key_type

The key type of the map.

 

item_type

The item type of the map.

 

Returns

The newly created map data type.

Since: 0.17.0


garrow_map_data_type_get_key_type ()

GArrowDataType *
garrow_map_data_type_get_key_type (GArrowMapDataType *map_data_type);

Parameters

map_data_type

A GArrowMapDataType.

 

Returns

The key type of the map.

[transfer full]

Since: 0.17.0


garrow_map_data_type_get_item_type ()

GArrowDataType *
garrow_map_data_type_get_item_type (GArrowMapDataType *map_data_type);

Parameters

map_data_type

A GArrowMapDataType.

 

Returns

The item type of the map.

[transfer full]

Since: 0.17.0


garrow_union_data_type_get_n_fields ()

gint
garrow_union_data_type_get_n_fields (GArrowUnionDataType *union_data_type);

Parameters

union_data_type

A GArrowUnionDataType.

 

Returns

The number of fields of the union data type.

Since: 0.12.0


garrow_union_data_type_get_fields ()

GList *
garrow_union_data_type_get_fields (GArrowUnionDataType *union_data_type);

Parameters

union_data_type

A GArrowUnionDataType.

 

Returns

The fields of the union data type.

[transfer full][element-type GArrowField]

Since: 0.12.0


garrow_union_data_type_get_field ()

GArrowField *
garrow_union_data_type_get_field (GArrowUnionDataType *union_data_type,
                                  gint i);

Parameters

union_data_type

A GArrowUnionDataType.

 

i

The index of the target field.

 

Returns

The field at the index in the union data type or NULL on not found.

[transfer full][nullable]

Since: 0.12.0


garrow_union_data_type_get_type_codes ()

gint8 *
garrow_union_data_type_get_type_codes (GArrowUnionDataType *union_data_type,
                                       gsize *n_type_codes);

Parameters

union_data_type

A GArrowUnionDataType.

 

n_type_codes

The number of type codes.

[out]

Returns

The codes for each field.

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

[transfer full][array length=n_type_codes]

Since: 0.12.0


garrow_sparse_union_data_type_new ()

GArrowSparseUnionDataType *
garrow_sparse_union_data_type_new (GList *fields,
                                   gint8 *type_codes,
                                   gsize n_type_codes);

Parameters

fields

The fields of the union.

[element-type GArrowField]

type_codes

The codes to specify each field.

[array length=n_type_codes]

n_type_codes

The number of type codes.

 

Returns

The newly created sparse union data type.


garrow_dense_union_data_type_new ()

GArrowDenseUnionDataType *
garrow_dense_union_data_type_new (GList *fields,
                                  gint8 *type_codes,
                                  gsize n_type_codes);

Parameters

fields

The fields of the union.

[element-type GArrowField]

type_codes

The codes to specify each field.

[array length=n_type_codes]

n_type_codes

The number of type codes.

 

Returns

The newly created dense union data type.


garrow_dictionary_data_type_new ()

GArrowDictionaryDataType *
garrow_dictionary_data_type_new (GArrowDataType *index_data_type,
                                 GArrowDataType *value_data_type,
                                 gboolean ordered);

Parameters

index_data_type

The data type of index.

 

value_data_type

The data type of dictionary values.

 

ordered

Whether dictionary contents are ordered or not.

 

Returns

The newly created dictionary data type.

Since: 0.8.0


garrow_dictionary_data_type_get_index_data_type ()

GArrowDataType *
garrow_dictionary_data_type_get_index_data_type
                               (GArrowDictionaryDataType *dictionary_data_type);

Parameters

dictionary_data_type

The GArrowDictionaryDataType.

 

Returns

The GArrowDataType of index.

[transfer full]

Since: 0.8.0


garrow_dictionary_data_type_get_value_data_type ()

GArrowDataType *
garrow_dictionary_data_type_get_value_data_type
                               (GArrowDictionaryDataType *dictionary_data_type);

Parameters

dictionary_data_type

The GArrowDictionaryDataType.

 

Returns

The GArrowDataType of dictionary values.

[transfer full]

Since: 0.14.0


garrow_dictionary_data_type_is_ordered ()

gboolean
garrow_dictionary_data_type_is_ordered
                               (GArrowDictionaryDataType *dictionary_data_type);

Parameters

dictionary_data_type

The GArrowDictionaryDataType.

 

Returns

Whether dictionary contents are ordered or not.

Since: 0.8.0

Types and Values

GARROW_TYPE_LIST_DATA_TYPE

#define GARROW_TYPE_LIST_DATA_TYPE (garrow_list_data_type_get_type())

struct GArrowListDataTypeClass

struct GArrowListDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_LARGE_LIST_DATA_TYPE

#define GARROW_TYPE_LARGE_LIST_DATA_TYPE (garrow_large_list_data_type_get_type())

struct GArrowLargeListDataTypeClass

struct GArrowLargeListDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_STRUCT_DATA_TYPE

#define GARROW_TYPE_STRUCT_DATA_TYPE (garrow_struct_data_type_get_type())

struct GArrowStructDataTypeClass

struct GArrowStructDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_MAP_DATA_TYPE

#define GARROW_TYPE_MAP_DATA_TYPE (garrow_map_data_type_get_type())

struct GArrowMapDataTypeClass

struct GArrowMapDataTypeClass {
  GArrowListDataTypeClass parent_class;
};

GARROW_TYPE_UNION_DATA_TYPE

#define GARROW_TYPE_UNION_DATA_TYPE (garrow_union_data_type_get_type())

struct GArrowUnionDataTypeClass

struct GArrowUnionDataTypeClass {
  GArrowDataTypeClass parent_class;
};

GARROW_TYPE_SPARSE_UNION_DATA_TYPE

#define             GARROW_TYPE_SPARSE_UNION_DATA_TYPE

struct GArrowSparseUnionDataTypeClass

struct GArrowSparseUnionDataTypeClass {
  GArrowUnionDataTypeClass parent_class;
};

GARROW_TYPE_DENSE_UNION_DATA_TYPE

#define             GARROW_TYPE_DENSE_UNION_DATA_TYPE

struct GArrowDenseUnionDataTypeClass

struct GArrowDenseUnionDataTypeClass {
  GArrowUnionDataTypeClass parent_class;
};

GARROW_TYPE_DICTIONARY_DATA_TYPE

#define GARROW_TYPE_DICTIONARY_DATA_TYPE (garrow_dictionary_data_type_get_type())

struct GArrowDictionaryDataTypeClass

struct GArrowDictionaryDataTypeClass {
  GArrowFixedWidthDataTypeClass parent_class;
};

GArrowDenseUnionDataType

typedef struct _GArrowDenseUnionDataType GArrowDenseUnionDataType;

GArrowDictionaryDataType

typedef struct _GArrowDictionaryDataType GArrowDictionaryDataType;

GArrowLargeListDataType

typedef struct _GArrowLargeListDataType GArrowLargeListDataType;

GArrowListDataType

typedef struct _GArrowListDataType GArrowListDataType;

GArrowMapDataType

typedef struct _GArrowMapDataType GArrowMapDataType;

GArrowSparseUnionDataType

typedef struct _GArrowSparseUnionDataType GArrowSparseUnionDataType;

GArrowStructDataType

typedef struct _GArrowStructDataType GArrowStructDataType;

GArrowUnionDataType

typedef struct _GArrowUnionDataType GArrowUnionDataType;