evaluate
The evaluate
method evaluates a SQL string and returns the equivalent Deephaven table.
Syntax
evaluate(sql)
Parameters
Parameter | Type | Description |
---|---|---|
sql | String | The SQL query, in string format, to evaluate. |
Returns
A new in-memory table resulting from executing the SQL query on Deephaven data.
Examples
import io.deephaven.engine.sql.Sql
import io.deephaven.engine.table.impl.TableCreatorImpl
t1 = emptyTable(10).update("X = i")
t2 = emptyTable(10).update("X = i + 5", "Y = i * 2")
result = Sql.evaluate("SELECT t1.X, t2.Y FROM t1 JOIN t2 ON t1.X = t2.X")