Class Metadata_V3.ColumnMetadata_v3
java.lang.Object
org.apache.drill.exec.store.parquet.metadata.MetadataBase.ColumnMetadata
org.apache.drill.exec.store.parquet.metadata.Metadata_V3.ColumnMetadata_v3
- Direct Known Subclasses:
Metadata_V4.ColumnMetadata_v4
- Enclosing class:
Metadata_V3
A struct that contains the metadata for a column in a parquet file
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionColumnMetadata_v3(String[] name, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType, Object minValue, Object maxValue, 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
-
minValue
-
maxValue
-
-
Constructor Details
-
ColumnMetadata_v3
public ColumnMetadata_v3() -
ColumnMetadata_v3
-
-
Method Details
-
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
-
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. ReturnstrueifminValueandmaxValueare the same but not null and nulls count is 0 or equal to the rows count.Returns
trueifminValueandmaxValueare null and the number of null values in the column chunk 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 primitive type has only null values, min/max couldn't be null, but 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
-
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
-