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.
|
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(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(RexProgram program, RexNode rex)
program - Required only if rex contains RexLocalRefrex - Expression to convertpublic 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-2020 Apache Software Foundation. All Rights Reserved.