Class Expression
Expressions are composed via the static factories (root(), getItem(String, Expression), etc.).
Each returned Expression owns its native pointer; the pointer is released automatically when the
Expression is no longer reachable. Passing an expression as an input to a builder does not transfer
ownership — the resulting expression is an independent copy on the native side.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumBinary operator codes; must match the Rustparse_optable.static enumPrimitiveExpression.DTypes that can be used to construct typed null literals vianullLiteral(DType).static enumStrategy for resolving duplicate field names inmerge(DuplicateHandling, Expression...).static enumTime units for Date/Timestamp literals. -
Method Summary
Modifier and TypeMethodDescriptionstatic Expressionand(Expression... operands) Logical AND.static Expressionbetween(Expression value, Expression lower, Expression upper, boolean lowerStrict, boolean upperStrict) value BETWEEN lower AND upper.static Expressionbinary(Expression.BinaryOp op, Expression lhs, Expression rhs) static ExpressionShortcut forgetItem(fieldName, root()).static ExpressionAccess a nested field by walkingfieldNamesstarting from the root of the array.static ExpressiongetItem(String fieldName, Expression child) Access a named field from a struct expression.static Expressionin(Expression value, Expression list) SQLvalue IN (list):listContains(Expression, Expression, boolean)with SQL null semantics and the operands in SQL order.static ExpressionisNotNull(Expression child) static ExpressionisNull(Expression child) static Expressionlike(Expression child, Expression pattern, boolean negated, boolean caseInsensitive) SQLLIKEpattern match.static ExpressionlistContains(Expression list, Expression needle) Whether the listlistevaluates to containsneedle, with Vortex's null rules: a null element never matches anything, so a needle that matches no element isfalse.static ExpressionlistContains(Expression list, Expression needle, boolean sqlNullSemantics) listContains(Expression, Expression)with a choice of null rules.static Expressionliteral(boolean value) static Expressionliteral(byte value) static Expressionliteral(byte[] value) static Expressionliteral(double value) static Expressionliteral(float value) static Expressionliteral(int value) static Expressionliteral(long value) static Expressionliteral(short value) static Expressionstatic ExpressionCreate a UUID literal, enabling predicate pushdown over UUID columns.static ExpressionliteralDate(long value, Expression.TimeUnit unit) Create a Date literal.static ExpressionliteralDecimal(BigInteger unscaledValue, int precision, int scale) Create a decimal literal from its unscaled two's-complement big-endian byte representation (i.e.static ExpressionliteralEmptyList(Expression.DType elementType) Create an empty list literal with the given nullable element type.static ExpressionliteralList(Expression... elements) Create a list literal out of literal element expressions, for example the right-hand side of anINset.static ExpressionliteralTimestamp(long value, Expression.TimeUnit unit, String timezone) Create a Timestamp literal.static ExpressionliteralUuid(byte[] bigEndianBytes) Create a UUID literal from its 16-byte big-endian (network order) representation, for example the bytes of Arrow's canonical UUID type or aUUIDserialized most-significant-bits first.static Expressionmerge(Expression... expressions) Merge struct expressions, failing if any field name is duplicated.static Expressionmerge(Expression.DuplicateHandling duplicateHandling, Expression... expressions) Merge struct expressions into a single struct, combining their fields in order.static Expressionnot(Expression child) static ExpressionnotIn(Expression value, Expression list) SQLvalue NOT IN (list): the negation ofin(Expression, Expression).static ExpressionnullLiteral(Expression.DType dtype) Create a typed null literal of the given primitiveExpression.DType.static Expressionstatic ExpressionNull Date literal.static ExpressionnullLiteralDecimal(int precision, int scale) Create a null decimal literal with the specified precision and scale.static ExpressionnullLiteralList(Expression.DType elementType) Create a null list literal with the given nullable element type.static ExpressionnullLiteralTimestamp(Expression.TimeUnit unit, String timezone) Null Timestamp literal.static ExpressionCreate a null UUID literal.static Expressionor(Expression... operands) Logical OR.static Expressionpack(String[] fieldNames, Expression[] expressions, boolean nullable) Creates an expression that packs values into a struct with named fields.static Expressionroot()The root expression: applying it to an array yields the array itself.static ExpressionrowIdx()The row-index expression.static Expressionselect(String[] fieldNames, Expression child) Project a subset of fields out of a struct expression.
-
Method Details
-
root
The root expression: applying it to an array yields the array itself. -
rowIdx
The row-index expression. When evaluated as part of a Vortex scan it yields, as a non-nullableu64, each row's index in the file before filtering: the index is assigned to the unfiltered rows, so filtered-out rows leave gaps and the surviving rows keep their original positions rather than being renumbered. It cannot be evaluated outside of a scan. -
getItem
Access a named field from a struct expression. -
column
Shortcut forgetItem(fieldName, root()). -
column
Access a nested field by walkingfieldNamesstarting from the root of the array. With a single name this is equivalent tocolumn(String). -
select
Project a subset of fields out of a struct expression. -
pack
Creates an expression that packs values into a struct with named fields. -
merge
public static Expression merge(Expression.DuplicateHandling duplicateHandling, Expression... expressions) Merge struct expressions into a single struct, combining their fields in order.Every input must evaluate to a non-nullable struct. When the same field name appears in more than one input,
duplicateHandlingdecides the result. Fields are not merged recursively — a later field replaces an earlier one with the same name. Merging zero expressions yields an empty struct. -
merge
Merge struct expressions, failing if any field name is duplicated. Equivalent tomerge(DuplicateHandling, Expression...)withExpression.DuplicateHandling.ERROR. -
and
Logical AND. Requires at least one operand. -
or
Logical OR. Requires at least one operand. -
binary
-
not
-
isNull
-
isNotNull
-
like
public static Expression like(Expression child, Expression pattern, boolean negated, boolean caseInsensitive) SQLLIKEpattern match.- Parameters:
negated- whether to invert the result (i.e.NOT LIKE)caseInsensitive- whether to perform case-insensitive matching (ILIKE)
-
between
public static Expression between(Expression value, Expression lower, Expression upper, boolean lowerStrict, boolean upperStrict) value BETWEEN lower AND upper.- Parameters:
lowerStrict-trueforlower < value;falseforlower <= value.upperStrict-trueforvalue < upper;falseforvalue <= upper.
-
listContains
Whether the listlistevaluates to containsneedle, with Vortex's null rules: a null element never matches anything, so a needle that matches no element isfalse. A nullneedleis null, except against an empty list, where the result isfalse.listmust evaluate to a Vortex list whose element type matchesneedle's type, ignoring nullability. With alist literalon the left and a column on the right this is a set-membership test that a constant-set kernel answers in one pass over the column, however large the set. -
listContains
listContains(Expression, Expression)with a choice of null rules.- Parameters:
sqlNullSemantics-falsefor Vortex's rules, where a null element never matches;truefor SQL's three-valuedIN, where a null element is an unknown value, so a needle that matches no element isnullrather thanfalsewhenever the list holds a null. A null needle is null, except against an empty list with Vortex's default rules, where the result isfalse.
-
in
SQLvalue IN (list):listContains(Expression, Expression, boolean)with SQL null semantics and the operands in SQL order. A nullvalueis null, and so is a non-match against a list that holds a null; both filter the row out of a scan. -
notIn
SQLvalue NOT IN (list): the negation ofin(Expression, Expression). Under SQL's rules a nullvalue, or a list that holds a null, makes a non-match null rather than true, so such a row is never admitted. -
literal
-
nullLiteralBool
-
literal
-
literal
-
literal
-
literal
-
literal
-
literal
-
literal
-
literal
-
literalList
Create a list literal out of literal element expressions, for example the right-hand side of anINset.Every element must itself be a literal and the elements must share a type, ignoring nullability; the list's element type is that shared type, made nullable if any element is. The list itself is non-null.
- Parameters:
elements- at least one element; useliteralEmptyList(DType)for an empty list, which has no element to take a type from
-
literalEmptyList
Create an empty list literal with the given nullable element type. It contains nothing, so nothing is in it. -
nullLiteralList
Create a null list literal with the given nullable element type. -
literalDecimal
Create a decimal literal from its unscaled two's-complement big-endian byte representation (i.e. the value returned byBigInteger.toByteArray()). -
nullLiteralDecimal
Create a null decimal literal with the specified precision and scale. -
literalDate
Create a Date literal. Thevalueis the number ofunitunits since the Unix epoch.- Parameters:
unit- onlyExpression.TimeUnit.DAYSandExpression.TimeUnit.MILLISECONDSare valid for Date.
-
nullLiteralDate
Null Date literal. SeeliteralDate(long, TimeUnit)for theunitconstraints. -
literalTimestamp
Create a Timestamp literal. Thevalueis the number ofunitunits since the Unix epoch.- Parameters:
timezone- optional IANA timezone identifier (e.g."UTC","America/Los_Angeles"). Passnullfor a local (zone-naive) timestamp.
-
nullLiteralTimestamp
Null Timestamp literal. SeeliteralTimestamp(long, TimeUnit, String)for parameter semantics. -
literal
Create a UUID literal, enabling predicate pushdown over UUID columns. The value is stored as its 16-byte big-endian (network order) representation, matching Vortex's UUID extension type and Arrow's canonical UUID type. -
literalUuid
Create a UUID literal from its 16-byte big-endian (network order) representation, for example the bytes of Arrow's canonical UUID type or aUUIDserialized most-significant-bits first.- Parameters:
bigEndianBytes- exactly 16 bytes; usenullLiteralUuid()for a null literal
-
nullLiteralUuid
Create a null UUID literal. -
nullLiteral
Create a typed null literal of the given primitiveExpression.DType.
-