Package org.apache.iceberg.parquet
Class ParquetVariantVisitor<R>
java.lang.Object
org.apache.iceberg.parquet.ParquetVariantVisitor<R>
- Direct Known Subclasses:
VariantReaderBuilder
,VariantWriterBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterField
(org.apache.parquet.schema.Type type) Handler called after visiting any primitive or group type.Handles a shredded array value result and an element value result.void
beforeField
(org.apache.parquet.schema.Type type) Handler called before visiting any primitive or group type.metadata
(org.apache.parquet.schema.PrimitiveType metadata) Handles a serialized variant metadata column.Handles a shredded object value result and a list of field value results.primitive
(org.apache.parquet.schema.PrimitiveType primitive) Handles a shredded primitive typed_value column.serialized
(org.apache.parquet.schema.PrimitiveType value) Handles a serialized variant value column.Handles a variant value result and typed_value result pair.Handles the root variant column group.static <R> R
visit
(org.apache.parquet.schema.GroupType type, ParquetVariantVisitor<R> visitor)
-
Constructor Details
-
ParquetVariantVisitor
public ParquetVariantVisitor()
-
-
Method Details
-
variant
Handles the root variant column group.The value and typed_value results are combined by calling
value(org.apache.parquet.schema.GroupType, R, R)
.group v (VARIANT) { <-- metadata result and combined value and typed_value result required binary metadata; optional binary value; optional ... typed_value; }
-
metadata
Handles a serialized variant metadata column.group v (VARIANT) { required binary metadata; <-- this column optional binary value; optional ... typed_value; }
-
serialized
Handles a serialized variant value column.group variant_value_pair { optional binary value; <-- this column optional ... typed_value; }
-
primitive
Handles a shredded primitive typed_value column.group variant_value_pair { optional binary value; optional int32 typed_value; <-- this column when it is any primitive }
-
value
Handles a variant value result and typed_value result pair.The value and typed_value pair may be nested in an object field, array element, or in the root group of a variant.
This method is also called when the typed_value field is missing.
group variant_value_pair { <-- value result and typed_value result optional binary value; optional ... typed_value; }
-
object
Handles a shredded object value result and a list of field value results.Each field's value and typed_value results are combined by calling
value(org.apache.parquet.schema.GroupType, R, R)
.group variant_value_pair { <-- value result and typed_value field results optional binary value; optional group typed_value { required group a { optional binary value; optional binary typed_value (UTF8); } ... } }
-
array
Handles a shredded array value result and an element value result.The element's value and typed_value results are combined by calling
value(org.apache.parquet.schema.GroupType, R, R)
.group variant_value_pair { <-- value result and element result optional binary value; optional group typed_value (LIST) { repeated group list { required group element { optional binary value; optional binary typed_value (UTF8); } } } }
-
beforeField
public void beforeField(org.apache.parquet.schema.Type type) Handler called before visiting any primitive or group type. -
afterField
public void afterField(org.apache.parquet.schema.Type type) Handler called after visiting any primitive or group type. -
visit
public static <R> R visit(org.apache.parquet.schema.GroupType type, ParquetVariantVisitor<R> visitor)
-