/** * We assume the non-push down for correlation variables, * then make specific checks when correlated variables are allowed. */ public void visit(Reference obj) { hasCorrelatedReferences |= obj.isCorrelated(); if (obj.isPositional()) { setDeterminismLevel(Determinism.COMMAND_DETERMINISTIC); } else if (modelId != null) { //for pushdown commands correlated references mean we're non-deterministic setDeterminismLevel(Determinism.NONDETERMINISTIC); } evaluationNotPossible(EvaluationLevel.PROCESSING); }
/** * We assume the non-push down for correlation variables, * then make specific checks when correlated variables are allowed. */ public void visit(Reference obj) { hasCorrelatedReferences |= obj.isCorrelated(); if (obj.isPositional()) { setDeterminismLevel(Determinism.COMMAND_DETERMINISTIC); } else if (modelId != null) { //for pushdown commands correlated references mean we're non-deterministic setDeterminismLevel(Determinism.NONDETERMINISTIC); } evaluationNotPossible(EvaluationLevel.PROCESSING); }
/** * We assume the non-push down for correlation variables, * then make specific checks when correlated variables are allowed. */ public void visit(Reference obj) { hasCorrelatedReferences |= obj.isCorrelated(); if (obj.isPositional()) { setDeterminismLevel(Determinism.COMMAND_DETERMINISTIC); } else if (modelId != null) { //for pushdown commands correlated references mean we're non-deterministic setDeterminismLevel(Determinism.NONDETERMINISTIC); } evaluationNotPossible(EvaluationLevel.PROCESSING); }
public void visit(Reference obj) { if (!obj.isCorrelated()) { return; } //we need to follow references to correct correlated variables org.teiid.query.optimizer.relational.AliasGenerator.NamingVisitor.SQLNamingContext sqlNamingContext = this.visitor.namingContext.parent; while (sqlNamingContext != null) { if (sqlNamingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); return; } sqlNamingContext = sqlNamingContext.parent; } if (!this.visitor.namingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); } else { // else - this is a naming conflict that is not handled gracefully } }
public void visit(Reference obj) { if (!obj.isCorrelated()) { return; } //we need to follow references to correct correlated variables org.teiid.query.optimizer.relational.AliasGenerator.NamingVisitor.SQLNamingContext sqlNamingContext = this.visitor.namingContext.parent; while (sqlNamingContext != null) { if (sqlNamingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); return; } sqlNamingContext = sqlNamingContext.parent; } if (!this.visitor.namingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); } else { // else - this is a naming conflict that is not handled gracefully } }
public void visit(Reference obj) { if (!obj.isCorrelated()) { return; } //we need to follow references to correct correlated variables org.teiid.query.optimizer.relational.AliasGenerator.NamingVisitor.SQLNamingContext sqlNamingContext = this.visitor.namingContext.parent; while (sqlNamingContext != null) { if (sqlNamingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); return; } sqlNamingContext = sqlNamingContext.parent; } if (!this.visitor.namingContext.groupNames.containsKey(obj.getExpression().getGroupSymbol().getName())) { visitNode(obj.getExpression()); } else { // else - this is a naming conflict that is not handled gracefully } }
Set<String> correleatedGroups = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); for (Reference ref : references) { if (ref.isCorrelated() && ref.getExpression().getGroupSymbol() != null) { correleatedGroups.add(ref.getExpression().getGroupSymbol().getName());
Set<String> correleatedGroups = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); for (Reference ref : references) { if (ref.isCorrelated() && ref.getExpression().getGroupSymbol() != null) { correleatedGroups.add(ref.getExpression().getGroupSymbol().getName());
Set<String> correleatedGroups = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); for (Reference ref : references) { if (ref.isCorrelated() && ref.getExpression().getGroupSymbol() != null) { correleatedGroups.add(ref.getExpression().getGroupSymbol().getName());