Class Metadata_V1.ColumnMetadata_v1
java.lang.Object
org.apache.drill.exec.store.parquet.metadata.MetadataBase.ColumnMetadata
org.apache.drill.exec.store.parquet.metadata.Metadata_V1.ColumnMetadata_v1
- Enclosing class:
- Metadata_V1
A struct that contains the metadata for a column in a parquet file
-
Field Summary
Modifier and TypeFieldDescriptionorg.apache.parquet.schema.OriginalType
org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName
-
Constructor Summary
ConstructorDescriptionColumnMetadata_v1
(SchemaPath name, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType, org.apache.parquet.schema.OriginalType originalType, Object max, Object min, Long nulls) -
Method Summary
Modifier and TypeMethodDescriptiongetMax()
getMin()
String[]
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
setter used during deserialization of the 'max' field of the metadata cache file.void
setter used during deserialization of the 'min' field of the metadata cache file.Methods inherited from class org.apache.drill.exec.store.parquet.metadata.MetadataBase.ColumnMetadata
isNumNullsSet
-
Field Details
-
name
-
primitiveType
public org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType -
originalType
public org.apache.parquet.schema.OriginalType originalType -
nulls
-
max
-
min
-
-
Constructor Details
-
ColumnMetadata_v1
public ColumnMetadata_v1() -
ColumnMetadata_v1
public ColumnMetadata_v1(SchemaPath name, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType, org.apache.parquet.schema.OriginalType originalType, Object max, Object min, Long nulls)
-
-
Method Details
-
getMin
-
getMax
-
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
-
setMin
setter used during deserialization of the 'min' field of the metadata cache file.- Specified by:
setMin
in classMetadataBase.ColumnMetadata
- Parameters:
min
-
-
setMax
setter used during deserialization of the 'max' field of the metadata cache file.- Specified by:
setMax
in classMetadataBase.ColumnMetadata
- Parameters:
max
-
-
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
ifmin
andmax
are the same but not null and nulls count is 0 or equal to the rows count.Returns
true
ifmin
andmax
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
-