CompiledExpression#

public class CompiledExpression implements AutoCloseable#

This class wraps a native compiled AST and must be closed to avoid native memory leaks.

Method Summary

close()

computeColumn(Table table)

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.

getNativeHandle()

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 to TableReference.RIGHT are rejected because this operation has only one input table. An expression produced by AstExpression.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 to TableReference.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 by AstExpression.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 i contains the result of expressions[i].

Parameters:
  • table – input table for the expressions

  • expressions – non-empty JIT-compiled expressions to evaluate in output order

Throws:
Returns:

table containing one output column per expression