public class QueryStatementConverter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ConversionContext |
context
Conversion context, contains things like FrameworkConfig, QueryTrait and other state used
during conversion.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(T zetaNode)
Whether this rule can handle the conversion of the specific node.
|
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode |
convert(com.google.zetasql.resolvedast.ResolvedNodes.ResolvedQueryStmt zetaNode,
java.util.List<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode> inputs)
Converts given Zeta SQL node to corresponding Calcite node.
|
static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode |
convertRootQuery(ConversionContext context,
com.google.zetasql.resolvedast.ResolvedNodes.ResolvedQueryStmt query) |
protected org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.RelOptCluster |
getCluster() |
protected org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.FrameworkConfig |
getConfig() |
protected ExpressionConverter |
getExpressionConverter() |
java.util.List<com.google.zetasql.resolvedast.ResolvedNode> |
getInputs(T zetaNode)
Extract Zeta SQL resolved nodes that correspond to the inputs of the current node.
|
protected QueryTrait |
getTrait() |
protected ConversionContext context
public static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode convertRootQuery(ConversionContext context, com.google.zetasql.resolvedast.ResolvedNodes.ResolvedQueryStmt query)
public org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode convert(com.google.zetasql.resolvedast.ResolvedNodes.ResolvedQueryStmt zetaNode, java.util.List<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode> inputs)
inputs
are node inputs that have already been converter to Calcite versions. They
correspond to the nodes in getInputs(ResolvedNode)
.
public boolean canConvert(T zetaNode)
public java.util.List<com.google.zetasql.resolvedast.ResolvedNode> getInputs(T zetaNode)
protected org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.RelOptCluster getCluster()
protected org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.FrameworkConfig getConfig()
protected ExpressionConverter getExpressionConverter()
protected QueryTrait getTrait()