Package org.apache.iceberg
Class Metrics
- java.lang.Object
-
- org.apache.iceberg.Metrics
-
- All Implemented Interfaces:
java.io.Serializable
public class Metrics extends java.lang.Object implements java.io.Serializable
Iceberg file format metrics.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Metrics()
Metrics(java.lang.Long rowCount, java.util.Map<java.lang.Integer,java.lang.Long> columnSizes, java.util.Map<java.lang.Integer,java.lang.Long> valueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nullValueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nanValueCounts)
Metrics(java.lang.Long rowCount, java.util.Map<java.lang.Integer,java.lang.Long> columnSizes, java.util.Map<java.lang.Integer,java.lang.Long> valueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nullValueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nanValueCounts, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> lowerBounds, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> upperBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Integer,java.lang.Long>
columnSizes()
Get the number of bytes for all fields in a file.java.util.Map<java.lang.Integer,java.nio.ByteBuffer>
lowerBounds()
Get the non-null lower bound values for all fields in a file.java.util.Map<java.lang.Integer,java.lang.Long>
nanValueCounts()
Get the number of NaN values for all float and double fields in a file.java.util.Map<java.lang.Integer,java.lang.Long>
nullValueCounts()
Get the number of null values for all fields in a file.java.lang.Long
recordCount()
Get the number of records (rows) in file.java.util.Map<java.lang.Integer,java.nio.ByteBuffer>
upperBounds()
Get the non-null upper bound values for all fields in a file.java.util.Map<java.lang.Integer,java.lang.Long>
valueCounts()
Get the number of all values, including nulls, NaN and repeated.
-
-
-
Constructor Detail
-
Metrics
public Metrics()
-
Metrics
public Metrics(java.lang.Long rowCount, java.util.Map<java.lang.Integer,java.lang.Long> columnSizes, java.util.Map<java.lang.Integer,java.lang.Long> valueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nullValueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nanValueCounts)
-
Metrics
public Metrics(java.lang.Long rowCount, java.util.Map<java.lang.Integer,java.lang.Long> columnSizes, java.util.Map<java.lang.Integer,java.lang.Long> valueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nullValueCounts, java.util.Map<java.lang.Integer,java.lang.Long> nanValueCounts, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> lowerBounds, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> upperBounds)
-
-
Method Detail
-
recordCount
public java.lang.Long recordCount()
Get the number of records (rows) in file.- Returns:
- the count of records (rows) in the file as a long
-
columnSizes
public java.util.Map<java.lang.Integer,java.lang.Long> columnSizes()
Get the number of bytes for all fields in a file.- Returns:
- a Map of fieldId to the size in bytes
-
valueCounts
public java.util.Map<java.lang.Integer,java.lang.Long> valueCounts()
Get the number of all values, including nulls, NaN and repeated.- Returns:
- a Map of fieldId to the number of all values including nulls, NaN and repeated
-
nullValueCounts
public java.util.Map<java.lang.Integer,java.lang.Long> nullValueCounts()
Get the number of null values for all fields in a file.- Returns:
- a Map of fieldId to the number of nulls
-
nanValueCounts
public java.util.Map<java.lang.Integer,java.lang.Long> nanValueCounts()
Get the number of NaN values for all float and double fields in a file.- Returns:
- a Map of fieldId to the number of NaN counts
-
lowerBounds
public java.util.Map<java.lang.Integer,java.nio.ByteBuffer> lowerBounds()
Get the non-null lower bound values for all fields in a file.To convert the
ByteBuffer
back to a value, useConversions.fromByteBuffer(org.apache.iceberg.types.Type, java.nio.ByteBuffer)
.- Returns:
- a Map of fieldId to the lower bound value as a ByteBuffer
- See Also:
- Iceberg Spec - Appendix D: Single-value serialization
-
upperBounds
public java.util.Map<java.lang.Integer,java.nio.ByteBuffer> upperBounds()
Get the non-null upper bound values for all fields in a file.- Returns:
- a Map of fieldId to the upper bound value as a ByteBuffer
-
-