/** * Registers any sub-queries inside a given call operand, and converts the * operand to a scalar sub-query if the operator requires it. * * @param parentScope Parent scope * @param call Call * @param operandOrdinal Ordinal of operand within call * @see SqlOperator#argumentMustBeScalar(int) */ private void registerOperandSubQueries( SqlValidatorScope parentScope, SqlCall call, int operandOrdinal) { SqlNode operand = call.operand(operandOrdinal); if (operand == null) { return; } if (operand.getKind().belongsTo(SqlKind.QUERY) && call.getOperator().argumentMustBeScalar(operandOrdinal)) { operand = SqlStdOperatorTable.SCALAR_QUERY.createCall( operand.getParserPosition(), operand); call.setOperand(operandOrdinal, operand); } registerSubQueries(parentScope, operand); }
lateral); if (newExpr != expr) { call.setOperand(0, newExpr); lateral); if (newExpr != expr) { call.setOperand(0, newExpr); forceNullable, lateral); if (newOperand != operand) { call.setOperand(0, newOperand); lateral); if (newOperand != operand) { call.setOperand(0, newOperand);
performUnconditionalRewrites(operand, childUnderFrom); if (newOperand != null && newOperand != operand) { call.setOperand(i, newOperand);
protected void validateUnnest(SqlCall call, SqlValidatorScope scope, RelDataType targetRowType) { for (int i = 0; i < call.operandCount(); i++) { SqlNode expandedItem = expand(call.operand(i), scope); call.setOperand(i, expandedItem); } validateQuery(call, scope, targetRowType); }
protected void validateUnnest(SqlCall call, SqlValidatorScope scope, RelDataType targetRowType) { for (int i = 0; i < call.operandCount(); i++) { SqlNode expandedItem = expand(call.operand(i), scope); call.setOperand(i, expandedItem); } validateQuery(call, scope, targetRowType); }
/** * Registers any sub-queries inside a given call operand, and converts the * operand to a scalar sub-query if the operator requires it. * * @param parentScope Parent scope * @param call Call * @param operandOrdinal Ordinal of operand within call * @see SqlOperator#argumentMustBeScalar(int) */ private void registerOperandSubQueries( SqlValidatorScope parentScope, SqlCall call, int operandOrdinal) { SqlNode operand = call.operand(operandOrdinal); if (operand == null) { return; } if (operand.getKind().belongsTo(SqlKind.QUERY) && call.getOperator().argumentMustBeScalar(operandOrdinal)) { operand = SqlStdOperatorTable.SCALAR_QUERY.createCall( operand.getParserPosition(), operand); call.setOperand(operandOrdinal, operand); } registerSubQueries(parentScope, operand); }
/** * Registers any sub-queries inside a given call operand, and converts the * operand to a scalar sub-query if the operator requires it. * * @param parentScope Parent scope * @param call Call * @param operandOrdinal Ordinal of operand within call * @see SqlOperator#argumentMustBeScalar(int) */ private void registerOperandSubQueries( SqlValidatorScope parentScope, SqlCall call, int operandOrdinal) { SqlNode operand = call.operand(operandOrdinal); if (operand == null) { return; } if (operand.getKind().belongsTo(SqlKind.QUERY) && call.getOperator().argumentMustBeScalar(operandOrdinal)) { operand = SqlStdOperatorTable.SCALAR_QUERY.createCall( operand.getParserPosition(), operand); call.setOperand(operandOrdinal, operand); } registerSubQueries(parentScope, operand); }
lateral); if (newExpr != expr) { call.setOperand(0, newExpr); lateral); if (newExpr != expr) { call.setOperand(0, newExpr); forceNullable, lateral); if (newOperand != operand) { call.setOperand(0, newOperand); lateral); if (newOperand != operand) { call.setOperand(0, newOperand);
lateral); if (newExpr != expr) { call.setOperand(0, newExpr); lateral); if (newExpr != expr) { call.setOperand(0, newExpr); forceNullable, lateral); if (newOperand != operand) { call.setOperand(0, newOperand); lateral); if (newOperand != operand) { call.setOperand(0, newOperand);
performUnconditionalRewrites(operand, childUnderFrom); if (newOperand != null && newOperand != operand) { call.setOperand(i, newOperand);
performUnconditionalRewrites(operand, childUnderFrom); if (newOperand != null && newOperand != operand) { call.setOperand(i, newOperand);