public void validateIdentifier(SqlIdentifier id, SqlValidatorScope scope) { final SqlQualified fqId = scope.fullyQualify(id); if (expandColumnReferences) { // NOTE jvs 9-Apr-2007: this doesn't cover ORDER BY, which has its // own ideas about qualification. id.assignNamesFrom(fqId.identifier); } else { Util.discard(fqId); } }
public SqlNode validate(SqlNode topNode) { SqlValidatorScope scope = new EmptyScope(this); scope = new CatalogScope(scope, ImmutableList.of("CATALOG")); final SqlNode topNode2 = validateScopedExpression(topNode, scope); final RelDataType type = getValidatedNodeType(topNode2); Util.discard(type); return topNode2; }
/** Checks that all pattern variables within a function are the same, * and canonizes expressions such as {@code PREV(B.price)} to * {@code LAST(B.price, 0)}. */ private SqlNode navigationInDefine(SqlNode node, String alpha) { Set<String> prefix = node.accept(new PatternValidator(false)); Util.discard(prefix); node = new NavigationExpander().go(node); node = new NavigationReplacer(alpha).go(node); return node; }
private SqlNode navigationInMeasure(SqlNode node, boolean allRows) { final Set<String> prefix = node.accept(new PatternValidator(true)); Util.discard(prefix); final List<SqlNode> ops = ((SqlCall) node).getOperandList(); final SqlOperator defaultOp = allRows ? SqlStdOperatorTable.RUNNING : SqlStdOperatorTable.FINAL; final SqlNode op0 = ops.get(0); if (!isRunningOrFinal(op0.getKind()) || !allRows && op0.getKind() == SqlKind.RUNNING) { SqlNode newNode = defaultOp.createCall(SqlParserPos.ZERO, op0); node = SqlStdOperatorTable.AS.createCall(SqlParserPos.ZERO, newNode, ops.get(1)); } node = new NavigationExpander().go(node); return node; }
Util.discard(values);
public RelJsonReader(RelOptCluster cluster, RelOptSchema relOptSchema, Schema schema) { this.cluster = cluster; this.relOptSchema = relOptSchema; Util.discard(schema); }
/** * Does nothing with its argument. Call this method when you have a value * you are not interested in, but you don't want the compiler to warn that * you are not using it. */ public static void discard(int i) { if (false) { discard(i); } }
public static void init(RelOptPlanner planner) { // we can't convert from any conventions, therefore no rules to register Util.discard(planner); } }
@Deprecated // to be removed before 2.0 protected Calc( RelOptCluster cluster, RelTraitSet traits, RelNode child, RexProgram program, List<RelCollation> collationList) { this(cluster, traits, child, program); Util.discard(collationList); }
@Deprecated // to be removed before 2.0 protected Project(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, List<? extends RexNode> projects, RelDataType rowType, int flags) { this(cluster, traitSet, input, projects, rowType); Util.discard(flags); }
@Deprecated // to be removed before 2.0 public LogicalProject(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, List<? extends RexNode> projects, RelDataType rowType, int flags) { this(cluster, traitSet, input, projects, rowType); Util.discard(flags); }
@Deprecated // to be removed before 2.0 public LogicalCalc( RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexProgram program, List<RelCollation> collationList) { this(cluster, traitSet, child, program); Util.discard(collationList); }
@Deprecated // to be removed before 2.0 public Project copy(RelTraitSet traitSet, RelNode input, List<RexNode> projects, RelDataType rowType, int flags) { Util.discard(flags); return copy(traitSet, input, projects, rowType); }
@Deprecated // to be removed before 2.0 public Calc copy( RelTraitSet traitSet, RelNode child, RexProgram program, List<RelCollation> collationList) { Util.discard(collationList); return copy(traitSet, child, program); }
public void validateIdentifier(SqlIdentifier id, SqlValidatorScope scope) { final SqlQualified fqId = scope.fullyQualify(id); if (expandColumnReferences) { // NOTE jvs 9-Apr-2007: this doesn't cover ORDER BY, which has its // own ideas about qualification. id.assignNamesFrom(fqId.identifier); } else { Util.discard(fqId); } }
public void validateIdentifier(SqlIdentifier id, SqlValidatorScope scope) { final SqlQualified fqId = scope.fullyQualify(id); if (expandColumnReferences) { // NOTE jvs 9-Apr-2007: this doesn't cover ORDER BY, which has its // own ideas about qualification. id.assignNamesFrom(fqId.identifier); } else { Util.discard(fqId); } }
public SqlNode validate(SqlNode topNode) { SqlValidatorScope scope = new EmptyScope(this); scope = new CatalogScope(scope, ImmutableList.of("CATALOG")); final SqlNode topNode2 = validateScopedExpression(topNode, scope); final RelDataType type = getValidatedNodeType(topNode2); Util.discard(type); return topNode2; }
/** Creates a {@link DataContext} and executes a callback. */ public <T> AssertThat doWithDataContext(Function<DataContext, T> fn) throws Exception { try (CalciteConnection connection = (CalciteConnection) connectionFactory.createConnection()) { final DataContext dataContext = CalciteMetaImpl.createDataContext(connection); T t = fn.apply(dataContext); Util.discard(t); return AssertThat.this; } }
/** Checks that all pattern variables within a function are the same, * and canonizes expressions such as {@code PREV(B.price)} to * {@code LAST(B.price, 0)}. */ private SqlNode navigationInDefine(SqlNode node, String alpha) { Set<String> prefix = node.accept(new PatternValidator(false)); Util.discard(prefix); node = new NavigationExpander().go(node); node = new NavigationReplacer(alpha).go(node); return node; }
@Override public void onMatch(RelOptRuleCall call) { final Delta delta = call.rel(0); Util.discard(delta); final Filter filter = call.rel(1); final LogicalDelta newDelta = LogicalDelta.create(filter.getInput()); final LogicalFilter newFilter = LogicalFilter.create(newDelta, filter.getCondition()); call.transformTo(newFilter); } }