Immutable schema description for a Parquet file.
More...
#include <schema.hpp>
Immutable schema description for a Parquet file.
A Schema has a root name and an ordered list of ColumnDescriptor entries. Create one via the variadic Schema::build() factory or the fluent Schema::builder() API.
- See also
- Column, SchemaBuilder, ColumnDescriptor
Definition at line 192 of file schema.hpp.
◆ Schema() [1/2]
| signet::forge::Schema::Schema |
( |
| ) |
|
|
default |
Default-construct an empty schema.
◆ Schema() [2/2]
| signet::forge::Schema::Schema |
( |
std::string |
name, |
|
|
std::vector< ColumnDescriptor > |
columns |
|
) |
| |
|
inline |
Construct a schema directly from a name and column list.
- Parameters
-
| name | Root schema name. |
| columns | Ordered column descriptors. |
Definition at line 200 of file schema.hpp.
◆ build()
template<typename... Cols>
| static Schema signet::forge::Schema::build |
( |
std::string |
name, |
|
|
Cols &&... |
cols |
|
) |
| |
|
inlinestatic |
Build a Schema from typed Column<T> descriptors (variadic factory).
static Schema build(std::string name, Cols &&... cols)
Build a Schema from typed Column<T> descriptors (variadic factory).
const ColumnDescriptor & column(size_t index) const
Access a column descriptor by index.
@ TIMESTAMP_NS
Timestamp — INT64, nanoseconds since Unix epoch.
Typed column descriptor for the Schema::build() variadic API.
- Template Parameters
-
- Parameters
-
- Returns
- An immutable Schema.
Definition at line 217 of file schema.hpp.
◆ builder()
◆ column()
Access a column descriptor by index.
- Parameters
-
| index | Zero-based column index. |
- Returns
- Const reference to the ColumnDescriptor.
- Exceptions
-
Definition at line 244 of file schema.hpp.
◆ columns()
All column descriptors (ordered).
Definition at line 254 of file schema.hpp.
◆ find_column()
| std::optional< size_t > signet::forge::Schema::find_column |
( |
const std::string & |
col_name | ) |
const |
|
inline |
Find a column index by name.
- Parameters
-
| col_name | Column name to search for. |
- Returns
- The zero-based index, or
std::nullopt if not found.
Definition at line 261 of file schema.hpp.
◆ name()
| const std::string & signet::forge::Schema::name |
( |
| ) |
const |
|
inline |
Root schema name (e.g. "tick_data").
Definition at line 235 of file schema.hpp.
◆ num_columns()
| size_t signet::forge::Schema::num_columns |
( |
| ) |
const |
|
inline |
Number of columns in this schema.
Definition at line 238 of file schema.hpp.
◆ operator!=()
◆ operator==()
Equality — schemas match if they have the same name and identical columns (name, physical_type, logical_type, repetition, type_length).
Definition at line 272 of file schema.hpp.
The documentation for this class was generated from the following file: