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

public static class Metadata_V3.ColumnMetadata_v3 extends MetadataBase.ColumnMetadata
A struct that contains the metadata for a column in a parquet file
  • Field Details

    • name

      public String[] name
    • nulls

      public Long nulls
    • minValue

      public Object minValue
    • maxValue

      public Object maxValue
  • Constructor Details

    • ColumnMetadata_v3

      public ColumnMetadata_v3()
    • ColumnMetadata_v3

      public ColumnMetadata_v3(String[] name, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName primitiveType, Object minValue, Object maxValue, Long nulls)
  • Method Details

    • setMin

      public void setMin(Object minValue)
      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 class MetadataBase.ColumnMetadata
    • setMax

      public void setMax(Object maxValue)
      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 class MetadataBase.ColumnMetadata
    • getName

      public String[] getName()
      Specified by:
      getName in class MetadataBase.ColumnMetadata
    • getNulls

      public Long getNulls()
      Specified by:
      getNulls in class MetadataBase.ColumnMetadata
    • hasSingleValue

      public boolean hasSingleValue(long rowCount)
      Checks that the column chunk has a single value. Returns true if minValue and maxValue are the same but not null and nulls count is 0 or equal to the rows count.

      Returns true if minValue and maxValue 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 class MetadataBase.ColumnMetadata
      Parameters:
      rowCount - rows count in column chunk
      Returns:
      true if column has single value
    • getMinValue

      public Object getMinValue()
      Specified by:
      getMinValue in class MetadataBase.ColumnMetadata
    • getMaxValue

      public Object getMaxValue()
      Specified by:
      getMaxValue in class MetadataBase.ColumnMetadata
    • getPrimitiveType

      public org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName getPrimitiveType()
      Specified by:
      getPrimitiveType in class MetadataBase.ColumnMetadata
    • getOriginalType

      public org.apache.parquet.schema.OriginalType getOriginalType()
      Specified by:
      getOriginalType in class MetadataBase.ColumnMetadata