Class Metadata_V2.ColumnMetadata_v2
java.lang.Object
org.apache.drill.exec.store.parquet.metadata.MetadataBase.ColumnMetadata
org.apache.drill.exec.store.parquet.metadata.Metadata_V2.ColumnMetadata_v2
- Enclosing class:
Metadata_V2
A struct that contains the metadata for a column in a parquet file
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionColumnMetadata_v2(String[] name, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType, Object mxValue, Long nulls) -
Method Summary
Modifier and TypeMethodDescriptionString[]getName()getNulls()org.apache.parquet.schema.OriginalTypeorg.apache.parquet.schema.PrimitiveType.PrimitiveTypeNamebooleanhasSingleValue(long rowCount) Checks that the column chunk has a single value.voidSet the max value recorded in the parquet metadata statistics.voidSet the min value recorded in the parquet metadata statistics.Methods inherited from class org.apache.drill.exec.store.parquet.metadata.MetadataBase.ColumnMetadata
isNumNullsSet
-
Field Details
-
name
-
nulls
-
mxValue
-
-
Constructor Details
-
ColumnMetadata_v2
public ColumnMetadata_v2() -
ColumnMetadata_v2
-
-
Method Details
-
setMax
Description copied from class:MetadataBase.ColumnMetadataSet the max value recorded in the parquet metadata statistics. This object would just be immutable, but due to Drill-4203 we need to correct date values that had been corrupted by earlier versions of Drill.- Specified by:
setMaxin classMetadataBase.ColumnMetadata
-
getName
- Specified by:
getNamein classMetadataBase.ColumnMetadata
-
getNulls
- Specified by:
getNullsin classMetadataBase.ColumnMetadata
-
hasSingleValue
public boolean hasSingleValue(long rowCount) Checks that the column chunk has a single value. ReturnstrueifmxValueis not null and nulls count is 0 or if nulls count is equal to the rows count.Comparison of nulls and rows count is needed for the cases:
- column with primitive type has single value and null values
- column with binary type has only null values, so column has single value
- Specified by:
hasSingleValuein classMetadataBase.ColumnMetadata- Parameters:
rowCount- rows count in column chunk- Returns:
- true if column has single value
-
getMinValue
- Specified by:
getMinValuein classMetadataBase.ColumnMetadata
-
getMaxValue
- Specified by:
getMaxValuein classMetadataBase.ColumnMetadata
-
setMin
Description copied from class:MetadataBase.ColumnMetadataSet the min value recorded in the parquet metadata statistics. This object would just be immutable, but due to Drill-4203 we need to correct date values that had been corrupted by earlier versions of Drill.- Specified by:
setMinin classMetadataBase.ColumnMetadata
-
getPrimitiveType
public org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName getPrimitiveType()- Specified by:
getPrimitiveTypein classMetadataBase.ColumnMetadata
-
getOriginalType
public org.apache.parquet.schema.OriginalType getOriginalType()- Specified by:
getOriginalTypein classMetadataBase.ColumnMetadata
-