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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionColumnMetadata_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.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
-
minValue
-
maxValue
-
-
Constructor Details
-
ColumnMetadata_v3
public ColumnMetadata_v3() -
ColumnMetadata_v3
-
-
Method Details
-
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
-
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
ifminValue
andmaxValue
are the same but not null and nulls count is 0 or equal to the rows count.Returns
true
ifminValue
andmaxValue
are 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:
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
-
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
-