Search in sources :

Example 96 with SqlCall

use of org.apache.calcite.sql.SqlCall in project calcite by apache.

the class SelectScope method getMonotonicity.

public SqlMonotonicity getMonotonicity(SqlNode expr) {
    SqlMonotonicity monotonicity = expr.getMonotonicity(this);
    if (monotonicity != SqlMonotonicity.NOT_MONOTONIC) {
        return monotonicity;
    }
    // TODO: compare fully qualified names
    final SqlNodeList orderList = getOrderList();
    if (orderList.size() > 0) {
        SqlNode order0 = orderList.get(0);
        monotonicity = SqlMonotonicity.INCREASING;
        if ((order0 instanceof SqlCall) && (((SqlCall) order0).getOperator() == SqlStdOperatorTable.DESC)) {
            monotonicity = monotonicity.reverse();
            order0 = ((SqlCall) order0).operand(0);
        }
        if (expr.equalsDeep(order0, Litmus.IGNORE)) {
            return monotonicity;
        }
    }
    return SqlMonotonicity.NOT_MONOTONIC;
}
Also used : SqlCall(org.apache.calcite.sql.SqlCall) SqlNodeList(org.apache.calcite.sql.SqlNodeList) SqlNode(org.apache.calcite.sql.SqlNode)

Example 97 with SqlCall

use of org.apache.calcite.sql.SqlCall in project drill by apache.

the class UnsupportedOperatorsVisitor method visit.

@Override
public SqlNode visit(SqlCall sqlCall) {
    // Inspect the window functions
    if (sqlCall instanceof SqlSelect) {
        SqlSelect sqlSelect = (SqlSelect) sqlCall;
        checkGrouping((sqlSelect));
        checkRollupCubeGrpSets(sqlSelect);
        for (SqlNode nodeInSelectList : sqlSelect.getSelectList()) {
            // enter the first operand of AS operator
            if (nodeInSelectList.getKind() == SqlKind.AS && (((SqlCall) nodeInSelectList).getOperandList().get(0).getKind() == SqlKind.OVER)) {
                nodeInSelectList = ((SqlCall) nodeInSelectList).getOperandList().get(0);
            }
            if (nodeInSelectList.getKind() == SqlKind.OVER) {
                // Throw exceptions if window functions are disabled
                if (!context.getOptions().getOption(ExecConstants.ENABLE_WINDOW_FUNCTIONS).bool_val) {
                    unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Window functions are disabled\n" + "See Apache Drill JIRA: DRILL-2559");
                    throw new UnsupportedOperationException();
                }
                // DRILL-3182, DRILL-3195
                SqlCall over = (SqlCall) nodeInSelectList;
                if (over.getOperandList().get(0) instanceof SqlCall) {
                    SqlCall function = (SqlCall) over.getOperandList().get(0);
                    // Window function with DISTINCT qualifier is temporarily disabled
                    if (function.getFunctionQuantifier() != null && function.getFunctionQuantifier().getValue() == SqlSelectKeyword.DISTINCT) {
                        unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "DISTINCT for window aggregate functions is not currently supported\n" + "See Apache Drill JIRA: DRILL-3182");
                        throw new UnsupportedOperationException();
                    }
                    // DRILL-3596: we only allow (<column-name>) or (<column-name>, 1)
                    final String functionName = function.getOperator().getName().toUpperCase();
                    if ("LEAD".equals(functionName) || "LAG".equals(functionName)) {
                        boolean supported = true;
                        if (function.operandCount() > 2) {
                            // we don't support more than 2 arguments
                            supported = false;
                        } else if (function.operandCount() == 2) {
                            SqlNode operand = function.operand(1);
                            if (operand instanceof SqlNumericLiteral) {
                                SqlNumericLiteral offsetLiteral = (SqlNumericLiteral) operand;
                                try {
                                    if (offsetLiteral.intValue(true) != 1) {
                                        // we don't support offset != 1
                                        supported = false;
                                    }
                                } catch (AssertionError e) {
                                    // we only support offset as an integer
                                    supported = false;
                                }
                            } else {
                                // we only support offset as a numeric literal
                                supported = false;
                            }
                        }
                        if (!supported) {
                            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Function " + functionName + " only supports (<value expression>) or (<value expression>, 1)\n" + "See Apache DRILL JIRA: DRILL-3596");
                            throw new UnsupportedOperationException();
                        }
                    }
                }
            }
        }
    }
    // (i.e., BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    if (sqlCall instanceof SqlWindow) {
        SqlWindow window = (SqlWindow) sqlCall;
        SqlNode lowerBound = window.getLowerBound();
        SqlNode upperBound = window.getUpperBound();
        // If no frame is specified
        // it is a default frame
        boolean isSupported = (lowerBound == null && upperBound == null);
        // RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
        if (window.getOrderList().size() != 0 && !window.isRows() && SqlWindow.isUnboundedPreceding(lowerBound) && (upperBound == null || SqlWindow.isCurrentRow(upperBound) || SqlWindow.isUnboundedFollowing(upperBound))) {
            isSupported = true;
        }
        // is supported with and without the ORDER BY clause
        if (window.isRows() && SqlWindow.isUnboundedPreceding(lowerBound) && (upperBound == null || SqlWindow.isCurrentRow(upperBound))) {
            isSupported = true;
        }
        // is supported with and without an ORDER BY clause
        if (!window.isRows() && SqlWindow.isCurrentRow(lowerBound) && SqlWindow.isCurrentRow(upperBound)) {
            isSupported = true;
        }
        // ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
        if (window.getOrderList().size() == 0 && SqlWindow.isUnboundedPreceding(lowerBound) && SqlWindow.isUnboundedFollowing(upperBound)) {
            isSupported = true;
        }
        if (!isSupported) {
            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "This type of window frame is currently not supported \n" + "See Apache Drill JIRA: DRILL-3188");
            throw new UnsupportedOperationException();
        }
        // DRILL-3189: Disable DISALLOW PARTIAL
        if (!window.isAllowPartial()) {
            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Disallowing partial windows is currently not supported \n" + "See Apache Drill JIRA: DRILL-3189");
            throw new UnsupportedOperationException();
        }
    }
    // Disable unsupported Intersect, Except
    if (sqlCall.getKind() == SqlKind.INTERSECT || sqlCall.getKind() == SqlKind.EXCEPT) {
        unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.RELATIONAL, sqlCall.getOperator().getName() + " is not supported\n" + "See Apache Drill JIRA: DRILL-1921");
        throw new UnsupportedOperationException();
    }
    // Disable unsupported JOINs
    if (sqlCall.getKind() == SqlKind.JOIN) {
        SqlJoin join = (SqlJoin) sqlCall;
        // Block Natural Join
        if (join.isNatural()) {
            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.RELATIONAL, "NATURAL JOIN is not supported\n" + "See Apache Drill JIRA: DRILL-1986");
            throw new UnsupportedOperationException();
        }
    }
    // Disable UNNEST if the configuration disable it
    if (sqlCall.getKind() == SqlKind.UNNEST) {
        if (!context.getPlannerSettings().isUnnestLateralEnabled()) {
            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.RELATIONAL, "Unnest is not enabled per configuration");
            throw new UnsupportedOperationException();
        }
    }
    // Disable Function
    for (String strOperator : disabledOperators) {
        if (sqlCall.getOperator().isName(strOperator, true)) {
            // true is passed to preserve previous behavior
            unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, sqlCall.getOperator().getName() + " is not supported\n" + "See Apache Drill JIRA: DRILL-2115");
            throw new UnsupportedOperationException();
        }
    }
    // Disable complex functions incorrect placement
    if (sqlCall instanceof SqlSelect) {
        SqlSelect sqlSelect = (SqlSelect) sqlCall;
        for (SqlNode nodeInSelectList : sqlSelect.getSelectList()) {
            if (checkDirExplorers(nodeInSelectList)) {
                unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Directory explorers " + dirExplorers + " functions are not supported in Select List\n" + "See Apache Drill JIRA: DRILL-3944");
                throw new UnsupportedOperationException();
            }
        }
        if (sqlSelect.hasWhere()) {
            if (checkDirExplorers(sqlSelect.getWhere()) && !context.getPlannerSettings().isConstantFoldingEnabled()) {
                unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Directory explorers " + dirExplorers + " functions can not be used " + "when " + PlannerSettings.CONSTANT_FOLDING.getOptionName() + " option is set to false\n" + "See Apache Drill JIRA: DRILL-3944");
                throw new UnsupportedOperationException();
            }
        }
        if (sqlSelect.hasOrderBy()) {
            for (SqlNode sqlNode : sqlSelect.getOrderList()) {
                if (containsFlatten(sqlNode)) {
                    unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Flatten function is not supported in Order By\n" + "See Apache Drill JIRA: DRILL-2181");
                    throw new UnsupportedOperationException();
                } else if (checkDirExplorers(sqlNode)) {
                    unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Directory explorers " + dirExplorers + " functions are not supported in Order By\n" + "See Apache Drill JIRA: DRILL-3944");
                    throw new UnsupportedOperationException();
                }
            }
        }
        if (sqlSelect.getGroup() != null) {
            for (SqlNode sqlNode : sqlSelect.getGroup()) {
                if (containsFlatten(sqlNode)) {
                    unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Flatten function is not supported in Group By\n" + "See Apache Drill JIRA: DRILL-2181");
                    throw new UnsupportedOperationException();
                } else if (checkDirExplorers(sqlNode)) {
                    unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Directory explorers " + dirExplorers + " functions are not supported in Group By\n" + "See Apache Drill JIRA: DRILL-3944");
                    throw new UnsupportedOperationException();
                }
            }
        }
        if (sqlSelect.isDistinct()) {
            for (SqlNode column : sqlSelect.getSelectList()) {
                if (column.getKind() == SqlKind.AS) {
                    if (containsFlatten(((SqlCall) column).getOperandList().get(0))) {
                        unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Flatten function is not supported in Distinct\n" + "See Apache Drill JIRA: DRILL-2181");
                        throw new UnsupportedOperationException();
                    }
                } else {
                    if (containsFlatten(column)) {
                        unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Flatten function is not supported in Distinct\n" + "See Apache Drill JIRA: DRILL-2181");
                        throw new UnsupportedOperationException();
                    }
                }
            }
        }
    }
    if (DrillCalciteWrapperUtility.extractSqlOperatorFromWrapper(sqlCall.getOperator()) instanceof SqlCountAggFunction) {
        for (SqlNode sqlNode : sqlCall.getOperandList()) {
            if (containsFlatten(sqlNode)) {
                unsupportedOperatorCollector.setException(SqlUnsupportedException.ExceptionType.FUNCTION, "Flatten function in aggregate functions is not supported\n" + "See Apache Drill JIRA: DRILL-2181");
                throw new UnsupportedOperationException();
            }
        }
    }
    return sqlCall.getOperator().acceptCall(this, sqlCall);
}
Also used : SqlSelect(org.apache.calcite.sql.SqlSelect) SqlCall(org.apache.calcite.sql.SqlCall) SqlJoin(org.apache.calcite.sql.SqlJoin) SqlWindow(org.apache.calcite.sql.SqlWindow) SqlNumericLiteral(org.apache.calcite.sql.SqlNumericLiteral) SqlCountAggFunction(org.apache.calcite.sql.fun.SqlCountAggFunction) SqlNode(org.apache.calcite.sql.SqlNode)

Example 98 with SqlCall

use of org.apache.calcite.sql.SqlCall in project drill by apache.

the class DrillTableInfo method prepareTableMacroOperands.

/**
 * Returns list with operands for table function, obtained from specified call in the order
 * suitable to be used in table function and default values for absent arguments.
 * For example, for the following call:
 * <pre>
 *   `dfs`.`corrupted_dates`(`type` => 'parquet', `autoCorrectCorruptDates` => FALSE, `enableStringsSignedMinMax` => FALSE)
 * </pre>
 * will be returned the following list:
 * <pre>
 *   ['parquet', FALSE, FALSE, DEFAULT]
 * </pre>
 * whose elements correspond to the following parameters:
 * <pre>
 *   [type, autoCorrectCorruptDates, enableStringsSignedMinMax, schema]
 * </pre>
 *
 * @param call sql call whose arguments should be prepared
 * @return list with operands for table function
 */
private static List<SqlNode> prepareTableMacroOperands(SqlCall call) {
    Function<String, SqlNode> convertOperand = paramName -> call.getOperandList().stream().map(sqlNode -> (SqlCall) sqlNode).filter(sqlCall -> ((SqlIdentifier) sqlCall.operand(1)).getSimple().equals(paramName)).peek(sqlCall -> Preconditions.checkState(sqlCall.getKind() == SqlKind.ARGUMENT_ASSIGNMENT)).findFirst().map(sqlCall -> (SqlNode) sqlCall.operand(0)).orElse(SqlStdOperatorTable.DEFAULT.createCall(SqlParserPos.ZERO));
    SqlFunction operator = (SqlFunction) call.getOperator();
    return operator.getParamNames().stream().map(convertOperand).collect(Collectors.toList());
}
Also used : SqlParserPos(org.apache.calcite.sql.parser.SqlParserPos) SchemaUtilites(org.apache.drill.exec.planner.sql.SchemaUtilites) SqlKind(org.apache.calcite.sql.SqlKind) SqlUserDefinedTableMacro(org.apache.calcite.sql.validate.SqlUserDefinedTableMacro) Logger(org.slf4j.Logger) TranslatableTable(org.apache.calcite.schema.TranslatableTable) UserException(org.apache.drill.common.exceptions.UserException) LoggerFactory(org.slf4j.LoggerFactory) Table(org.apache.calcite.schema.Table) DrillTable(org.apache.drill.exec.planner.logical.DrillTable) Function(java.util.function.Function) Collectors(java.util.stream.Collectors) SqlCall(org.apache.calcite.sql.SqlCall) List(java.util.List) SqlFunction(org.apache.calcite.sql.SqlFunction) SqlNode(org.apache.calcite.sql.SqlNode) SqlStdOperatorTable(org.apache.calcite.sql.fun.SqlStdOperatorTable) AbstractSchema(org.apache.drill.exec.store.AbstractSchema) SqlIdentifier(org.apache.calcite.sql.SqlIdentifier) Preconditions(org.apache.drill.shaded.guava.com.google.common.base.Preconditions) SqlOperator(org.apache.calcite.sql.SqlOperator) Util(org.apache.calcite.util.Util) DrillTranslatableTable(org.apache.drill.exec.planner.logical.DrillTranslatableTable) SqlCall(org.apache.calcite.sql.SqlCall) SqlIdentifier(org.apache.calcite.sql.SqlIdentifier) SqlNode(org.apache.calcite.sql.SqlNode) SqlFunction(org.apache.calcite.sql.SqlFunction)

Example 99 with SqlCall

use of org.apache.calcite.sql.SqlCall in project hazelcast by hazelcast.

the class ParserNameResolutionTest method checkSuccess.

private static void checkSuccess(OptimizerContext context, String fieldName, String tableFqn, String... tableComponents) {
    QueryParseResult res = context.parse(composeSelect(fieldName, tableComponents));
    SqlSelect select = (SqlSelect) res.getNode();
    SqlNodeList selectList = select.getSelectList();
    assertEquals(1, selectList.size());
    SqlIdentifier fieldIdentifier = (SqlIdentifier) selectList.get(0);
    assertEquals(SqlIdentifier.getString(Arrays.asList(last(tableComponents), fieldName)), fieldIdentifier.toString());
    SqlCall from = (SqlCall) select.getFrom();
    assertEquals(from.getKind(), SqlKind.AS);
    assertEquals(tableFqn, from.operand(0).toString());
    assertEquals(last(tableComponents), from.operand(1).toString());
}
Also used : SqlSelect(org.apache.calcite.sql.SqlSelect) SqlCall(org.apache.calcite.sql.SqlCall) SqlNodeList(org.apache.calcite.sql.SqlNodeList) SqlIdentifier(org.apache.calcite.sql.SqlIdentifier)

Example 100 with SqlCall

use of org.apache.calcite.sql.SqlCall in project hazelcast by hazelcast.

the class HazelcastSqlToRelConverter method constructComparisons.

/**
 * Constructs comparisons between
 * left-hand operand (as a rule, SqlIdentifier) and right-hand list.
 */
private List<RexNode> constructComparisons(Blackboard bb, List<RexNode> leftKeys, SqlNodeList valuesList) {
    final List<RexNode> comparisons = new ArrayList<>();
    for (SqlNode rightValues : valuesList) {
        RexNode rexComparison;
        final SqlOperator comparisonOp = SqlStdOperatorTable.EQUALS;
        if (leftKeys.size() == 1) {
            rexComparison = rexBuilder.makeCall(comparisonOp, leftKeys.get(0), ensureSqlType(leftKeys.get(0).getType(), bb.convertExpression(rightValues)));
        } else {
            assert rightValues instanceof SqlCall;
            final SqlBasicCall basicCall = (SqlBasicCall) rightValues;
            assert basicCall.getOperator() instanceof SqlRowOperator && basicCall.operandCount() == leftKeys.size();
            rexComparison = RexUtil.composeConjunction(rexBuilder, Pair.zip(leftKeys, basicCall.getOperandList()).stream().map(pair -> rexBuilder.makeCall(comparisonOp, pair.left, ensureSqlType(pair.left.getType(), bb.convertExpression(pair.right)))).collect(Collectors.toList()));
        }
        comparisons.add(rexComparison);
    }
    return comparisons;
}
Also used : RelDataTypeFactory(org.apache.calcite.rel.type.RelDataTypeFactory) CalciteContextException(org.apache.calcite.runtime.CalciteContextException) LiteralUtils(com.hazelcast.jet.sql.impl.validate.literal.LiteralUtils) RelDataTypeFamily(org.apache.calcite.rel.type.RelDataTypeFamily) HazelcastResources(com.hazelcast.jet.sql.impl.validate.HazelcastResources) SqlCall(org.apache.calcite.sql.SqlCall) SqlJsonEmptyOrError(org.apache.calcite.sql.SqlJsonEmptyOrError) BigDecimal(java.math.BigDecimal) RexUtil(org.apache.calcite.rex.RexUtil) SqlNode(org.apache.calcite.sql.SqlNode) SqlUtil(org.apache.calcite.sql.SqlUtil) RexNode(org.apache.calcite.rex.RexNode) Arrays.asList(java.util.Arrays.asList) LocalTime(java.time.LocalTime) TableModify(org.apache.calcite.rel.core.TableModify) DAY(org.apache.calcite.avatica.util.TimeUnit.DAY) SqlValidator(org.apache.calcite.sql.validate.SqlValidator) YEAR(org.apache.calcite.avatica.util.TimeUnit.YEAR) RelOptCluster(org.apache.calcite.plan.RelOptCluster) SqlKind(org.apache.calcite.sql.SqlKind) IdentityHashMap(java.util.IdentityHashMap) HazelcastTypeUtils(com.hazelcast.jet.sql.impl.validate.types.HazelcastTypeUtils) HazelcastJsonParseFunction(com.hazelcast.jet.sql.impl.validate.operators.json.HazelcastJsonParseFunction) SqlOperandTypeChecker(org.apache.calcite.sql.type.SqlOperandTypeChecker) RexLiteral(org.apache.calcite.rex.RexLiteral) Set(java.util.Set) Collectors(java.util.stream.Collectors) InvocationTargetException(java.lang.reflect.InvocationTargetException) HazelcastJsonValueFunction(com.hazelcast.jet.sql.impl.validate.operators.json.HazelcastJsonValueFunction) List(java.util.List) SqlStdOperatorTable(org.apache.calcite.sql.fun.SqlStdOperatorTable) SqlRowOperator(org.apache.calcite.sql.fun.SqlRowOperator) SqlErrorCode(com.hazelcast.sql.impl.SqlErrorCode) MONTH(org.apache.calcite.avatica.util.TimeUnit.MONTH) SqlInsert(org.apache.calcite.sql.SqlInsert) QueryDataType(com.hazelcast.sql.impl.type.QueryDataType) RelOptTable(org.apache.calcite.plan.RelOptTable) ArrayList(java.util.ArrayList) SqlJsonValueReturning(org.apache.calcite.sql.SqlJsonValueReturning) TimeString(org.apache.calcite.util.TimeString) SqlToRelConverter(org.apache.calcite.sql2rel.SqlToRelConverter) Lists(com.google.common.collect.Lists) SqlLiteral(org.apache.calcite.sql.SqlLiteral) ImmutableList(com.google.common.collect.ImmutableList) Pair(org.apache.calcite.util.Pair) Converter(com.hazelcast.sql.impl.type.converter.Converter) SqlOperator(org.apache.calcite.sql.SqlOperator) SqlBetweenOperator(org.apache.calcite.sql.fun.SqlBetweenOperator) QueryException(com.hazelcast.sql.impl.QueryException) RelDataType(org.apache.calcite.rel.type.RelDataType) SqlIntervalQualifier(org.apache.calcite.sql.SqlIntervalQualifier) SqlParserPos(org.apache.calcite.sql.parser.SqlParserPos) SqlExtendedInsert(com.hazelcast.jet.sql.impl.parse.SqlExtendedInsert) SqlTypeFamily(org.apache.calcite.sql.type.SqlTypeFamily) SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) HazelcastReturnTypeInference(com.hazelcast.jet.sql.impl.validate.operators.typeinference.HazelcastReturnTypeInference) RexBuilder(org.apache.calcite.rex.RexBuilder) Literal(com.hazelcast.jet.sql.impl.validate.literal.Literal) SqlRexConvertletTable(org.apache.calcite.sql2rel.SqlRexConvertletTable) SqlBasicCall(org.apache.calcite.sql.SqlBasicCall) SqlValidatorException(org.apache.calcite.sql.validate.SqlValidatorException) RelNode(org.apache.calcite.rel.RelNode) LogicalTableInsert(com.hazelcast.jet.sql.impl.opt.logical.LogicalTableInsert) Prepare(org.apache.calcite.prepare.Prepare) SECOND(org.apache.calcite.avatica.util.TimeUnit.SECOND) HazelcastBetweenOperator(com.hazelcast.jet.sql.impl.validate.operators.predicate.HazelcastBetweenOperator) SqlJsonValueEmptyOrErrorBehavior(org.apache.calcite.sql.SqlJsonValueEmptyOrErrorBehavior) SqlInOperator(org.apache.calcite.sql.fun.SqlInOperator) Converters(com.hazelcast.sql.impl.type.converter.Converters) Util(org.apache.calcite.util.Util) LogicalTableSink(com.hazelcast.jet.sql.impl.opt.logical.LogicalTableSink) Resources(org.apache.calcite.runtime.Resources) SqlNodeList(org.apache.calcite.sql.SqlNodeList) Collections(java.util.Collections) SqlBasicCall(org.apache.calcite.sql.SqlBasicCall) SqlOperator(org.apache.calcite.sql.SqlOperator) SqlCall(org.apache.calcite.sql.SqlCall) ArrayList(java.util.ArrayList) SqlRowOperator(org.apache.calcite.sql.fun.SqlRowOperator) RexNode(org.apache.calcite.rex.RexNode) SqlNode(org.apache.calcite.sql.SqlNode)

Aggregations

SqlCall (org.apache.calcite.sql.SqlCall)108 SqlNode (org.apache.calcite.sql.SqlNode)81 SqlIdentifier (org.apache.calcite.sql.SqlIdentifier)32 SqlNodeList (org.apache.calcite.sql.SqlNodeList)32 RelDataType (org.apache.calcite.rel.type.RelDataType)30 SqlOperator (org.apache.calcite.sql.SqlOperator)26 BitString (org.apache.calcite.util.BitString)19 ArrayList (java.util.ArrayList)18 SqlSelect (org.apache.calcite.sql.SqlSelect)17 RexNode (org.apache.calcite.rex.RexNode)13 SqlBasicCall (org.apache.calcite.sql.SqlBasicCall)12 RelDataTypeFactory (org.apache.calcite.rel.type.RelDataTypeFactory)11 SqlLiteral (org.apache.calcite.sql.SqlLiteral)11 RelDataTypeField (org.apache.calcite.rel.type.RelDataTypeField)9 SqlKind (org.apache.calcite.sql.SqlKind)9 SqlParserPos (org.apache.calcite.sql.parser.SqlParserPos)9 List (java.util.List)8 SqlCallBinding (org.apache.calcite.sql.SqlCallBinding)8 Pair (org.apache.calcite.util.Pair)8 RelNode (org.apache.calcite.rel.RelNode)7