Package org.apache.iceberg.expressions
Class Expressions
java.lang.Object
org.apache.iceberg.expressions.Expressions
Factory methods for creating 
expressions.- 
Method SummaryModifier and TypeMethodDescriptionstatic Falsestatic Truestatic Expressionand(Expression left, Expression right) static Expressionand(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> UnboundTerm<T> 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 aLiteralfrom an Object.static <T> UnboundAggregate<T> micros(long micros) Create aLiteralfrom a microsecond value.millis(long millis) Create aLiteralfrom a millisecond value.static <T> UnboundAggregate<T> static <T> UnboundTerm<T> nanos(long nanos) Create aLiteralfrom a nanosecond value.static Expressionnot(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 Expressionor(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 ExpressionrewriteNot(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
- 
extract
- 
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
- 
predicatepublic static <T> UnboundPredicate<T> predicate(Expression.Operation op, String name, Literal<T> lit) 
- 
predicatepublic static <T> UnboundPredicate<T> predicate(Expression.Operation op, String name, Iterable<T> values) 
- 
predicate
- 
predicatepublic static <T> UnboundPredicate<T> predicate(Expression.Operation op, UnboundTerm<T> expr, Iterable<T> values) 
- 
predicate
- 
alwaysTrue
- 
alwaysFalse
- 
rewriteNot
- 
refConstructs 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
 
- 
transformConstructs a transform expression for a given column.- Type Parameters:
- T- the Java type of this term
- Parameters:
- name- a column name
- transform- a transform function
- Returns:
- an unbound transform expression
 
- 
litCreate aLiteralfrom 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
 
- 
microsCreate aLiteralfrom a microsecond value.- Parameters:
- micros- a timestamp in microseconds from the unix epoch
- Returns:
- a literal representing the timestamp
 
- 
millisCreate aLiteralfrom a millisecond value.- Parameters:
- millis- a timestamp in milliseconds from the unix epoch
- Returns:
- a literal representing the timestamp
 
- 
nanosCreate aLiteralfrom a nanosecond value.- Parameters:
- nanos- a timestamp in nanoseconds from the unix epoch
- Returns:
- a literal representing the timestamp
 
- 
count
- 
countStar
- 
max
- 
min
 
-