private ImmutableList<RexNode> getValidPreds(RelOptCluster cluster, RelNode child, Set<String> predicatesToExclude, List<RexNode> rexs, RelDataType rType) { InputRefValidator validator = new InputRefValidator(rType.getFieldList()); List<RexNode> valids = new ArrayList<RexNode>(rexs.size()); for (RexNode rex : rexs) { try { rex.accept(validator); valids.add(rex); } catch (Util.FoundOne e) { Util.swallow(e, null); } } // We need to filter i) those that have been pushed already as stored in the join, // and ii) those that were already in the subtree rooted at child ImmutableList<RexNode> toPush = HiveCalciteUtil.getPredsNotPushedAlready(predicatesToExclude, child, valids); return toPush; }
private ImmutableList<RexNode> getValidPreds(RelOptCluster cluster, RelNode child, Set<String> predicatesToExclude, List<RexNode> rexs, RelDataType rType) { InputRefValidator validator = new InputRefValidator(rType.getFieldList()); List<RexNode> valids = new ArrayList<RexNode>(rexs.size()); for (RexNode rex : rexs) { try { rex.accept(validator); valids.add(rex); } catch (Util.FoundOne e) { Util.swallow(e, null); } } // We need to filter i) those that have been pushed already as stored in the join, // and ii) those that were already in the subtree rooted at child ImmutableList<RexNode> toPush = HiveCalciteUtil.getPredsNotPushedAlready(predicatesToExclude, child, valids); return toPush; }
/** * Calls the parent class method and masks Farrago exception thrown. */ protected void validateHavingClause(SqlSelect select) { try { super.validateHavingClause(select); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
/** * Calls the parent class method and masks Farrago exception thrown. */ protected void validateHavingClause(SqlSelect select) { try { super.validateHavingClause(select); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { try { super.validateFrom(node, targetRowType, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
/** * Calls the parent class method and masks Farrago exception thrown. */ protected void validateWhereClause(SqlSelect select) { try { super.validateWhereClause(select); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
/** * Returns whether an expression contains an OVER clause. */ public static boolean containsOver(RexNode expr) { try { expr.accept(FINDER); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }
/** * Returns whether an expression contains an OVER clause. */ public static boolean containsOver(RexNode expr) { try { expr.accept(FINDER); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }
/** * Returns whether an expression list contains an OVER clause. */ public static boolean containsOver(List<RexNode> exprs, RexNode condition) { try { RexUtil.apply(FINDER, exprs, condition); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }
public RexNode toCnf(RexNode rex) { try { this.currentCount = 0; return toCnf2(rex); } catch (OverflowError e) { Util.swallow(e, null); return rex; } }
/** * Returns whether an expression list contains an OVER clause. */ public static boolean containsOver(List<RexNode> exprs, RexNode condition) { try { RexUtil.apply(FINDER, exprs, condition); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }
/** * Calls the parent class method and masks Farrago exception thrown. */ protected void validateWhereClause(SqlSelect select) { try { super.validateWhereClause(select); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
public RexNode toCnf(RexNode rex) { try { this.currentCount = 0; return toCnf2(rex); } catch (OverflowError e) { Util.swallow(e, null); return rex; } }
protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { try { super.validateFrom(node, targetRowType, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
/** * Registers the identifier and its scope into a map keyed by ParserPosition. */ public void validateIdentifier(SqlIdentifier id, SqlValidatorScope scope) { registerId(id, scope); try { super.validateIdentifier(id, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
public SqlCall findAgg(List<SqlNode> nodes) { try { for (SqlNode node : nodes) { node.accept(this); } return null; } catch (Util.FoundOne e) { Util.swallow(e, null); return (SqlCall) e.getNode(); } }
public SqlCall findAgg(List<SqlNode> nodes) { try { for (SqlNode node : nodes) { node.accept(this); } return null; } catch (Util.FoundOne e) { Util.swallow(e, null); return (SqlCall) e.getNode(); } }
/** * Registers the identifier and its scope into a map keyed by ParserPosition. */ public void validateIdentifier(SqlIdentifier id, SqlValidatorScope scope) { registerId(id, scope); try { super.validateIdentifier(id, scope); } catch (CalciteException e) { Util.swallow(e, TRACER); } }
/** * Returns whether a program contains an OVER clause. */ public static boolean containsOver(RexProgram program) { try { RexUtil.apply(FINDER, program.getExprList(), null); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }
/** * Returns whether a program contains an OVER clause. */ public static boolean containsOver(RexProgram program) { try { RexUtil.apply(FINDER, program.getExprList(), null); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } }