Search in sources :

Example 6 with OrderBy

use of io.prestosql.sql.tree.OrderBy in project hetu-core by openlookeng.

the class FunctionCallProvider method getExpectedValue.

public FunctionCall getExpectedValue(SymbolAliases aliases) {
    List<Expression> symbolReferences = toSymbolReferences(args, aliases);
    if (isWindowFunction) {
        verify(!distinct, "window does not support distinct");
        verify(orderBy.isEmpty(), "window does not support order by");
        return new ExpectedWindowFunctionCall(symbolReferences);
    }
    Optional<OrderBy> orderByClause = Optional.empty();
    if (!orderBy.isEmpty()) {
        orderByClause = Optional.of(new OrderBy(orderBy.stream().map(item -> new SortItem(new SymbolReference(aliases.get(item.getField()).getName()), item.getOrdering(), item.getNullOrdering())).collect(Collectors.toList())));
    }
    return new FunctionCall(Optional.empty(), name, Optional.empty(), Optional.empty(), orderByClause, distinct, true, symbolReferences);
}
Also used : OrderBy(io.prestosql.sql.tree.OrderBy) SortItem(io.prestosql.sql.tree.SortItem) Expression(io.prestosql.sql.tree.Expression) SymbolReference(io.prestosql.sql.tree.SymbolReference) FunctionCall(io.prestosql.sql.tree.FunctionCall)

Example 7 with OrderBy

use of io.prestosql.sql.tree.OrderBy in project hetu-core by openlookeng.

the class HiveAstBuilder method visitQueryNoWith.

@Override
public Node visitQueryNoWith(HiveSqlParser.QueryNoWithContext context) {
    QueryBody term = (QueryBody) visit(context.queryTerm());
    Optional<OrderBy> orderBy = Optional.empty();
    if (context.ORDER() != null) {
        orderBy = Optional.of(new OrderBy(getLocation(context.ORDER()), visit(context.sortItem(), SortItem.class)));
    }
    if (context.clusteredBy() != null) {
        addDiff(DiffType.UNSUPPORTED, context.CLUSTER().getText(), "[CLUSTERED BY] is not supported");
        throw unsupportedError(ErrorType.UNSUPPORTED_STATEMENT, "Unsupported attribute: CLUSTERED BY", context.clusteredBy());
    }
    if (context.distributeBy() != null) {
        addDiff(DiffType.UNSUPPORTED, context.DISTRIBUTE().getText(), "[DISTRIBUTE BY] is not supported");
        throw unsupportedError(ErrorType.UNSUPPORTED_STATEMENT, "Unsupported attribute: DISTRIBUTE BY", context.distributeBy());
    }
    if (context.sortedBy() != null) {
        addDiff(DiffType.UNSUPPORTED, context.SORT().getText(), "[SORT BY] is not supported");
        throw unsupportedError(ErrorType.UNSUPPORTED_STATEMENT, "Unsupported attribute: SORT BY", context.sortedBy());
    }
    Optional<Node> limit = Optional.empty();
    Optional<Offset> offset = Optional.empty();
    if (context.LIMIT() != null) {
        Optional<String> offsetValue = getTextIfPresent(context.offset);
        Optional<String> rowsValue = getTextIfPresent(context.rows);
        if (offsetValue.isPresent()) {
            offset = Optional.of(new Offset(offsetValue.get()));
        }
        if (rowsValue.isPresent()) {
            limit = Optional.of(new Limit(rowsValue.get()));
        }
    }
    if (term instanceof QuerySpecification) {
        QuerySpecification query = (QuerySpecification) term;
        return new Query(getLocation(context), Optional.empty(), new QuerySpecification(getLocation(context), query.getSelect(), query.getFrom(), query.getWhere(), query.getGroupBy(), query.getHaving(), orderBy, offset, limit), Optional.empty(), Optional.empty(), Optional.empty());
    }
    return new Query(getLocation(context), Optional.empty(), term, orderBy, offset, limit);
}
Also used : OrderBy(io.prestosql.sql.tree.OrderBy) Query(io.prestosql.sql.tree.Query) WithQuery(io.prestosql.sql.tree.WithQuery) TerminalNode(org.antlr.v4.runtime.tree.TerminalNode) Node(io.prestosql.sql.tree.Node) Offset(io.prestosql.sql.tree.Offset) QuerySpecification(io.prestosql.sql.tree.QuerySpecification) SortItem(io.prestosql.sql.tree.SortItem) Limit(io.prestosql.sql.tree.Limit) QueryBody(io.prestosql.sql.tree.QueryBody)

Example 8 with OrderBy

use of io.prestosql.sql.tree.OrderBy in project hetu-core by openlookeng.

the class HiveAstBuilder method visitFunctionCall.

@Override
public Node visitFunctionCall(HiveSqlParser.FunctionCallContext context) {
    Optional<Expression> filter = Optional.empty();
    Optional<OrderBy> orderBy = Optional.empty();
    Optional<Window> window = visitIfPresent(context.over(), Window.class);
    boolean distinct = isDistinct(context.setQuantifier());
    QualifiedName name = getQualifiedName(context.qualifiedName());
    if (name.toString().equalsIgnoreCase("if")) {
        check(context.expression().size() == 3, "Illegal arguments for 'if' function", context);
        check(!window.isPresent(), "OVER not valid for 'if' function", context);
        check(!distinct, "DISTINCT not valid for 'if' function", context);
        Expression elseExpression = (Expression) visit(context.expression(2));
        return new IfExpression(getLocation(context), (Expression) visit(context.expression(0)), (Expression) visit(context.expression(1)), elseExpression);
    }
    if (name.toString().equalsIgnoreCase("nullif")) {
        check(context.expression().size() == 2, "Illegal arguments for 'nullif' function", context);
        check(!window.isPresent(), "OVER not valid for 'nullif' function", context);
        check(!distinct, "DISTINCT not valid for 'nullif' function", context);
        return new NullIfExpression(getLocation(context), (Expression) visit(context.expression(0)), (Expression) visit(context.expression(1)));
    }
    if (name.toString().equalsIgnoreCase("coalesce")) {
        check(context.expression().size() > 0, "The 'coalesce' function must have at least one argument", context);
        check(!window.isPresent(), "OVER not valid for 'coalesce' function", context);
        check(!distinct, "DISTINCT not valid for 'coalesce' function", context);
        return new CoalesceExpression(getLocation(context), visit(context.expression(), Expression.class));
    }
    return new FunctionCall(Optional.of(getLocation(context)), getQualifiedName(context.qualifiedName()), window, filter, orderBy, distinct, false, visit(context.expression(), Expression.class));
}
Also used : OrderBy(io.prestosql.sql.tree.OrderBy) Window(io.prestosql.sql.tree.Window) IfExpression(io.prestosql.sql.tree.IfExpression) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) ArithmeticUnaryExpression(io.prestosql.sql.tree.ArithmeticUnaryExpression) LogicalBinaryExpression(io.prestosql.sql.tree.LogicalBinaryExpression) NotExpression(io.prestosql.sql.tree.NotExpression) ComparisonExpression(io.prestosql.sql.tree.ComparisonExpression) Expression(io.prestosql.sql.tree.Expression) SimpleCaseExpression(io.prestosql.sql.tree.SimpleCaseExpression) SubqueryExpression(io.prestosql.sql.tree.SubqueryExpression) IfExpression(io.prestosql.sql.tree.IfExpression) InListExpression(io.prestosql.sql.tree.InListExpression) CoalesceExpression(io.prestosql.sql.tree.CoalesceExpression) ArithmeticBinaryExpression(io.prestosql.sql.tree.ArithmeticBinaryExpression) SearchedCaseExpression(io.prestosql.sql.tree.SearchedCaseExpression) SubscriptExpression(io.prestosql.sql.tree.SubscriptExpression) DereferenceExpression(io.prestosql.sql.tree.DereferenceExpression) QuantifiedComparisonExpression(io.prestosql.sql.tree.QuantifiedComparisonExpression) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) QualifiedName(io.prestosql.sql.tree.QualifiedName) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) FunctionCall(io.prestosql.sql.tree.FunctionCall) CoalesceExpression(io.prestosql.sql.tree.CoalesceExpression)

Example 9 with OrderBy

use of io.prestosql.sql.tree.OrderBy in project hetu-core by openlookeng.

the class TreePrinter method print.

public void print(Node root) {
    AstVisitor<Void, Integer> printer = new DefaultTraversalVisitor<Void, Integer>() {

        @Override
        protected Void visitNode(Node node, Integer indentLevel) {
            throw new UnsupportedOperationException("not yet implemented: " + node);
        }

        @Override
        protected Void visitQuery(Query node, Integer indentLevel) {
            print(indentLevel, "Query ");
            Integer tmpIndentLevel = indentLevel;
            tmpIndentLevel++;
            print(tmpIndentLevel, "QueryBody");
            process(node.getQueryBody(), tmpIndentLevel);
            if (node.getOrderBy().isPresent()) {
                print(tmpIndentLevel, "OrderBy");
                process(node.getOrderBy().get(), tmpIndentLevel + 1);
            }
            if (node.getLimit().isPresent()) {
                print(tmpIndentLevel, "Limit: " + node.getLimit().get());
            }
            return null;
        }

        @Override
        protected Void visitQuerySpecification(QuerySpecification node, Integer indentLevel) {
            print(indentLevel, "QuerySpecification ");
            Integer tmpIndentLevel = indentLevel;
            tmpIndentLevel++;
            process(node.getSelect(), tmpIndentLevel);
            if (node.getFrom().isPresent()) {
                print(tmpIndentLevel, "From");
                process(node.getFrom().get(), tmpIndentLevel + 1);
            }
            if (node.getWhere().isPresent()) {
                print(tmpIndentLevel, "Where");
                process(node.getWhere().get(), tmpIndentLevel + 1);
            }
            if (node.getGroupBy().isPresent()) {
                String distinct = "";
                if (node.getGroupBy().get().isDistinct()) {
                    distinct = "[DISTINCT]";
                }
                print(tmpIndentLevel, "GroupBy" + distinct);
                for (GroupingElement groupingElement : node.getGroupBy().get().getGroupingElements()) {
                    print(tmpIndentLevel, "SimpleGroupBy");
                    if (groupingElement instanceof SimpleGroupBy) {
                        for (Expression column : groupingElement.getExpressions()) {
                            process(column, tmpIndentLevel + 1);
                        }
                    } else if (groupingElement instanceof GroupingSets) {
                        print(tmpIndentLevel + 1, "GroupingSets");
                        for (List<Expression> set : ((GroupingSets) groupingElement).getSets()) {
                            print(tmpIndentLevel + 2, "GroupingSet[");
                            for (Expression expression : set) {
                                process(expression, tmpIndentLevel + 3);
                            }
                            print(tmpIndentLevel + 2, "]");
                        }
                    } else if (groupingElement instanceof Cube) {
                        print(tmpIndentLevel + 1, "Cube");
                        for (Expression column : groupingElement.getExpressions()) {
                            process(column, tmpIndentLevel + 1);
                        }
                    } else if (groupingElement instanceof Rollup) {
                        print(tmpIndentLevel + 1, "Rollup");
                        for (Expression column : groupingElement.getExpressions()) {
                            process(column, tmpIndentLevel + 1);
                        }
                    }
                }
            }
            if (node.getHaving().isPresent()) {
                print(tmpIndentLevel, "Having");
                process(node.getHaving().get(), tmpIndentLevel + 1);
            }
            if (node.getOrderBy().isPresent()) {
                print(tmpIndentLevel, "OrderBy");
                process(node.getOrderBy().get(), tmpIndentLevel + 1);
            }
            if (node.getLimit().isPresent()) {
                print(tmpIndentLevel, "Limit: " + node.getLimit().get());
            }
            return null;
        }

        protected Void visitOrderBy(OrderBy node, Integer indentLevel) {
            for (SortItem sortItem : node.getSortItems()) {
                process(sortItem, indentLevel);
            }
            return null;
        }

        @Override
        protected Void visitSelect(Select node, Integer indentLevel) {
            String distinct = "";
            if (node.isDistinct()) {
                distinct = "[DISTINCT]";
            }
            print(indentLevel, "Select" + distinct);
            // visit children
            super.visitSelect(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitAllColumns(AllColumns node, Integer indent) {
            if (node.getPrefix().isPresent()) {
                print(indent, node.getPrefix() + ".*");
            } else {
                print(indent, "*");
            }
            return null;
        }

        @Override
        protected Void visitSingleColumn(SingleColumn node, Integer indent) {
            if (node.getAlias().isPresent()) {
                print(indent, "Alias: " + node.getAlias().get());
            }
            // visit children
            super.visitSingleColumn(node, indent + 1);
            return null;
        }

        @Override
        protected Void visitComparisonExpression(ComparisonExpression node, Integer indentLevel) {
            print(indentLevel, node.getOperator().toString());
            super.visitComparisonExpression(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitArithmeticBinary(ArithmeticBinaryExpression node, Integer indentLevel) {
            print(indentLevel, node.getOperator().toString());
            super.visitArithmeticBinary(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitLogicalBinaryExpression(LogicalBinaryExpression node, Integer indentLevel) {
            print(indentLevel, node.getOperator().toString());
            super.visitLogicalBinaryExpression(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitStringLiteral(StringLiteral node, Integer indentLevel) {
            print(indentLevel, "String[" + node.getValue() + "]");
            return null;
        }

        @Override
        protected Void visitBinaryLiteral(BinaryLiteral node, Integer indentLevel) {
            print(indentLevel, "Binary[" + node.toHexString() + "]");
            return null;
        }

        @Override
        protected Void visitBooleanLiteral(BooleanLiteral node, Integer indentLevel) {
            print(indentLevel, "Boolean[" + node.getValue() + "]");
            return null;
        }

        @Override
        protected Void visitLongLiteral(LongLiteral node, Integer indentLevel) {
            print(indentLevel, "Long[" + node.getValue() + "]");
            return null;
        }

        @Override
        protected Void visitLikePredicate(LikePredicate node, Integer indentLevel) {
            print(indentLevel, "LIKE");
            super.visitLikePredicate(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitIdentifier(Identifier node, Integer indentLevel) {
            QualifiedName resolved = resolvedNameReferences.get(node);
            String resolvedName = "";
            if (resolved != null) {
                resolvedName = "=>" + resolved.toString();
            }
            print(indentLevel, "Identifier[" + node.getValue() + resolvedName + "]");
            return null;
        }

        @Override
        protected Void visitDereferenceExpression(DereferenceExpression node, Integer indentLevel) {
            QualifiedName resolved = resolvedNameReferences.get(node);
            String resolvedName = "";
            if (resolved != null) {
                resolvedName = "=>" + resolved.toString();
            }
            print(indentLevel, "DereferenceExpression[" + node + resolvedName + "]");
            return null;
        }

        @Override
        protected Void visitFunctionCall(FunctionCall node, Integer indentLevel) {
            String name = Joiner.on('.').join(node.getName().getParts());
            print(indentLevel, "FunctionCall[" + name + "]");
            super.visitFunctionCall(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitTable(Table node, Integer indentLevel) {
            String name = Joiner.on('.').join(node.getName().getParts());
            print(indentLevel, "Table[" + name + "]");
            return null;
        }

        @Override
        protected Void visitValues(Values node, Integer indentLevel) {
            print(indentLevel, "Values");
            super.visitValues(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitRow(Row node, Integer indentLevel) {
            print(indentLevel, "Row");
            super.visitRow(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitAliasedRelation(AliasedRelation node, Integer indentLevel) {
            print(indentLevel, "Alias[" + node.getAlias() + "]");
            super.visitAliasedRelation(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitSampledRelation(SampledRelation node, Integer indentLevel) {
            print(indentLevel, "TABLESAMPLE[" + node.getType() + " (" + node.getSamplePercentage() + ")]");
            super.visitSampledRelation(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitTableSubquery(TableSubquery node, Integer indentLevel) {
            print(indentLevel, "SubQuery");
            super.visitTableSubquery(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitInPredicate(InPredicate node, Integer indentLevel) {
            print(indentLevel, "IN");
            super.visitInPredicate(node, indentLevel + 1);
            return null;
        }

        @Override
        protected Void visitSubqueryExpression(SubqueryExpression node, Integer indentLevel) {
            print(indentLevel, "SubQuery");
            super.visitSubqueryExpression(node, indentLevel + 1);
            return null;
        }
    };
    printer.process(root, 0);
}
Also used : ArithmeticBinaryExpression(io.prestosql.sql.tree.ArithmeticBinaryExpression) LogicalBinaryExpression(io.prestosql.sql.tree.LogicalBinaryExpression) SimpleGroupBy(io.prestosql.sql.tree.SimpleGroupBy) Query(io.prestosql.sql.tree.Query) Rollup(io.prestosql.sql.tree.Rollup) BooleanLiteral(io.prestosql.sql.tree.BooleanLiteral) Node(io.prestosql.sql.tree.Node) Values(io.prestosql.sql.tree.Values) AllColumns(io.prestosql.sql.tree.AllColumns) SubqueryExpression(io.prestosql.sql.tree.SubqueryExpression) QuerySpecification(io.prestosql.sql.tree.QuerySpecification) SortItem(io.prestosql.sql.tree.SortItem) Identifier(io.prestosql.sql.tree.Identifier) List(java.util.List) FunctionCall(io.prestosql.sql.tree.FunctionCall) SampledRelation(io.prestosql.sql.tree.SampledRelation) GroupingSets(io.prestosql.sql.tree.GroupingSets) OrderBy(io.prestosql.sql.tree.OrderBy) DereferenceExpression(io.prestosql.sql.tree.DereferenceExpression) Table(io.prestosql.sql.tree.Table) LongLiteral(io.prestosql.sql.tree.LongLiteral) QualifiedName(io.prestosql.sql.tree.QualifiedName) DefaultTraversalVisitor(io.prestosql.sql.tree.DefaultTraversalVisitor) SingleColumn(io.prestosql.sql.tree.SingleColumn) LikePredicate(io.prestosql.sql.tree.LikePredicate) TableSubquery(io.prestosql.sql.tree.TableSubquery) InPredicate(io.prestosql.sql.tree.InPredicate) GroupingElement(io.prestosql.sql.tree.GroupingElement) ComparisonExpression(io.prestosql.sql.tree.ComparisonExpression) BinaryLiteral(io.prestosql.sql.tree.BinaryLiteral) StringLiteral(io.prestosql.sql.tree.StringLiteral) ArithmeticBinaryExpression(io.prestosql.sql.tree.ArithmeticBinaryExpression) DereferenceExpression(io.prestosql.sql.tree.DereferenceExpression) LogicalBinaryExpression(io.prestosql.sql.tree.LogicalBinaryExpression) ComparisonExpression(io.prestosql.sql.tree.ComparisonExpression) SubqueryExpression(io.prestosql.sql.tree.SubqueryExpression) Expression(io.prestosql.sql.tree.Expression) Cube(io.prestosql.sql.tree.Cube) Select(io.prestosql.sql.tree.Select) Row(io.prestosql.sql.tree.Row) AliasedRelation(io.prestosql.sql.tree.AliasedRelation)

Example 10 with OrderBy

use of io.prestosql.sql.tree.OrderBy in project hetu-core by openlookeng.

the class AstBuilder method visitFunctionCall.

@Override
public Node visitFunctionCall(SqlBaseParser.FunctionCallContext context) {
    Optional<Expression> filter = visitIfPresent(context.filter(), Expression.class);
    Optional<Window> window = visitIfPresent(context.over(), Window.class);
    Optional<OrderBy> orderBy = Optional.empty();
    if (context.ORDER() != null) {
        orderBy = Optional.of(new OrderBy(visit(context.sortItem(), SortItem.class)));
    }
    QualifiedName name = getQualifiedName(context.qualifiedName());
    boolean distinct = isDistinct(context.setQuantifier());
    boolean ignoreNulls = context.nullTreatment() != null && context.nullTreatment().IGNORE() != null;
    if (name.toString().equalsIgnoreCase("if")) {
        check(context.expression().size() == 2 || context.expression().size() == 3, "Invalid number of arguments for 'if' function", context);
        check(!window.isPresent(), "OVER clause not valid for 'if' function", context);
        check(!distinct, "DISTINCT not valid for 'if' function", context);
        check(!filter.isPresent(), "FILTER not valid for 'if' function", context);
        Expression elseExpression = null;
        if (context.expression().size() == 3) {
            elseExpression = (Expression) visit(context.expression(2));
        }
        return new IfExpression(getLocation(context), (Expression) visit(context.expression(0)), (Expression) visit(context.expression(1)), elseExpression);
    }
    if (name.toString().equalsIgnoreCase("nullif")) {
        check(context.expression().size() == 2, "Invalid number of arguments for 'nullif' function", context);
        check(!window.isPresent(), "OVER clause not valid for 'nullif' function", context);
        check(!distinct, "DISTINCT not valid for 'nullif' function", context);
        check(!filter.isPresent(), "FILTER not valid for 'nullif' function", context);
        return new NullIfExpression(getLocation(context), (Expression) visit(context.expression(0)), (Expression) visit(context.expression(1)));
    }
    if (name.toString().equalsIgnoreCase("coalesce")) {
        check(context.expression().size() >= 2, "The 'coalesce' function must have at least two arguments", context);
        check(!window.isPresent(), "OVER clause not valid for 'coalesce' function", context);
        check(!distinct, "DISTINCT not valid for 'coalesce' function", context);
        check(!filter.isPresent(), "FILTER not valid for 'coalesce' function", context);
        return new CoalesceExpression(getLocation(context), visit(context.expression(), Expression.class));
    }
    if (name.toString().equalsIgnoreCase("try")) {
        check(context.expression().size() == 1, "The 'try' function must have exactly one argument", context);
        check(!window.isPresent(), "OVER clause not valid for 'try' function", context);
        check(!distinct, "DISTINCT not valid for 'try' function", context);
        check(!filter.isPresent(), "FILTER not valid for 'try' function", context);
        return new TryExpression(getLocation(context), (Expression) visit(getOnlyElement(context.expression())));
    }
    if (name.toString().equalsIgnoreCase("format")) {
        check(context.expression().size() >= 2, "The 'format' function must have at least two arguments", context);
        check(!window.isPresent(), "OVER clause not valid for 'format' function", context);
        check(!distinct, "DISTINCT not valid for 'format' function", context);
        check(!filter.isPresent(), "FILTER not valid for 'format' function", context);
        return new Format(getLocation(context), visit(context.expression(), Expression.class));
    }
    if (name.toString().equalsIgnoreCase("$internal$bind")) {
        check(context.expression().size() >= 1, "The '$internal$bind' function must have at least one arguments", context);
        check(!window.isPresent(), "OVER clause not valid for '$internal$bind' function", context);
        check(!distinct, "DISTINCT not valid for '$internal$bind' function", context);
        check(!filter.isPresent(), "FILTER not valid for '$internal$bind' function", context);
        int numValues = context.expression().size() - 1;
        List<Expression> arguments = context.expression().stream().map(this::visit).map(Expression.class::cast).collect(toImmutableList());
        return new BindExpression(getLocation(context), arguments.subList(0, numValues), arguments.get(numValues));
    }
    return new FunctionCall(Optional.of(getLocation(context)), getQualifiedName(context.qualifiedName()), window, filter, orderBy, distinct, ignoreNulls, visit(context.expression(), Expression.class));
}
Also used : Window(io.prestosql.sql.tree.Window) OrderBy(io.prestosql.sql.tree.OrderBy) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) IfExpression(io.prestosql.sql.tree.IfExpression) QualifiedName(io.prestosql.sql.tree.QualifiedName) TryExpression(io.prestosql.sql.tree.TryExpression) SortItem(io.prestosql.sql.tree.SortItem) ExplainFormat(io.prestosql.sql.tree.ExplainFormat) Format(io.prestosql.sql.tree.Format) ArithmeticUnaryExpression(io.prestosql.sql.tree.ArithmeticUnaryExpression) LogicalBinaryExpression(io.prestosql.sql.tree.LogicalBinaryExpression) NotExpression(io.prestosql.sql.tree.NotExpression) ComparisonExpression(io.prestosql.sql.tree.ComparisonExpression) Expression(io.prestosql.sql.tree.Expression) ArithmeticBinaryExpression(io.prestosql.sql.tree.ArithmeticBinaryExpression) SearchedCaseExpression(io.prestosql.sql.tree.SearchedCaseExpression) DereferenceExpression(io.prestosql.sql.tree.DereferenceExpression) QuantifiedComparisonExpression(io.prestosql.sql.tree.QuantifiedComparisonExpression) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) LambdaExpression(io.prestosql.sql.tree.LambdaExpression) SimpleCaseExpression(io.prestosql.sql.tree.SimpleCaseExpression) BindExpression(io.prestosql.sql.tree.BindExpression) SubqueryExpression(io.prestosql.sql.tree.SubqueryExpression) IfExpression(io.prestosql.sql.tree.IfExpression) InListExpression(io.prestosql.sql.tree.InListExpression) CoalesceExpression(io.prestosql.sql.tree.CoalesceExpression) SubscriptExpression(io.prestosql.sql.tree.SubscriptExpression) TryExpression(io.prestosql.sql.tree.TryExpression) BindExpression(io.prestosql.sql.tree.BindExpression) NullIfExpression(io.prestosql.sql.tree.NullIfExpression) FunctionCall(io.prestosql.sql.tree.FunctionCall) CoalesceExpression(io.prestosql.sql.tree.CoalesceExpression)

Aggregations

OrderBy (io.prestosql.sql.tree.OrderBy)10 SortItem (io.prestosql.sql.tree.SortItem)9 FunctionCall (io.prestosql.sql.tree.FunctionCall)7 Expression (io.prestosql.sql.tree.Expression)6 Query (io.prestosql.sql.tree.Query)6 QuerySpecification (io.prestosql.sql.tree.QuerySpecification)6 DereferenceExpression (io.prestosql.sql.tree.DereferenceExpression)5 Node (io.prestosql.sql.tree.Node)5 QualifiedName (io.prestosql.sql.tree.QualifiedName)5 Window (io.prestosql.sql.tree.Window)4 ArithmeticBinaryExpression (io.prestosql.sql.tree.ArithmeticBinaryExpression)3 ComparisonExpression (io.prestosql.sql.tree.ComparisonExpression)3 Identifier (io.prestosql.sql.tree.Identifier)3 LambdaExpression (io.prestosql.sql.tree.LambdaExpression)3 Limit (io.prestosql.sql.tree.Limit)3 LogicalBinaryExpression (io.prestosql.sql.tree.LogicalBinaryExpression)3 Offset (io.prestosql.sql.tree.Offset)3 SubqueryExpression (io.prestosql.sql.tree.SubqueryExpression)3 WithQuery (io.prestosql.sql.tree.WithQuery)3 ArithmeticUnaryExpression (io.prestosql.sql.tree.ArithmeticUnaryExpression)2