Class SqlImplementor.Result

java.lang.Object
org.apache.calcite.rel.rel2sql.SqlImplementor.Result
Enclosing class:
SqlImplementor

public class SqlImplementor.Result extends Object
Result of implementing a node.
  • Constructor Details

  • Method Details

    • builder

      public SqlImplementor.Builder builder(RelNode rel)
      Creates a builder for the SQL of the given relational expression, using the clauses that you declared when you called SqlImplementor.visitInput(RelNode, int, Set).
    • builder

      Deprecated.
      Provide the expected clauses up-front, when you call SqlImplementor.visitInput(RelNode, int, Set), then create a builder using builder(RelNode).
    • maxClause

      @Deprecated public SqlImplementor.Clause maxClause()
      Deprecated.
      Returns the highest clause that is in use.
    • asFrom

      public SqlNode asFrom()
      Returns a node that can be included in the FROM clause or a JOIN. It has an alias that is unique within the query. The alias is implicit if it can be derived using the usual rules (For example, "SELECT * FROM emp" is equivalent to "SELECT * FROM emp AS emp".)
    • subSelect

      public SqlSelect subSelect()
    • asSelect

      public SqlSelect asSelect()
      Converts a non-query node into a SELECT node. Set operators (UNION, INTERSECT, EXCEPT) remain as is.
    • stripTrivialAliases

      public void stripTrivialAliases(SqlNode node)
    • asStatement

      public SqlNode asStatement()
      Converts a non-query node into a SELECT node. Set operators (UNION, INTERSECT, EXCEPT) and DML operators (INSERT, UPDATE, DELETE, MERGE) remain as is.
    • asQueryOrValues

      public SqlNode asQueryOrValues()
      Converts a non-query node into a SELECT node. Set operators (UNION, INTERSECT, EXCEPT) and VALUES remain as is.
    • qualifiedContext

      public SqlImplementor.Context qualifiedContext()
      Returns a context that always qualifies identifiers. Useful if the Context deals with just one arm of a join, yet we wish to generate a join condition that qualifies column names to disambiguate them.
    • resetAlias

      public SqlImplementor.Result resetAlias()
      In join, when the left and right nodes have been generated, update their alias with 'neededAlias' if not null.
    • resetAlias

      public SqlImplementor.Result resetAlias(String alias, RelDataType type)
      Sets the alias of the join or correlate just created.
      Parameters:
      alias - New alias
      type - type of the node associated with the alias