CompiledExpression#
- public class CompiledExpression implements AutoCloseable#
This class wraps a native compiled AST and must be closed to avoid native memory leaks.
Method Summary
Compute a new column by applying this AST expression to the specified table.
computeTableJit(Table table, CompiledExpression... expressions)Compute a new table by applying expressions to the input table in one multi-output JIT transform.
Returns the native address of a default-compatible compiled expression.
Methods
- public ColumnVector computeColumn(Table table)#
Compute a new column by applying this AST expression to the specified table.
All column references must use
TableReference.LEFT; references toTableReference.RIGHTare rejected because this operation has only one input table. An expression produced byAstExpression.compileJit()always uses the JIT backend. Otherwise, execution uses the process-level backend selection.- Parameters:
table – input table for this expression
- Throws:
ai.rapids.cudf.CudfException– if the expression refers toTableReference.RIGHT, or if compilation or evaluation fails- Returns:
new column computed from this expression applied to the input table
- public void close()#
- public long getNativeHandle()#
Returns the native address of a default-compatible compiled expression.
Intended for internal cudf use only.
- Throws:
IllegalStateException– if this expression was produced byAstExpression.compileJit()
Static Methods
- public static Table computeTableJit(
- Table table,
- CompiledExpression... expressions
Compute a new table by applying expressions to the input table in one multi-output JIT transform.
Output column
icontains the result ofexpressions[i].- Parameters:
table – input table for the expressions
expressions – non-empty JIT-compiled expressions to evaluate in output order
- Throws:
NullPointerException– if the table, expression array, or an expression is nullIllegalArgumentException– if no expressions are provided or an expression was not produced byAstExpression.compileJit()IllegalStateException– if the table or an expression is closedai.rapids.cudf.CudfException– if JIT compilation or evaluation fails
- Returns:
table containing one output column per expression