Parquex.Batch (parquex v0.3.0)

View Source

A bounded columnar batch produced by a Parquex.Stream.

Columns are stored independently by name. to_rows/1 is explicit and can materialize only this batch, never the complete stream.

Summary

Functions

Returns one column's bounded list of values.

Returns column names in schema order.

Builds one bounded batch from complete schema-named column lists.

Returns the number of rows in this bounded batch.

Returns the projected schema shared by the stream.

Explicitly expands this batch, and only this batch, to row maps.

Types

t()

@opaque t()

Functions

column(batch, name)

@spec column(t(), String.t()) :: {:ok, list()} | {:error, Parquex.Error.t()}

Returns one column's bounded list of values.

column_names(batch)

@spec column_names(t()) :: [String.t()]

Returns column names in schema order.

new(schema, columns)

@spec new(Parquex.Schema.t(), %{required(String.t()) => list()} | keyword()) ::
  {:ok, t()} | {:error, Parquex.Error.t()}

Builds one bounded batch from complete schema-named column lists.

row_count(batch)

@spec row_count(t()) :: non_neg_integer()

Returns the number of rows in this bounded batch.

schema(batch)

@spec schema(t()) :: Parquex.Schema.t()

Returns the projected schema shared by the stream.

to_rows(batch)

@spec to_rows(t()) :: [map()]

Explicitly expands this batch, and only this batch, to row maps.