public abstract static class SqlImplementor.Context extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Context(SqlDialect dialect,
int fieldCount) |
protected |
Context(SqlDialect dialect,
int fieldCount,
boolean ignoreCast) |
| Modifier and Type | Method and Description |
|---|---|
abstract SqlNode |
field(int ordinal) |
List<SqlNode> |
fieldList() |
protected SqlImplementor.Context |
getAliasContext(RexCorrelVariable variable) |
abstract SqlImplementor |
implementor() |
SqlNode |
orderField(int ordinal)
Creates a reference to a field to be used in an ORDER BY clause.
|
protected RexCall |
reverseCall(RexCall call)
Reverses the order of a call, while preserving semantics, if it improves
readability.
|
SqlNode |
toSql(AggregateCall aggCall)
Converts a call to an aggregate function to an expression.
|
SqlNode |
toSql(RelFieldCollation collation)
Converts a collation to an ORDER BY item.
|
SqlNode |
toSql(@Nullable RexProgram program,
RexNode rex)
|
SqlNode |
toSql(RexWindowBound rexWindowBound)
Converts an expression from
RexWindowBound to SqlNode
format. |
List<SqlNode> |
toSql(Window.Group group,
com.google.common.collect.ImmutableList<RexLiteral> constants,
int inputFieldCount) |
protected Context(SqlDialect dialect, int fieldCount)
protected Context(SqlDialect dialect, int fieldCount, boolean ignoreCast)
public abstract SqlNode field(int ordinal)
public SqlNode orderField(int ordinal)
By default, it returns the same result as field(int).
If the field has an alias, uses the alias. If the field is an unqualified column reference which is the same an alias, switches to a qualified column reference.
public SqlNode toSql(@Nullable RexProgram program, RexNode rex)
program - Required only if rex contains RexLocalRefrex - Expression to convertprotected RexCall reverseCall(RexCall call)
In the base implementation, this method does nothing; in a join context, reverses a call such as "e.deptno = d.deptno" to "d.deptno = e.deptno" if "d" is the left input to the join and "e" is the right.
public SqlNode toSql(RexWindowBound rexWindowBound)
RexWindowBound to SqlNode
format.rexWindowBound - Expression to convertpublic List<SqlNode> toSql(Window.Group group, com.google.common.collect.ImmutableList<RexLiteral> constants, int inputFieldCount)
protected SqlImplementor.Context getAliasContext(RexCorrelVariable variable)
public SqlNode toSql(AggregateCall aggCall)
public SqlNode toSql(RelFieldCollation collation)
public abstract SqlImplementor implementor()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.