Package org.apache.iceberg.expressions
Class InclusiveMetricsEvaluator
- java.lang.Object
-
- org.apache.iceberg.expressions.InclusiveMetricsEvaluator
-
public class InclusiveMetricsEvaluator extends java.lang.Object
Evaluates anExpression
on aDataFile
to test whether rows in the file may match.This evaluation is inclusive: it returns true if a file may match and false if it cannot match.
Files are passed to
eval(ContentFile)
, which returns true if the file may contain matching rows and false if the file cannot contain matching rows. Files may be skipped if and only if the return value ofeval
is false.Due to the comparison implementation of ORC stats, for float/double columns in ORC files, if the first value in a file is NaN, metrics of this file will report NaN for both upper and lower bound despite that the column could contain non-NaN data. Thus in some scenarios explicitly checks for NaN is necessary in order to not skip files that may contain matching data.
-
-
Constructor Summary
Constructors Constructor Description InclusiveMetricsEvaluator(Schema schema, Expression unbound)
InclusiveMetricsEvaluator(Schema schema, Expression unbound, boolean caseSensitive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
eval(ContentFile<?> file)
Test whether the file may contain records that match the expression.
-
-
-
Constructor Detail
-
InclusiveMetricsEvaluator
public InclusiveMetricsEvaluator(Schema schema, Expression unbound)
-
InclusiveMetricsEvaluator
public InclusiveMetricsEvaluator(Schema schema, Expression unbound, boolean caseSensitive)
-
-
Method Detail
-
eval
public boolean eval(ContentFile<?> file)
Test whether the file may contain records that match the expression.- Parameters:
file
- a data file- Returns:
- false if the file cannot contain rows that match the expression, true otherwise.
-
-