public boolean visit(SQLJoinTableSource x) { SQLTableSource left = x.getLeft(), right = x.getRight(); left.accept(this); right.accept(this); SQLExpr condition = x.getCondition(); if (condition != null) { condition.accept(this); } if (x.getUsing().size() > 0 && left instanceof SQLExprTableSource && right instanceof SQLExprTableSource) { SQLExpr leftExpr = ((SQLExprTableSource) left).getExpr(); SQLExpr rightExpr = ((SQLExprTableSource) right).getExpr(); for (SQLExpr expr : x.getUsing()) { if (expr instanceof SQLIdentifierExpr) { String name = ((SQLIdentifierExpr) expr).getName(); SQLPropertyExpr leftPropExpr = new SQLPropertyExpr(leftExpr, name); SQLPropertyExpr rightPropExpr = new SQLPropertyExpr(rightExpr, name); leftPropExpr.setResolvedTableSource(left); rightPropExpr.setResolvedTableSource(right); SQLBinaryOpExpr usingCondition = new SQLBinaryOpExpr(leftPropExpr, SQLBinaryOperator.Equality, rightPropExpr); usingCondition.accept(this); } } } return false; }
SQLTableSource refTableSource = from.findTableSource(alias); if (refTableSource != null) { ((SQLPropertyExpr) tableExpr).setResolvedTableSource(refTableSource);
propertyExpr.setResolvedTableSource(allColumnTableSource); propertyExpr.setOwner(((SQLExprTableSource) redirectTableSource).getExpr().clone()); propertyExpr.setResolvedTableSource(redirectTableSource); expr = propertyExpr; continue;
((SQLIdentifierExpr) column).setResolvedTableSource(into); } else if (column instanceof SQLPropertyExpr) { ((SQLPropertyExpr) column).setResolvedTableSource(into); } else { column.accept(visitor); ((SQLIdentifierExpr) column).setResolvedTableSource(into); } else if (column instanceof SQLPropertyExpr) { ((SQLPropertyExpr) column).setResolvedTableSource(into);
x.setResolvedTableSource(tableSource); SQLColumnDefinition column = tableSource.findColumn(x.nameHashCode64()); if (column != null) {
propertyExpr.setResolvedTableSource(x.getResolvedTableSource()); SQLUtils.replaceInParent(x, propertyExpr);
public boolean visit(SQLJoinTableSource x) { SQLTableSource left = x.getLeft(), right = x.getRight(); left.accept(this); right.accept(this); SQLExpr condition = x.getCondition(); if (condition != null) { condition.accept(this); } if (x.getUsing().size() > 0 && left instanceof SQLExprTableSource && right instanceof SQLExprTableSource) { SQLExpr leftExpr = ((SQLExprTableSource) left).getExpr(); SQLExpr rightExpr = ((SQLExprTableSource) right).getExpr(); for (SQLExpr expr : x.getUsing()) { if (expr instanceof SQLIdentifierExpr) { String name = ((SQLIdentifierExpr) expr).getName(); SQLPropertyExpr leftPropExpr = new SQLPropertyExpr(leftExpr, name); SQLPropertyExpr rightPropExpr = new SQLPropertyExpr(rightExpr, name); leftPropExpr.setResolvedTableSource(left); rightPropExpr.setResolvedTableSource(right); SQLBinaryOpExpr usingCondition = new SQLBinaryOpExpr(leftPropExpr, SQLBinaryOperator.Equality, rightPropExpr); usingCondition.accept(this); } } } return false; }
SQLTableSource refTableSource = from.findTableSource(alias); if (refTableSource != null) { ((SQLPropertyExpr) tableExpr).setResolvedTableSource(refTableSource);
propertyExpr.setResolvedTableSource(allColumnTableSource); propertyExpr.setOwner(((SQLExprTableSource) redirectTableSource).getExpr().clone()); propertyExpr.setResolvedTableSource(redirectTableSource); expr = propertyExpr; continue;
((SQLIdentifierExpr) column).setResolvedTableSource(into); } else if (column instanceof SQLPropertyExpr) { ((SQLPropertyExpr) column).setResolvedTableSource(into); } else { column.accept(visitor); ((SQLIdentifierExpr) column).setResolvedTableSource(into); } else if (column instanceof SQLPropertyExpr) { ((SQLPropertyExpr) column).setResolvedTableSource(into);
x.setResolvedTableSource(tableSource); SQLColumnDefinition column = tableSource.findColumn(x.nameHashCode64()); if (column != null) {
propertyExpr.setResolvedTableSource(x.getResolvedTableSource()); SQLUtils.replaceInParent(x, propertyExpr);