Package io.delta.kernel.utils
Class DataFileStatistics
Object
io.delta.kernel.utils.DataFileStatistics
Statistics about data file in a Delta Lake table.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the maximum values of the columns in the data file.Get the minimum values of the columns in the data file.Get the number of nulls of columns in the data file.longGet the number of records in the data file.
-
Constructor Details
-
DataFileStatistics
public DataFileStatistics(long numRecords, Map<Column, Literal> minValues, Map<Column, Literal> maxValues, Map<Column, Long> nullCounts) Create a new instance ofDataFileStatistics.- 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
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
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
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
-