((ListScope) ancestorScope).getChildren();
public void addChild(SqlValidatorNamespace ns, String alias) { super.addChild(ns, alias); if ((usingScope != null) && (usingScope != parent)) { // We're looking at a join within a join. Recursively add this // child to its parent scope too. Example: // // select * // from (a join b on expr1) // join c on expr2 // where expr3 // // 'a' is a child namespace of 'a join b' and also of // 'a join b join c'. usingScope.addChild(ns, alias); } }
public void findAllColumnNames(List<SqlMoniker> result) { for (Pair<String, SqlValidatorNamespace> pair : children) { addColumnNames(pair.right, result); } parent.findAllColumnNames(result); }
public SqlMonotonicity getMonotonicity(SqlNode expr) { SqlMonotonicity monotonicity = expr.getMonotonicity(this); if (monotonicity != SqlMonotonicity.NOT_MONOTONIC) { return monotonicity; } if (children.size() == 1) { final SqlValidatorNamespace child = children.get(0).right; final List<Pair<SqlNode, SqlMonotonicity>> monotonicExprs = child.getMonotonicExprs(); for (Pair<SqlNode, SqlMonotonicity> pair : monotonicExprs) { if (expr.equalsDeep(pair.left, false)) { return pair.right; } } } return super.getMonotonicity(expr); } }
@Override public SqlValidatorNamespace getTableNamespace(List<String> names) { if (names.size() == 1 && names.get(0).equals(withItem.name.getSimple())) { return validator.getNamespace(withItem); } return super.getTableNamespace(names); }
@Override public SqlValidatorNamespace resolve(String name, SqlValidatorScope[] ancestorOut, int[] offsetOut) { if (name.equals(withItem.name.getSimple())) { return validator.getNamespace(withItem); } return super.resolve(name, ancestorOut, offsetOut); } }
public SqlMonotonicity getMonotonicity(SqlNode expr) { SqlMonotonicity monotonicity = expr.getMonotonicity(this); if (monotonicity != SqlMonotonicity.NotMonotonic) { return monotonicity; } if (children.size() == 1) { final SqlValidatorNamespace child = children.get(0).right; final List<Pair<SqlNode, SqlMonotonicity>> monotonicExprs = child.getMonotonicExprs(); for (Pair<SqlNode, SqlMonotonicity> pair : monotonicExprs) { if (expr.equalsDeep(pair.left, false)) { return pair.right; } } } return super.getMonotonicity(expr); } }
((ListScope) ancestorScopes[0]).getChildren();
public void findAllColumnNames(List<SqlMoniker> result) { for (Pair<String, SqlValidatorNamespace> pair : children) { addColumnNames(pair.right, result); } parent.findAllColumnNames(result); }
public void addChild(SqlValidatorNamespace ns, String alias) { super.addChild(ns, alias); if ((usingScope != null) && (usingScope != parent)) { // We're looking at a join within a join. Recursively add this // child to its parent scope too. Example: // // select * // from (a join b on expr1) // join c on expr2 // where expr3 // // 'a' is a child namespace of 'a join b' and also of // 'a join b join c'. usingScope.addChild(ns, alias); } }
((ListScope) ancestorScope).getChildren();
((ListScope) ancestorScope).getChildren();
((ListScope) ancestorScopes[0]).getChildren();
((ListScope) ancestorScopes[0]).getChildren();