Class DataFileStatistics

Object
io.delta.kernel.utils.DataFileStatistics

public class DataFileStatistics extends Object
Statistics about data file in a Delta Lake table.
  • Constructor Details

    • DataFileStatistics

      public DataFileStatistics(long numRecords, Map<Column,Literal> minValues, Map<Column,Literal> maxValues, Map<Column,Long> nullCounts)
      Create a new instance of DataFileStatistics.
      Parameters:
      numRecords - Number of records in the data file.
      minValues - Map of column to minimum value of it in the data file. If the data file has all nulls for the column, the value will be null or not present in the map.
      maxValues - Map of column to maximum value of it in the data file. If the data file has all nulls for the column, the value will be null or not present in the map.
      nullCounts - Map of column to number of nulls in the data file.
  • Method Details

    • getNumRecords

      public long getNumRecords()
      Get the number of records in the data file.
      Returns:
      Number of records in the data file.
    • getMinValues

      public Map<Column,Literal> getMinValues()
      Get the minimum values of the columns in the data file. The map may contain statistics for only a subset of columns in the data file.
      Returns:
      Map of column to minimum value of it in the data file.
    • getMaxValues

      public Map<Column,Literal> getMaxValues()
      Get the maximum values of the columns in the data file. The map may contain statistics for only a subset of columns in the data file.
      Returns:
      Map of column to minimum value of it in the data file.
    • getNullCounts

      public Map<Column,Long> getNullCounts()
      Get the number of nulls of columns in the data file. The map may contain statistics for only a subset of columns in the data file.
      Returns:
      Map of column to number of nulls in the data file.
    • serializeAsJson

      public String serializeAsJson()