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
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionColumnMetadata_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.OriginalType
org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName
boolean
hasSingleValue
(long rowCount) Checks that the column chunk has a single value.void
Set the max value recorded in the parquet metadata statistics.void
Set 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.ColumnMetadata
Set 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:
setMax
in classMetadataBase.ColumnMetadata
-
getName
- Specified by:
getName
in classMetadataBase.ColumnMetadata
-
getNulls
- Specified by:
getNulls
in classMetadataBase.ColumnMetadata
-
hasSingleValue
public boolean hasSingleValue(long rowCount) Checks that the column chunk has a single value. Returnstrue
ifmxValue
is 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:
hasSingleValue
in classMetadataBase.ColumnMetadata
- Parameters:
rowCount
- rows count in column chunk- Returns:
- true if column has single value
-
getMinValue
- Specified by:
getMinValue
in classMetadataBase.ColumnMetadata
-
getMaxValue
- Specified by:
getMaxValue
in classMetadataBase.ColumnMetadata
-
setMin
Description copied from class:MetadataBase.ColumnMetadata
Set 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:
setMin
in classMetadataBase.ColumnMetadata
-
getPrimitiveType
public org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName getPrimitiveType()- Specified by:
getPrimitiveType
in classMetadataBase.ColumnMetadata
-
getOriginalType
public org.apache.parquet.schema.OriginalType getOriginalType()- Specified by:
getOriginalType
in classMetadataBase.ColumnMetadata
-