Package org.apache.iceberg.expressions
Class Expressions
java.lang.Object
org.apache.iceberg.expressions.Expressions
Factory methods for creating
expressions
.-
Method Summary
Modifier and TypeMethodDescriptionstatic False
static True
static Expression
and
(Expression left, Expression right) static Expression
and
(Expression left, Expression right, Expression... expressions) static <T> UnboundTerm
<T> static <T> UnboundAggregate
<T> static <T> UnboundAggregate
<T> static <T> UnboundTerm
<T> static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> equal
(UnboundTerm<T> expr, T value) static <T> UnboundPredicate
<T> greaterThan
(String name, T value) static <T> UnboundPredicate
<T> greaterThan
(UnboundTerm<T> expr, T value) static <T> UnboundPredicate
<T> greaterThanOrEqual
(String name, T value) static <T> UnboundPredicate
<T> greaterThanOrEqual
(UnboundTerm<T> expr, T value) static <T> UnboundTerm
<T> static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> in
(UnboundTerm<T> expr, Iterable<T> values) static <T> UnboundPredicate
<T> in
(UnboundTerm<T> expr, T... values) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> isNaN
(UnboundTerm<T> expr) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> isNull
(UnboundTerm<T> expr) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> lessThan
(UnboundTerm<T> expr, T value) static <T> UnboundPredicate
<T> lessThanOrEqual
(String name, T value) static <T> UnboundPredicate
<T> lessThanOrEqual
(UnboundTerm<T> expr, T value) static <T> Literal
<T> lit
(T value) Create aLiteral
from an Object.static <T> UnboundAggregate
<T> static <T> UnboundAggregate
<T> static <T> UnboundTerm
<T> static Expression
not
(Expression child) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> notEqual
(UnboundTerm<T> expr, T value) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> notIn
(UnboundTerm<T> expr, Iterable<T> values) static <T> UnboundPredicate
<T> notIn
(UnboundTerm<T> expr, T... values) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> notNaN
(UnboundTerm<T> expr) static <T> UnboundPredicate
<T> static <T> UnboundPredicate
<T> notNull
(UnboundTerm<T> expr) static UnboundPredicate
<String> notStartsWith
(String name, String value) static UnboundPredicate
<String> notStartsWith
(UnboundTerm<String> expr, String value) static Expression
or
(Expression left, Expression right) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, String name) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, String name, Iterable<T> values) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, String name, Literal<T> lit) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, String name, T value) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, UnboundTerm<T> expr) static <T> UnboundPredicate
<T> predicate
(Expression.Operation op, UnboundTerm<T> expr, Iterable<T> values) static <T> NamedReference
<T> Constructs a reference for a given column.static Expression
rewriteNot
(Expression expr) static UnboundPredicate
<String> startsWith
(String name, String value) static UnboundPredicate
<String> startsWith
(UnboundTerm<String> expr, String value) static <T> UnboundTerm
<T> Constructs a transform expression for a given column.static <T> UnboundTerm
<T> static <T> UnboundTerm
<T>
-
Method Details
-
and
-
and
-
or
-
not
-
bucket
-
year
-
month
-
day
-
hour
-
truncate
-
isNull
-
isNull
-
notNull
-
notNull
-
isNaN
-
isNaN
-
notNaN
-
notNaN
-
lessThan
-
lessThan
-
lessThanOrEqual
-
lessThanOrEqual
-
greaterThan
-
greaterThan
-
greaterThanOrEqual
-
greaterThanOrEqual
-
equal
-
equal
-
notEqual
-
notEqual
-
startsWith
-
startsWith
-
notStartsWith
-
notStartsWith
-
in
-
in
-
in
-
in
-
notIn
-
notIn
-
notIn
-
notIn
-
predicate
-
predicate
public static <T> UnboundPredicate<T> predicate(Expression.Operation op, String name, Literal<T> lit) -
predicate
public static <T> UnboundPredicate<T> predicate(Expression.Operation op, String name, Iterable<T> values) -
predicate
-
predicate
public static <T> UnboundPredicate<T> predicate(Expression.Operation op, UnboundTerm<T> expr, Iterable<T> values) -
predicate
-
alwaysTrue
-
alwaysFalse
-
rewriteNot
-
ref
Constructs a reference for a given column.The following are equivalent: equals("a", 5) and equals(ref("a"), 5).
- Type Parameters:
T
- the Java type of this reference- Parameters:
name
- a column name- Returns:
- a named reference
-
transform
Constructs a transform expression for a given column.- Type Parameters:
T
- the Java type of this term- Parameters:
name
- a column nametransform
- a transform function- Returns:
- an unbound transform expression
-
lit
Create aLiteral
from an Object.- Type Parameters:
T
- Java type of value- Parameters:
value
- a value- Returns:
- a Literal for the given value
- Throws:
IllegalArgumentException
- if the value has no literal implementation
-
count
-
countStar
-
max
-
min
-