Available Methods
- OTHER_FUNCTION
- EQUALS
- OTHER_DDL
- CAST
- OTHER
- name ( )
- DEFAULT
- OR
- AND
- LITERAL
- IS_NOT_NULL
- GREATER_THAN
- AS
- SUM
- COUNT
- GREATER_THAN_OR_EQUAL
- RUNNING
- LESS_THAN
- valueOf ( )
- NOT
- MULTISET_VALUE_CONSTRUCTOR
- IS_NOT_DISTINCT_FROM
- MAX
- UNION
- PLUS
- IS_TRUE
- VALUES
- ORDER_BY
- MINUS
- LESS_THAN_OR_EQUAL
- SELECT
- MAP_VALUE_CONSTRUCTOR
- IS_DISTINCT_FROM
- COLLECTION_TABLE
- GROUPING_ID
- CASE
- MIN
- FLOOR
Related Classes
- java.util.Arrays
- java.util.Collections
- java.util.Objects
- java.math.BigDecimal
- com.google.common.collect.ImmutableList
- javax.annotation.Nullable
- com.google.common.base.Preconditions
- org.apache.calcite.rel.type.RelDataType
- org.apache.calcite.rel.type.RelDataTypeFactory
- org.apache.calcite.sql.SqlNode
- org.apache.calcite.rex.RexNode
- org.apache.calcite.rel.type.RelDataTypeField
- org.apache.calcite.util.Pair
- org.apache.calcite.rel.RelNode
- org.apache.calcite.sql.SqlIdentifier
- org.apache.calcite.sql.type.SqlTypeName
- org.apache.calcite.sql.parser.SqlParserPos
- org.apache.calcite.rex.RexInputRef
- org.apache.calcite.sql.parser.SqlParseException
- org.apache.calcite.plan.RelOptCluster
- org.apache.calcite.sql.fun.SqlStdOperatorTable
- org.apache.calcite.sql.SqlOperator
- org.apache.calcite.plan.RelOptUtil
- org.apache.calcite.rex.RexLiteral
- org.apache.calcite.rex.RexCall
Java Code Examples for org.apache.calcite.sql.SqlKind#ORDER_BY
The following examples show how to use
org.apache.calcite.sql.SqlKind#ORDER_BY .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DrillSqlWorker.java From Bats with Apache License 2.0 | 5 votes |
private static SqlNode wrapWithAutoLimit(SqlNode sqlNode, int queryMaxRows) { SqlNumericLiteral autoLimitLiteral = SqlLiteral.createExactNumeric(String.valueOf(queryMaxRows), SqlParserPos.ZERO); if (sqlNode.getKind() == SqlKind.ORDER_BY) { SqlOrderBy orderBy = (SqlOrderBy) sqlNode; return new SqlOrderBy(orderBy.getParserPosition(), orderBy.query, orderBy.orderList, orderBy.offset, autoLimitLiteral); } return new SqlOrderBy(SqlParserPos.ZERO, sqlNode, SqlNodeList.EMPTY, null, autoLimitLiteral); }
Example 2
Source File: DrillSqlWorker.java From Bats with Apache License 2.0 | 4 votes |
private static boolean isAutoLimitShouldBeApplied(SqlNode sqlNode, int queryMaxRows) { return (queryMaxRows > 0) && sqlNode.getKind().belongsTo(SqlKind.QUERY) && (sqlNode.getKind() != SqlKind.ORDER_BY || isAutoLimitLessThanOrderByFetch((SqlOrderBy) sqlNode, queryMaxRows)); }