Class SqlToRexConverter
- java.lang.Object
-
- org.apache.flink.table.planner.calcite.SqlToRexConverter
-
-
Constructor Summary
Constructors Constructor Description SqlToRexConverter(org.apache.flink.table.planner.calcite.FlinkPlannerImpl planner, org.apache.calcite.sql.SqlDialect sqlDialect, org.apache.calcite.rel.type.RelDataType inputRowType, org.apache.calcite.rel.type.RelDataType outputType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.calcite.rex.RexNode
convertToRexNode(String expr)
Converts a SQL expression to aRexNode
expression.org.apache.calcite.rex.RexNode
convertToRexNode(org.apache.calcite.sql.SqlNode sqlNode)
Converts aSqlNode
to aRexNode
expression.org.apache.calcite.rex.RexNode[]
convertToRexNodes(String[] exprs)
Converts an array of SQL expressions to an array ofRexNode
expressions.String
expand(String expr)
Converts the given SQL expression string to an expanded string with fully qualified function calls and escaped identifiers.
-
-
-
Method Detail
-
expand
public String expand(String expr)
Converts the given SQL expression string to an expanded string with fully qualified function calls and escaped identifiers.E.g.
my_udf(f0) + 1
to`my_catalog`.`my_database`.`my_udf`(`f0`) + 1
-
convertToRexNode
public org.apache.calcite.rex.RexNode convertToRexNode(String expr)
Converts a SQL expression to aRexNode
expression.- Parameters:
expr
- SQL expression e.g.`my_catalog`.`my_database`.`my_udf`(`f0`) + 1
-
convertToRexNode
public org.apache.calcite.rex.RexNode convertToRexNode(org.apache.calcite.sql.SqlNode sqlNode)
Converts aSqlNode
to aRexNode
expression.
-
convertToRexNodes
public org.apache.calcite.rex.RexNode[] convertToRexNodes(String[] exprs)
Converts an array of SQL expressions to an array ofRexNode
expressions.- Parameters:
exprs
- SQL expression e.g.`my_catalog`.`my_database`.`my_udf`(`f0`) + 1
-
-