SchemaElement
Represents a element inside a schema definition.
- if it is a group (inner node) then type is undefined and num_children is defined
- if it is a primitive type (leaf) then type is defined and num_children is undefined the nodes are listed in depth first traversal order.
Properties
- $_TSPEC : mixed
- $converted_type : int
- DEPRECATED: When the schema is the result of a conversion from another model.
- $field_id : int
- When the original schema supports field ids, this will save the original field id in the parquet schema.
- $isValidate : mixed
- $logicalType : LogicalType
- The logical type of this SchemaElement.
- $name : string
- Name of the field in the schema.
- $num_children : int
- Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal.
- $precision : int
- $repetition_type : int
- repetition of the field. The root of the schema does not have a repetition_type.
- $scale : int
- DEPRECATED: Used when this column contains decimal data.
- $type : int
- Data type for this field. Not set if the current element is a non-leaf node.
- $type_length : int
- If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values.
Methods
- __construct() : mixed
- getName() : mixed
- read() : mixed
- write() : mixed
Properties
$_TSPEC
public
static mixed
$_TSPEC
= [1 => ['var' => 'type', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32, 'class' => '\Flow\Parquet\Thrift\Type'], 2 => ['var' => 'type_length', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 3 => ['var' => 'repetition_type', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32, 'class' => '\Flow\Parquet\Thrift\FieldRepetitionType'], 4 => ['var' => 'name', 'isRequired' => true, 'type' => \Thrift\Type\TType::STRING], 5 => ['var' => 'num_children', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 6 => ['var' => 'converted_type', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32, 'class' => '\Flow\Parquet\Thrift\ConvertedType'], 7 => ['var' => 'scale', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 8 => ['var' => 'precision', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 9 => ['var' => 'field_id', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 10 => ['var' => 'logicalType', 'isRequired' => false, 'type' => \Thrift\Type\TType::STRUCT, 'class' => '\Flow\Parquet\Thrift\LogicalType']]
$converted_type
DEPRECATED: When the schema is the result of a conversion from another model.
public
int
$converted_type
Used to record the original type to help with cross conversion.
This is superseded by logicalType.
$field_id
When the original schema supports field ids, this will save the original field id in the parquet schema.
public
int
$field_id
$isValidate
public
static mixed
$isValidate
= false
$logicalType
The logical type of this SchemaElement.
public
LogicalType
$logicalType
LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
$name
Name of the field in the schema.
public
string
$name
$num_children
Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal.
public
int
$num_children
The children count is used to construct the nested relationship. This field is not set when the element is a primitive type.
$precision
public
int
$precision
$repetition_type
repetition of the field. The root of the schema does not have a repetition_type.
public
int
$repetition_type
All other nodes must have one.
$scale
DEPRECATED: Used when this column contains decimal data.
public
int
$scale
See the DECIMAL converted type for more details.
This is superseded by using the DecimalType annotation in logicalType.
$type
Data type for this field. Not set if the current element is a non-leaf node.
public
int
$type
$type_length
If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the values.
public
int
$type_length
Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
Methods
__construct()
public
__construct([mixed $vals = null ]) : mixed
Parameters
- $vals : mixed = null
getName()
public
getName() : mixed
read()
public
read(mixed $input) : mixed
Parameters
- $input : mixed
write()
public
write(mixed $output) : mixed
Parameters
- $output : mixed