Class Projections
- java.lang.Object
-
- org.apache.iceberg.expressions.Projections
-
public class Projections extends java.lang.Object
Utils to project expressions on rows to expressions on partitions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Projections.ProjectionEvaluator
A class that projects expressions for a table's data rows into expressions on the table's partition values, for a table'spartition spec
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Projections.ProjectionEvaluator
inclusive(PartitionSpec spec)
Creates an inclusiveProjectionEvaluator
for thespec
, defaulting to case sensitive mode.static Projections.ProjectionEvaluator
inclusive(PartitionSpec spec, boolean caseSensitive)
Creates an inclusiveProjectionEvaluator
for thespec
.static Projections.ProjectionEvaluator
strict(PartitionSpec spec)
Creates a strictProjectionEvaluator
for thespec
, defaulting to case sensitive mode.static Projections.ProjectionEvaluator
strict(PartitionSpec spec, boolean caseSensitive)
Creates a strictProjectionEvaluator
for thespec
.
-
-
-
Method Detail
-
inclusive
public static Projections.ProjectionEvaluator inclusive(PartitionSpec spec)
Creates an inclusiveProjectionEvaluator
for thespec
, defaulting to case sensitive mode.An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is inclusive and will build expressions with the following guarantee: if the original expression matches a row, then the projected expression will match that row's partition.
Each predicate in the expression is projected using
Transform.project(String, BoundPredicate)
.- Parameters:
spec
- a partition spec- Returns:
- an inclusive projection evaluator for the partition spec
- See Also:
Inclusive transform used for each predicate
-
inclusive
public static Projections.ProjectionEvaluator inclusive(PartitionSpec spec, boolean caseSensitive)
Creates an inclusiveProjectionEvaluator
for thespec
.An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is inclusive and will build expressions with the following guarantee: if the original expression matches a row, then the projected expression will match that row's partition.
Each predicate in the expression is projected using
Transform.project(String, BoundPredicate)
.- Parameters:
spec
- a partition speccaseSensitive
- whether the Projection should consider case sensitivity on column names or not.- Returns:
- an inclusive projection evaluator for the partition spec
- See Also:
Inclusive transform used for each predicate
-
strict
public static Projections.ProjectionEvaluator strict(PartitionSpec spec)
Creates a strictProjectionEvaluator
for thespec
, defaulting to case sensitive mode.An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is strict and will build expressions with the following guarantee: if the projected expression matches a partition, then the original expression will match all rows in that partition.
Each predicate in the expression is projected using
Transform.projectStrict(String, BoundPredicate)
.- Parameters:
spec
- a partition spec- Returns:
- a strict projection evaluator for the partition spec
- See Also:
Strict transform used for each predicate
-
strict
public static Projections.ProjectionEvaluator strict(PartitionSpec spec, boolean caseSensitive)
Creates a strictProjectionEvaluator
for thespec
.An evaluator is used to project expressions for a table's data rows into expressions on the table's partition values. The evaluator returned by this function is strict and will build expressions with the following guarantee: if the projected expression matches a partition, then the original expression will match all rows in that partition.
Each predicate in the expression is projected using
Transform.projectStrict(String, BoundPredicate)
.- Parameters:
spec
- a partition speccaseSensitive
- whether the Projection should consider case sensitivity on column names or not.- Returns:
- a strict projection evaluator for the partition spec
- See Also:
Strict transform used for each predicate
-
-