Metadata related classes

Metadata related classes

Functions

Properties

gpointer metadata Write / Construct Only
gpointer metadata Write / Construct Only
gpointer metadata Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GParquetColumnChunkMetadata
    ├── GParquetFileMetadata
    ╰── GParquetRowGroupMetadata

Includes

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

Description

GParquetColumnChunkMetadata is a class for column chunk level metadata.

GParquetRowGroupMetadata is a class for row group level metadata.

GParquetFileMetadata is a class for file level metadata.

Functions

gparquet_column_chunk_metadata_equal ()

gboolean
gparquet_column_chunk_metadata_equal (GParquetColumnChunkMetadata *metadata,
                                      GParquetColumnChunkMetadata *other_metadata);

Parameters

metadata

A GParquetColumnChunkMetadata.

 

other_metadata

A GParquetColumnChunkMetadata.

 

Returns

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

Since: 8.0.0


gparquet_column_chunk_metadata_get_total_size ()

gint64
gparquet_column_chunk_metadata_get_total_size
                               (GParquetColumnChunkMetadata *metadata);

Parameters

Returns

Total byte size of all the uncompressed data in this column chunk.

Since: 8.0.0


gparquet_column_chunk_metadata_get_total_compressed_size ()

gint64
gparquet_column_chunk_metadata_get_total_compressed_size
                               (GParquetColumnChunkMetadata *metadata);

Parameters

Returns

Total byte size of all the compressed (and potentially encrypted) data in this column chunk.

Since: 8.0.0


gparquet_column_chunk_metadata_get_file_offset ()

gint64
gparquet_column_chunk_metadata_get_file_offset
                               (GParquetColumnChunkMetadata *metadata);

Parameters

Returns

Byte offset from beginning of file to first page (data or dictionary) in this column chunk.

Since: 8.0.0


gparquet_column_chunk_metadata_can_decompress ()

gboolean
gparquet_column_chunk_metadata_can_decompress
                               (GParquetColumnChunkMetadata *metadata);

Parameters

Returns

TRUE if all of the column chunk can be decompressed, FALSE otherwise.

Since: 8.0.0


gparquet_column_chunk_metadata_get_statistics ()

GParquetStatistics *
gparquet_column_chunk_metadata_get_statistics
                               (GParquetColumnChunkMetadata *metadata);

Parameters

Returns

The statistics of this column chunk if it's set, NULL otherwise.

[transfer full][nullable]

Since: 8.0.0


gparquet_row_group_metadata_equal ()

gboolean
gparquet_row_group_metadata_equal (GParquetRowGroupMetadata *metadata,
                                   GParquetRowGroupMetadata *other_metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

other_metadata

A GParquetRowGroupMetadata.

 

Returns

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

Since: 8.0.0


gparquet_row_group_metadata_get_n_columns ()

gint
gparquet_row_group_metadata_get_n_columns
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

The number of columns in this row group. The order must match the parent's column ordering.

Since: 8.0.0


gparquet_row_group_metadata_get_column_chunk ()

GParquetColumnChunkMetadata *
gparquet_row_group_metadata_get_column_chunk
                               (GParquetRowGroupMetadata *metadata,
                                gint index,
                                GError **error);

Parameters

metadata

A GParquetRowGroupMetadata.

 

index

An index of the column chunk to retrieve.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GParquetColumnChunkMetadata at index on success, NULL on error.

[transfer full][nullable]

Since: 8.0.0


gparquet_row_group_metadata_get_n_rows ()

gint64
gparquet_row_group_metadata_get_n_rows
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

The number of rows in this row group.

Since: 8.0.0


gparquet_row_group_metadata_get_total_size ()

gint64
gparquet_row_group_metadata_get_total_size
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

Total byte size of all the uncompressed column data in this row group.

Since: 8.0.0


gparquet_row_group_metadata_get_total_compressed_size ()

gint64
gparquet_row_group_metadata_get_total_compressed_size
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

Total byte size of all the compressed (and potentially encrypted) column data in this row group.

Since: 8.0.0


gparquet_row_group_metadata_get_file_offset ()

gint64
gparquet_row_group_metadata_get_file_offset
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

Byte offset from beginning of file to first page (data or dictionary) in this row group.

The file_offset field that this method exposes is optional. This method will return 0 if that field is not set to a meaningful value.

Since: 8.0.0


gparquet_row_group_metadata_can_decompress ()

gboolean
gparquet_row_group_metadata_can_decompress
                               (GParquetRowGroupMetadata *metadata);

Parameters

metadata

A GParquetRowGroupMetadata.

 

Returns

TRUE if all of the row group's column chunks can be decompressed, FALSE otherwise.

Since: 8.0.0


gparquet_file_metadata_equal ()

gboolean
gparquet_file_metadata_equal (GParquetFileMetadata *metadata,
                              GParquetFileMetadata *other_metadata);

Parameters

metadata

A GParquetFileMetadata.

 

other_metadata

A GParquetFileMetadata.

 

Returns

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

Since: 8.0.0


gparquet_file_metadata_get_n_columns ()

gint
gparquet_file_metadata_get_n_columns (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The number of top-level columns in the schema.

Parquet thrift definition requires that nested schema elements are flattened. This method returns the number of columns in the un-flattened version.

Since: 8.0.0


gparquet_file_metadata_get_n_schema_elements ()

gint
gparquet_file_metadata_get_n_schema_elements
                               (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The number of flattened schema elements.

Parquet thrift definition requires that nested schema elements are flattened. This method returns the total number of elements in the flattened list.

Since: 8.0.0


gparquet_file_metadata_get_n_rows ()

gint64
gparquet_file_metadata_get_n_rows (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The total number of rows.

Since: 8.0.0


gparquet_file_metadata_get_n_row_groups ()

gint
gparquet_file_metadata_get_n_row_groups
                               (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The number of row groups in the file.

Since: 8.0.0


gparquet_file_metadata_get_row_group ()

GParquetRowGroupMetadata *
gparquet_file_metadata_get_row_group (GParquetFileMetadata *metadata,
                                      gint index,
                                      GError **error);

Parameters

metadata

A GParquetFileMetadata.

 

index

An index of the row group to retrieve.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GParquetRowGroupMetadata at index on success, NULL on error.

[transfer full][nullable]

Since: 8.0.0


gparquet_file_metadata_get_created_by ()

const gchar *
gparquet_file_metadata_get_created_by (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The application's user-agent string of the writer.

Since: 8.0.0


gparquet_file_metadata_get_size ()

guint32
gparquet_file_metadata_get_size (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

The size of the original thrift encoded metadata footer.

Since: 8.0.0


gparquet_file_metadata_can_decompress ()

gboolean
gparquet_file_metadata_can_decompress (GParquetFileMetadata *metadata);

Parameters

metadata

A GParquetFileMetadata.

 

Returns

TRUE if all of the row groups can be decompressed, FALSE otherwise.

This will return false if any of the RowGroup's page is compressed with a compression format which is not compiled in the current Parquet library.

Since: 8.0.0

Types and Values

GPARQUET_TYPE_COLUMN_CHUNK_METADATA

#define             GPARQUET_TYPE_COLUMN_CHUNK_METADATA

struct GParquetColumnChunkMetadataClass

struct GParquetColumnChunkMetadataClass {
  GObjectClass parent_class;
};

GPARQUET_TYPE_ROW_GROUP_METADATA

#define GPARQUET_TYPE_ROW_GROUP_METADATA (gparquet_row_group_metadata_get_type())

struct GParquetRowGroupMetadataClass

struct GParquetRowGroupMetadataClass {
  GObjectClass parent_class;
};

GPARQUET_TYPE_FILE_METADATA

#define GPARQUET_TYPE_FILE_METADATA (gparquet_file_metadata_get_type())

struct GParquetFileMetadataClass

struct GParquetFileMetadataClass {
  GObjectClass parent_class;
};

GParquetColumnChunkMetadata

typedef struct _GParquetColumnChunkMetadata GParquetColumnChunkMetadata;

GParquetFileMetadata

typedef struct _GParquetFileMetadata GParquetFileMetadata;

GParquetRowGroupMetadata

typedef struct _GParquetRowGroupMetadata GParquetRowGroupMetadata;

Property Details

The “metadata” property

  “metadata”                 gpointer

The raw parquet::ColumnChunkMetaData *.

Owner: GParquetColumnChunkMetadata

Flags: Write / Construct Only


The “metadata” property

  “metadata”                 gpointer

The raw std::shared_ptr<parquet::FileMetaData>.

Owner: GParquetFileMetadata

Flags: Write / Construct Only


The “metadata” property

  “metadata”                 gpointer

The raw parquet::RowGroupMetaData *.

Owner: GParquetRowGroupMetadata

Flags: Write / Construct Only