Search in sources :

Example 1 with Type

use of com.facebook.presto.sql.tree.Join.Type in project tis by qlangtech.

the class TableReferenceVisitor method setFuncGroupByTuple.

private void setFuncGroupByTuple(IDataTupleCreator tupleCreator, final String tabRefName) {
    Stream<FunctionDataTupleCreator> funcs = this.colRef.getColRefMap().values().stream().filter((r) -> r instanceof FunctionDataTupleCreator).map((r) -> (FunctionDataTupleCreator) r);
    funcs.forEach((f) -> {
        Optional<TisGroupBy> g = f.getGroupBy();
        if (g.isPresent()) {
            g.get().getGroups().forEach((group) -> {
                TableTupleCreator tabTuple = null;
                if (!group.isTupleSetted() && StringUtils.equals(group.getTabRef(), tabRefName)) {
                    if (!(tupleCreator instanceof TableTupleCreator)) {
                        throw new IllegalStateException("tupleCreator type shall be TableTupleCterator");
                    }
                    tabTuple = (TableTupleCreator) tupleCreator;
                    if (!tabRefName.equals(tabTuple.getMediaTabRef())) {
                        throw new IllegalStateException("tabRefName:" + tabRefName + ",tabTuple.getMediaTabRef:" + tabTuple.getMediaTabRef() + " shall be equal");
                    }
                    group.setTabTuple(tabTuple);
                }
            });
        }
    });
}
Also used : IDataTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.IDataTupleCreator) FunctionDataTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.FunctionDataTupleCreator) ColRef(com.qlangtech.tis.sql.parser.tuple.creator.impl.ColRef) StringUtils(org.apache.commons.lang.StringUtils) com.facebook.presto.sql.tree(com.facebook.presto.sql.tree) TisGroupBy(com.qlangtech.tis.sql.parser.TisGroupBy) TableTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.TableTupleCreator) TabCriteriaEntityRecognizeVisitor(com.qlangtech.tis.sql.parser.tuple.creator.impl.TabCriteriaEntityRecognizeVisitor) Stream(java.util.stream.Stream) IDumpNodeMapContext(com.qlangtech.tis.sql.parser.IDumpNodeMapContext) StackableAstVisitorContext(com.facebook.presto.sql.tree.TISStackableAstVisitor.StackableAstVisitorContext) Optional(java.util.Optional) Type(com.facebook.presto.sql.tree.Join.Type) NodeProcessResult(com.qlangtech.tis.sql.parser.NodeProcessResult) Joiner(com.google.common.base.Joiner) NodeUtils(com.qlangtech.tis.sql.parser.utils.NodeUtils) TableTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.TableTupleCreator) FunctionDataTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.FunctionDataTupleCreator) TisGroupBy(com.qlangtech.tis.sql.parser.TisGroupBy)

Example 2 with Type

use of com.facebook.presto.sql.tree.Join.Type in project tis by qlangtech.

the class TableReferenceVisitor method visitJoin.

@Override
protected NodeProcessResult<?> visitJoin(Join node, StackableAstVisitorContext<Integer> context) {
    final Type type = node.getType();
    Relation left = node.getLeft();
    processLeftOrRightRelation(context, left, null, null);
    Relation right = node.getRight();
    Optional<JoinOn> joinOn = node.getCriteria().filter(criteria -> criteria instanceof JoinOn).map(criteria -> (JoinOn) criteria);
    processLeftOrRightRelation(context, right, joinOn, type);
    return null;
}
Also used : IDataTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.IDataTupleCreator) FunctionDataTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.FunctionDataTupleCreator) ColRef(com.qlangtech.tis.sql.parser.tuple.creator.impl.ColRef) StringUtils(org.apache.commons.lang.StringUtils) com.facebook.presto.sql.tree(com.facebook.presto.sql.tree) TisGroupBy(com.qlangtech.tis.sql.parser.TisGroupBy) TableTupleCreator(com.qlangtech.tis.sql.parser.tuple.creator.impl.TableTupleCreator) TabCriteriaEntityRecognizeVisitor(com.qlangtech.tis.sql.parser.tuple.creator.impl.TabCriteriaEntityRecognizeVisitor) Stream(java.util.stream.Stream) IDumpNodeMapContext(com.qlangtech.tis.sql.parser.IDumpNodeMapContext) StackableAstVisitorContext(com.facebook.presto.sql.tree.TISStackableAstVisitor.StackableAstVisitorContext) Optional(java.util.Optional) Type(com.facebook.presto.sql.tree.Join.Type) NodeProcessResult(com.qlangtech.tis.sql.parser.NodeProcessResult) Joiner(com.google.common.base.Joiner) NodeUtils(com.qlangtech.tis.sql.parser.utils.NodeUtils) Type(com.facebook.presto.sql.tree.Join.Type)

Example 3 with Type

use of com.facebook.presto.sql.tree.Join.Type in project tis by qlangtech.

the class TestGroupBySqlParser method processRelation.

/**
 * @param rel
 * @param rewriter
 * @param stack
 *            调用栈之间需要传递一些参数
 */
private void processRelation(Relation rel, Rewriter rewriter) {
    Table tab = null;
    Join join = null;
    JoinCriteria jc = null;
    if (rel instanceof Join) {
        join = ((Join) rel);
        processRelation(join.getLeft(), rewriter.deeper());
        rewriter.newline();
        final Type t = join.getType();
        switch(t) {
            case LEFT:
                rewriter.append(" LEFT JOIN ");
                break;
            case RIGHT:
                rewriter.append(" RIGHT JOIN ");
                break;
            case INNER:
                rewriter.append(" INNER JOIN ");
                break;
            default:
                throw new IllegalStateException("join type " + t + " is not allow " + rel.getLocation().get());
        }
        // System.out.println(createSpace(layer) + join.getType());
        processRelation(join.getRight(), rewriter.deeper());
        if (join.getCriteria().isPresent()) {
            jc = join.getCriteria().get();
            if (jc instanceof JoinOn) {
                rewriter.append(" ON (");
                Assert.assertEquals(1, jc.getNodes().size());
                for (Node n : jc.getNodes()) {
                    rewriter.append(n);
                }
                popAiasedTableRelation(rewriter);
                rewriter.append(")");
            }
        } else {
            Assert.fail("invalid type:" + jc);
        }
        return;
    }
    AliasedRelation aliasRelation = null;
    if (rel instanceof AliasedRelation) {
        aliasRelation = (AliasedRelation) rel;
        if (aliasRelation.getRelation() instanceof Table) {
            tab = (Table) aliasRelation.getRelation();
            rewriter.append(tab.getName());
            rewriter.stack.push(aliasRelation);
        } else {
            processRelation(aliasRelation.getRelation(), rewriter.deeper());
        }
        rewriter.append(" AS ").append(aliasRelation.getAlias().getValue());
        return;
    }
    TableSubquery subQuery = null;
    if (rel instanceof TableSubquery) {
        subQuery = (TableSubquery) rel;
        rewriter.newline().append("(");
        process(subQuery.getQuery(), rewriter);
        rewriter.newline().append(")");
        return;
    }
    if (rel instanceof Table) {
        Table t = (Table) rel;
        rewriter.append(t.getName());
        return;
    }
    throw new IllegalStateException("illegal:" + rel.getClass() + ",rel:" + rel + ",loc:colnum:" + rel.getLocation().get().getColumnNumber() + ",line:" + rel.getLocation().get().getLineNumber());
}
Also used : Type(com.facebook.presto.sql.tree.Join.Type) Table(com.facebook.presto.sql.tree.Table) JoinCriteria(com.facebook.presto.sql.tree.JoinCriteria) Node(com.facebook.presto.sql.tree.Node) Join(com.facebook.presto.sql.tree.Join) TableSubquery(com.facebook.presto.sql.tree.TableSubquery) JoinOn(com.facebook.presto.sql.tree.JoinOn) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation)

Example 4 with Type

use of com.facebook.presto.sql.tree.Join.Type in project tis by qlangtech.

the class TestGroupBySqlParser method process.

// private static class Visitor extends TISStackableAstVisitor<Void, Integer> {
// 
// @Override
// public Void process(Node node, StackableAstVisitorContext<Integer> context) {
// return super.process(node, context);
// }
// 
// protected Void visitNode(Node node, StackableAstVisitorContext<Integer>
// context) {
// throw new UnsupportedOperationException(String.valueOf(node));
// }
// 
// protected Void visitAliasedRelation(AliasedRelation node,
// StackableAstVisitorContext<Integer> context) {
// 
// this.process(node.getRelation(), context);
// 
// if (context.getPreviousNode().isPresent()) {
// System.out.println("getPreviousNode:" + context.getPreviousNode().get());
// }
// 
// System.out.println(node.getAlias().getValue());
// 
// return null;
// }
// 
// @Override
// protected Void visitComparisonExpression(ComparisonExpression node,
// StackableAstVisitorContext<Integer> context) {
// 
// node.getLeft();
// // System.out.println(node.getOperator() + "," +
// node.getOperator().getValue());
// node.getRight();
// 
// return null;
// // return super.visitComparisonExpression(node, context);
// }
// 
// @Override
// protected Void visitLogicalBinaryExpression(LogicalBinaryExpression node,
// StackableAstVisitorContext<Integer> context) {
// 
// System.out.println("operator:" + node.getOperator());
// 
// this.process(node.getLeft(), context);
// 
// this.process(node.getRight(), context);
// 
// return null;
// 
// // return super.visitLogicalBinaryExpression(node, context);
// }
// 
// @Override
// protected Void visitTable(Table node, StackableAstVisitorContext<Integer>
// context) {
// 
// // System.out.println(node.getName() + "," +
// context.getPreviousNode().get());
// 
// return null;
// }
// 
// protected Void visitQuery(Query node, StackableAstVisitorContext<Integer>
// context) {
// if (node.getWith().isPresent()) {
// 
// }
// 
// processRelation(node.getQueryBody(), context);
// 
// if (node.getOrderBy().isPresent()) {
// process(node.getOrderBy().get(), context);
// }
// 
// if (node.getLimit().isPresent()) {
// // append(indent, "LIMIT " + node.getLimit().get())
// // .append('\n');
// }
// 
// return null;
// }
// 
// @Override
// protected Void visitSelect(Select node, StackableAstVisitorContext<Integer>
// context) {
// 
// for (SelectItem item : node.getSelectItems()) {
// visitSelectItem(item, context);
// }
// return null;
// // return super.visitSelect(node, context);
// }
// 
// @Override
// protected Void visitSelectItem(SelectItem node,
// StackableAstVisitorContext<Integer> context) {
// 
// // System.out.println(node);
// 
// return null;
// // return super.visitSelectItem(node, context);
// }
// 
// protected Void visitQuerySpecification(QuerySpecification body,
// StackableAstVisitorContext<Integer> context) {
// // return visitQueryBody(node, context);
// 
// // Select select = ;
// this.visitSelect(body.getSelect(), context);
// // System.out.println("Columns = " + select.getSelectItems());
// 
// // System.out.println("FromClass = " + body.getFrom().get().getClass());
// 
// // System.out.println("From = " + body.getFrom().get());
// 
// // Optional<Expression> where = body.getWhere();
// // System.out.println("Where = " + where.get());
// // System.out.println("Group by = " + body.getGroupBy());
// // System.out.println("Order by = " + body.getOrderBy());
// 
// if (body.getLimit().isPresent()) {
// // System.out.println("Limit = " + body.getLimit().get());
// }
// 
// // final List<Expression> groupIds = Lists.newArrayList();
// Optional<GroupBy> gby = body.getGroupBy();
// if (gby.isPresent()) {
// this.visitGroupBy(gby.get(), context);
// // GroupBy group = gby.get();
// // for (GroupingElement ge : group.getGroupingElements()) {
// // ge.enumerateGroupingSets().forEach((e) -> e.stream().forEach((r) -> {
// // // rewriter.append(r.getClass()).append(",");
// // groupIds.add(r);
// // }));
// // }
// }
// Optional<Relation> from = body.getFrom();
// ///////////////////////////////////////////////////////////////////////////
// //
// System.out.println("======================================================");
// // List<SelectItem>
// SingleColumn single = null;
// 
// // int itemSize = select.getSelectItems().size();
// // int i = 0;
// // for (SelectItem col : select.getSelectItems()) {
// //
// // if (col instanceof SingleColumn) {
// // single = (SingleColumn) col;
// // processExpression(single.getExpression(), rewriter);
// // Optional<Identifier> alias = single.getAlias();
// //
// // if (alias.isPresent()) {
// // // 这个可能是function的列
// // rewriter.addColumnReference(alias.get().getValue(),
// single.getExpression(),
// // from);
// // System.out.println(
// // single.getExpression().getClass() + ":" + single.getExpression() + ":" +
// // alias.get());
// //
// // rewriter.append(" AS ").append(alias.get());
// // } else {
// // System.out.println(
// // "==================" + single.getExpression() + "<<" +
// // single.getExpression().getClass());
// // // rewriter.append(single.getExpression());
// // // processExpression(single.getExpression(), rewriter);
// // DereferenceExpression deref = null;
// // if (single.getExpression() instanceof DereferenceExpression) {
// // deref = (DereferenceExpression) single.getExpression();
// //
// // rewriter.addColumnReference(deref.getField().getValue(), deref, from);
// // } else if (single.getExpression() instanceof Identifier) {
// // if (!from.isPresent()) {
// // throw new IllegalStateException("have not set from \n" +
// query.toString());
// // }
// //
// // rewriter.addColumnReference( //
// // new ColName(((Identifier) single.getExpression()).getValue()) //
// // , null //
// // , from);
// //
// // } else {
// // throw new IllegalStateException(
// // "illegal type " + single.getExpression() + "," +
// // single.getExpression().getClass());
// // }
// //
// // }
// //
// // } else {
// //
// // }
// //
// // if (i++ < (itemSize - 1)) {
// // rewriter.append(",");
// // }
// // }
// 
// Relation rel = null;
// // Table table = null;
// if (from.isPresent()) {
// rel = from.get();
// // rewriter.newline().append("FROM ");
// // processRelation(rel, rewriter);
// 
// this.processRelation(rel, context);
// 
// } else {
// throw new IllegalStateException("have not set from \n" + body);
// }
// 
// Optional<Expression> w = body.getWhere();
// Expression where = null;
// if (w.isPresent()) {
// where = w.get();
// process(where, context);
// // rewriter.newline().append("WHERE ");
// // rewriter.append(table);
// 
// // processExpression(where, rewriter);
// 
// } else {
// // if (table != null) {
// // rewriter.newline().append("WHERE ");
// // }
// }
// 
// // for (int ii = 0; ii < groupIds.size(); ii++) {
// // processExpression(groupIds.get(ii), rewriter);
// // if (ii < groupIds.size() - 1) {
// // rewriter.append(",");
// // }
// // }
// 
// return null;
// }
// 
// @Override
// protected Void visitJoin(Join node, StackableAstVisitorContext<Integer>
// context) {
// 
// JoinCriteria criteria = node.getCriteria().orElse(null);
// String type = node.getType().toString();
// if (criteria instanceof NaturalJoin) {
// type = "NATURAL " + type;
// }
// 
// if (node.getType() != Join.Type.IMPLICIT) {
// // builder.append('(');
// }
// process(node.getLeft(), context);
// 
// // builder.append('\n');
// if (node.getType() == Join.Type.IMPLICIT) {
// // append(indent, ", ");
// } else {
// // append(indent, type).append(" JOIN ");
// }
// 
// process(node.getRight(), context);
// 
// if (node.getType() != Join.Type.CROSS && node.getType() !=
// Join.Type.IMPLICIT) {
// if (criteria instanceof JoinUsing) {
// JoinUsing using = (JoinUsing) criteria;
// // builder.append(" USING (").append(Joiner.on(",
// // ").join(using.getColumns())).append(")");
// } else if (criteria instanceof JoinOn) {
// JoinOn on = (JoinOn) criteria;
// // builder.append(" ON ").append(formatExpression(on.getExpression(),
// // parameters));
// } else if (!(criteria instanceof NaturalJoin)) {
// throw new UnsupportedOperationException("unknown join criteria: " +
// criteria);
// }
// }
// 
// if (node.getType() != Join.Type.IMPLICIT) {
// // builder.append(")");
// }
// 
// return null;
// 
// }
// 
// private void processRelation(Relation relation,
// StackableAstVisitorContext<Integer> indent) {
// // TODO: handle this properly
// if (relation instanceof Table) {
// // builder.append("TABLE ").append(((Table)
// relation).getName()).append('\n');
// } else {
// process(relation, indent);
// }
// }
// 
// }
public void process(Query query, Rewriter rewriter) {
    QuerySpecification body = (QuerySpecification) query.getQueryBody();
    Select select = body.getSelect();
    if (body.getLimit().isPresent()) {
    // System.out.println("Limit = " + body.getLimit().get());
    }
    final List<Expression> groupIds = Lists.newArrayList();
    Optional<GroupBy> gby = body.getGroupBy();
    if (gby.isPresent()) {
        GroupBy group = gby.get();
        for (GroupingElement ge : group.getGroupingElements()) {
            ge.enumerateGroupingSets().forEach((e) -> e.stream().forEach((r) -> {
                // rewriter.append(r.getClass()).append(",");
                groupIds.add(r);
            }));
        }
    }
    Optional<Relation> from = body.getFrom();
    // /////////////////////////////////////////////////////////////////////////
    // System.out.println("======================================================");
    // List<SelectItem>
    SingleColumn single = null;
    rewriter.append("SELECT ");
    int itemSize = select.getSelectItems().size();
    int i = 0;
    for (SelectItem col : select.getSelectItems()) {
        if (col instanceof SingleColumn) {
            single = (SingleColumn) col;
            processExpression(single.getExpression(), rewriter);
            Optional<Identifier> alias = single.getAlias();
            if (alias.isPresent()) {
                // 这个可能是function的列
                rewriter.addColumnReference(alias.get().getValue(), single.getExpression(), from);
                // System.out.println(
                // single.getExpression().getClass() + ":" + single.getExpression() + ":" +
                // alias.get());
                rewriter.append(" AS ").append(alias.get());
            } else {
                // System.out.println(
                // "==================" + single.getExpression() + "<<" +
                // single.getExpression().getClass());
                // rewriter.append(single.getExpression());
                // processExpression(single.getExpression(), rewriter);
                DereferenceExpression deref = null;
                if (single.getExpression() instanceof DereferenceExpression) {
                    deref = (DereferenceExpression) single.getExpression();
                    rewriter.addColumnReference(deref.getField().getValue(), deref, from);
                } else if (single.getExpression() instanceof Identifier) {
                    if (!from.isPresent()) {
                        throw new IllegalStateException("have not set from \n" + query.toString());
                    }
                    // 
                    // 
                    // 
                    rewriter.addColumnReference(new ColName(((Identifier) single.getExpression()).getValue()), null, from);
                } else {
                    throw new IllegalStateException("illegal type " + single.getExpression() + "," + single.getExpression().getClass());
                }
            }
        } else {
        }
        if (i++ < (itemSize - 1)) {
            rewriter.append(",");
        }
    }
    Relation rel = null;
    // Table table = null;
    if (from.isPresent()) {
        rel = from.get();
        rewriter.newline().append("FROM ");
        processRelation(rel, rewriter);
    } else {
        throw new IllegalStateException("have not set from \n" + query.toString());
    }
    Optional<Expression> w = body.getWhere();
    Expression where = null;
    if (w.isPresent()) {
        where = w.get();
        rewriter.newline().append("WHERE ");
        // rewriter.append(table);
        processExpression(where, rewriter);
    } else {
    // if (table != null) {
    // rewriter.newline().append("WHERE ");
    // }
    }
    for (int ii = 0; ii < groupIds.size(); ii++) {
        processExpression(groupIds.get(ii), rewriter);
        if (ii < groupIds.size() - 1) {
            rewriter.append(",");
        }
    }
}
Also used : QualifiedName(com.facebook.presto.sql.tree.QualifiedName) Table(com.facebook.presto.sql.tree.Table) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation) Stack(java.util.Stack) SingleColumn(com.facebook.presto.sql.tree.SingleColumn) Identifier(com.facebook.presto.sql.tree.Identifier) StringLiteral(com.facebook.presto.sql.tree.StringLiteral) Join(com.facebook.presto.sql.tree.Join) WhenClause(com.facebook.presto.sql.tree.WhenClause) Lists(com.google.common.collect.Lists) Operator(com.facebook.presto.sql.tree.ArithmeticBinaryExpression.Operator) Map(java.util.Map) SelectItem(com.facebook.presto.sql.tree.SelectItem) TableSubquery(com.facebook.presto.sql.tree.TableSubquery) Cast(com.facebook.presto.sql.tree.Cast) JoinOn(com.facebook.presto.sql.tree.JoinOn) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) DereferenceExpression(com.facebook.presto.sql.tree.DereferenceExpression) SubscriptExpression(com.facebook.presto.sql.tree.SubscriptExpression) GroupBy(com.facebook.presto.sql.tree.GroupBy) JoinCriteria(com.facebook.presto.sql.tree.JoinCriteria) Query(com.facebook.presto.sql.tree.Query) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) Relation(com.facebook.presto.sql.tree.Relation) Node(com.facebook.presto.sql.tree.Node) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) GroupingElement(com.facebook.presto.sql.tree.GroupingElement) Maps(com.google.common.collect.Maps) List(java.util.List) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) Expression(com.facebook.presto.sql.tree.Expression) DefaultTraversalVisitor(com.facebook.presto.sql.tree.DefaultTraversalVisitor) ArithmeticBinaryExpression(com.facebook.presto.sql.tree.ArithmeticBinaryExpression) SearchedCaseExpression(com.facebook.presto.sql.tree.SearchedCaseExpression) Optional(java.util.Optional) SqlDataFlowTopology(com.qlangtech.tis.sql.parser.SqlTaskNodeMeta.SqlDataFlowTopology) CoalesceExpression(com.facebook.presto.sql.tree.CoalesceExpression) LongLiteral(com.facebook.presto.sql.tree.LongLiteral) Type(com.facebook.presto.sql.tree.Join.Type) Select(com.facebook.presto.sql.tree.Select) Assert(com.qlangtech.tis.common.utils.Assert) Collections(java.util.Collections) GroupBy(com.facebook.presto.sql.tree.GroupBy) DereferenceExpression(com.facebook.presto.sql.tree.DereferenceExpression) SingleColumn(com.facebook.presto.sql.tree.SingleColumn) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) GroupingElement(com.facebook.presto.sql.tree.GroupingElement) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation) Relation(com.facebook.presto.sql.tree.Relation) Identifier(com.facebook.presto.sql.tree.Identifier) DereferenceExpression(com.facebook.presto.sql.tree.DereferenceExpression) SubscriptExpression(com.facebook.presto.sql.tree.SubscriptExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) Expression(com.facebook.presto.sql.tree.Expression) ArithmeticBinaryExpression(com.facebook.presto.sql.tree.ArithmeticBinaryExpression) SearchedCaseExpression(com.facebook.presto.sql.tree.SearchedCaseExpression) CoalesceExpression(com.facebook.presto.sql.tree.CoalesceExpression) SelectItem(com.facebook.presto.sql.tree.SelectItem) Select(com.facebook.presto.sql.tree.Select)

Aggregations

Type (com.facebook.presto.sql.tree.Join.Type)4 Optional (java.util.Optional)3 com.facebook.presto.sql.tree (com.facebook.presto.sql.tree)2 AliasedRelation (com.facebook.presto.sql.tree.AliasedRelation)2 Join (com.facebook.presto.sql.tree.Join)2 JoinCriteria (com.facebook.presto.sql.tree.JoinCriteria)2 JoinOn (com.facebook.presto.sql.tree.JoinOn)2 Node (com.facebook.presto.sql.tree.Node)2 StackableAstVisitorContext (com.facebook.presto.sql.tree.TISStackableAstVisitor.StackableAstVisitorContext)2 Table (com.facebook.presto.sql.tree.Table)2 TableSubquery (com.facebook.presto.sql.tree.TableSubquery)2 Joiner (com.google.common.base.Joiner)2 ArithmeticBinaryExpression (com.facebook.presto.sql.tree.ArithmeticBinaryExpression)1 Operator (com.facebook.presto.sql.tree.ArithmeticBinaryExpression.Operator)1 Cast (com.facebook.presto.sql.tree.Cast)1 CoalesceExpression (com.facebook.presto.sql.tree.CoalesceExpression)1 ComparisonExpression (com.facebook.presto.sql.tree.ComparisonExpression)1 DefaultTraversalVisitor (com.facebook.presto.sql.tree.DefaultTraversalVisitor)1 DereferenceExpression (com.facebook.presto.sql.tree.DereferenceExpression)1 Expression (com.facebook.presto.sql.tree.Expression)1