org.eigenbase.sql
Class SqlOrderByOperator

java.lang.Object
  extended by org.eigenbase.sql.SqlOperator
      extended by org.eigenbase.sql.SqlSpecialOperator
          extended by org.eigenbase.sql.SqlOrderByOperator

public class SqlOrderByOperator
extends SqlSpecialOperator

SqlOrderByOperator is used to represent an ORDER BY on a query other than a SELECT (e.g. VALUES or UNION). It is a purely syntactic operator, and is eliminated by SqlValidator.performUnconditionalRewrites and replaced with the ORDER_OPERAND of SqlSelect.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/SqlOrderByOperator.java#14 $
Author:
John V. Sichi

Field Summary
static int ORDER_OPERAND
           
static int QUERY_OPERAND
           
 
Fields inherited from class org.eigenbase.sql.SqlOperator
MaxPrec, NL
 
Constructor Summary
SqlOrderByOperator()
           
 
Method Summary
 SqlSyntax getSyntax()
          Returns the syntactic type of this operator.
 void unparse(SqlWriter writer, SqlNode[] operands, int leftPrec, int rightPrec)
          Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.
 
Methods inherited from class org.eigenbase.sql.SqlSpecialOperator
reduceExpr
 
Methods inherited from class org.eigenbase.sql.SqlOperator
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_OPERAND

public static final int QUERY_OPERAND
See Also:
Constant Field Values

ORDER_OPERAND

public static final int ORDER_OPERAND
See Also:
Constant Field Values
Constructor Detail

SqlOrderByOperator

public SqlOrderByOperator()
Method Detail

getSyntax

public SqlSyntax getSyntax()
Description copied from class: SqlOperator
Returns the syntactic type of this operator.

Overrides:
getSyntax in class SqlSpecialOperator

unparse

public void unparse(SqlWriter writer,
                    SqlNode[] operands,
                    int leftPrec,
                    int rightPrec)
Description copied from class: SqlOperator
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.

The default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int).

Overrides:
unparse in class SqlSpecialOperator