Search in sources :

Example 76 with Expression

use of com.facebook.presto.sql.tree.Expression in project presto by prestodb.

the class RelationPlanner method visitJoin.

@Override
protected RelationPlan visitJoin(Join node, Void context) {
    // TODO: translate the RIGHT join into a mirrored LEFT join when we refactor (@martint)
    RelationPlan leftPlan = process(node.getLeft(), context);
    // Convert CROSS JOIN UNNEST to an UnnestNode
    if (node.getRight() instanceof Unnest || (node.getRight() instanceof AliasedRelation && ((AliasedRelation) node.getRight()).getRelation() instanceof Unnest)) {
        Unnest unnest;
        if (node.getRight() instanceof AliasedRelation) {
            unnest = (Unnest) ((AliasedRelation) node.getRight()).getRelation();
        } else {
            unnest = (Unnest) node.getRight();
        }
        if (node.getType() != Join.Type.CROSS && node.getType() != Join.Type.IMPLICIT) {
            throw notSupportedException(unnest, "UNNEST on other than the right side of CROSS JOIN");
        }
        return planCrossJoinUnnest(leftPlan, node, unnest);
    }
    RelationPlan rightPlan = process(node.getRight(), context);
    PlanBuilder leftPlanBuilder = initializePlanBuilder(leftPlan);
    PlanBuilder rightPlanBuilder = initializePlanBuilder(rightPlan);
    // NOTE: symbols must be in the same order as the outputDescriptor
    List<Symbol> outputSymbols = ImmutableList.<Symbol>builder().addAll(leftPlan.getFieldMappings()).addAll(rightPlan.getFieldMappings()).build();
    ImmutableList.Builder<JoinNode.EquiJoinClause> equiClauses = ImmutableList.builder();
    List<Expression> complexJoinExpressions = new ArrayList<>();
    List<Expression> postInnerJoinConditions = new ArrayList<>();
    if (node.getType() != Join.Type.CROSS && node.getType() != Join.Type.IMPLICIT) {
        Expression criteria = analysis.getJoinCriteria(node);
        RelationType left = analysis.getOutputDescriptor(node.getLeft());
        RelationType right = analysis.getOutputDescriptor(node.getRight());
        List<Expression> leftComparisonExpressions = new ArrayList<>();
        List<Expression> rightComparisonExpressions = new ArrayList<>();
        List<ComparisonExpressionType> joinConditionComparisonTypes = new ArrayList<>();
        for (Expression conjunct : ExpressionUtils.extractConjuncts(criteria)) {
            conjunct = ExpressionUtils.normalize(conjunct);
            if (!isEqualComparisonExpression(conjunct) && node.getType() != INNER) {
                complexJoinExpressions.add(conjunct);
                continue;
            }
            Set<QualifiedName> dependencies = DependencyExtractor.extractNames(conjunct, analysis.getColumnReferences());
            boolean isJoinUsing = node.getCriteria().filter(JoinUsing.class::isInstance).isPresent();
            if (!isJoinUsing && (dependencies.stream().allMatch(left::canResolve) || dependencies.stream().allMatch(right::canResolve))) {
                // If the conjunct can be evaluated entirely with the inputs on either side of the join, add
                // it to the list complex expressions and let the optimizers figure out how to push it down later.
                // Due to legacy reasons, the expression for "join using" looks like "x = x", which (incorrectly)
                // appears to fit the condition we're after. So we skip them.
                complexJoinExpressions.add(conjunct);
            } else if (conjunct instanceof ComparisonExpression) {
                Expression firstExpression = ((ComparisonExpression) conjunct).getLeft();
                Expression secondExpression = ((ComparisonExpression) conjunct).getRight();
                ComparisonExpressionType comparisonType = ((ComparisonExpression) conjunct).getType();
                Set<QualifiedName> firstDependencies = DependencyExtractor.extractNames(firstExpression, analysis.getColumnReferences());
                Set<QualifiedName> secondDependencies = DependencyExtractor.extractNames(secondExpression, analysis.getColumnReferences());
                if (firstDependencies.stream().allMatch(left::canResolve) && secondDependencies.stream().allMatch(right::canResolve)) {
                    leftComparisonExpressions.add(firstExpression);
                    rightComparisonExpressions.add(secondExpression);
                    joinConditionComparisonTypes.add(comparisonType);
                } else if (firstDependencies.stream().allMatch(right::canResolve) && secondDependencies.stream().allMatch(left::canResolve)) {
                    leftComparisonExpressions.add(secondExpression);
                    rightComparisonExpressions.add(firstExpression);
                    joinConditionComparisonTypes.add(comparisonType.flip());
                } else {
                    // the case when we mix symbols from both left and right join side on either side of condition.
                    complexJoinExpressions.add(conjunct);
                }
            } else {
                complexJoinExpressions.add(conjunct);
            }
        }
        leftPlanBuilder = subqueryPlanner.handleSubqueries(leftPlanBuilder, leftComparisonExpressions, node);
        rightPlanBuilder = subqueryPlanner.handleSubqueries(rightPlanBuilder, rightComparisonExpressions, node);
        // Add projections for join criteria
        leftPlanBuilder = leftPlanBuilder.appendProjections(leftComparisonExpressions, symbolAllocator, idAllocator);
        rightPlanBuilder = rightPlanBuilder.appendProjections(rightComparisonExpressions, symbolAllocator, idAllocator);
        for (int i = 0; i < leftComparisonExpressions.size(); i++) {
            if (joinConditionComparisonTypes.get(i) == ComparisonExpressionType.EQUAL) {
                Symbol leftSymbol = leftPlanBuilder.translate(leftComparisonExpressions.get(i));
                Symbol rightSymbol = rightPlanBuilder.translate(rightComparisonExpressions.get(i));
                equiClauses.add(new JoinNode.EquiJoinClause(leftSymbol, rightSymbol));
            } else {
                Expression leftExpression = leftPlanBuilder.rewrite(leftComparisonExpressions.get(i));
                Expression rightExpression = rightPlanBuilder.rewrite(rightComparisonExpressions.get(i));
                postInnerJoinConditions.add(new ComparisonExpression(joinConditionComparisonTypes.get(i), leftExpression, rightExpression));
            }
        }
    }
    PlanNode root = new JoinNode(idAllocator.getNextId(), JoinNode.Type.typeConvert(node.getType()), leftPlanBuilder.getRoot(), rightPlanBuilder.getRoot(), equiClauses.build(), ImmutableList.<Symbol>builder().addAll(leftPlanBuilder.getRoot().getOutputSymbols()).addAll(rightPlanBuilder.getRoot().getOutputSymbols()).build(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    if (node.getType() != INNER) {
        for (Expression complexExpression : complexJoinExpressions) {
            Set<InPredicate> inPredicates = subqueryPlanner.collectInPredicateSubqueries(complexExpression, node);
            if (!inPredicates.isEmpty()) {
                InPredicate inPredicate = Iterables.getLast(inPredicates);
                throw notSupportedException(inPredicate, "IN with subquery predicate in join condition");
            }
        }
        // subqueries can be applied only to one side of join - left side is selected in arbitrary way
        leftPlanBuilder = subqueryPlanner.handleUncorrelatedSubqueries(leftPlanBuilder, complexJoinExpressions, node);
    }
    RelationPlan intermediateRootRelationPlan = new RelationPlan(root, analysis.getScope(node), outputSymbols);
    TranslationMap translationMap = new TranslationMap(intermediateRootRelationPlan, analysis, lambdaDeclarationToSymbolMap);
    translationMap.setFieldMappings(outputSymbols);
    translationMap.putExpressionMappingsFrom(leftPlanBuilder.getTranslations());
    translationMap.putExpressionMappingsFrom(rightPlanBuilder.getTranslations());
    if (node.getType() != INNER && !complexJoinExpressions.isEmpty()) {
        Expression joinedFilterCondition = ExpressionUtils.and(complexJoinExpressions);
        joinedFilterCondition = ExpressionTreeRewriter.rewriteWith(new ParameterRewriter(analysis.getParameters(), analysis), joinedFilterCondition);
        Expression rewrittenFilterCondition = translationMap.rewrite(joinedFilterCondition);
        root = new JoinNode(idAllocator.getNextId(), JoinNode.Type.typeConvert(node.getType()), leftPlanBuilder.getRoot(), rightPlanBuilder.getRoot(), equiClauses.build(), ImmutableList.<Symbol>builder().addAll(leftPlanBuilder.getRoot().getOutputSymbols()).addAll(rightPlanBuilder.getRoot().getOutputSymbols()).build(), Optional.of(rewrittenFilterCondition), Optional.empty(), Optional.empty(), Optional.empty());
    }
    if (node.getType() == INNER) {
        // rewrite all the other conditions using output symbols from left + right plan node.
        PlanBuilder rootPlanBuilder = new PlanBuilder(translationMap, root, analysis.getParameters());
        rootPlanBuilder = subqueryPlanner.handleSubqueries(rootPlanBuilder, complexJoinExpressions, node);
        for (Expression expression : complexJoinExpressions) {
            expression = ExpressionTreeRewriter.rewriteWith(new ParameterRewriter(analysis.getParameters(), analysis), expression);
            postInnerJoinConditions.add(rootPlanBuilder.rewrite(expression));
        }
        root = rootPlanBuilder.getRoot();
        Expression postInnerJoinCriteria;
        if (!postInnerJoinConditions.isEmpty()) {
            postInnerJoinCriteria = ExpressionUtils.and(postInnerJoinConditions);
            root = new FilterNode(idAllocator.getNextId(), root, postInnerJoinCriteria);
        }
    }
    return new RelationPlan(root, analysis.getScope(node), outputSymbols);
}
Also used : Set(java.util.Set) ImmutableCollectors.toImmutableList(com.facebook.presto.util.ImmutableCollectors.toImmutableList) ImmutableList(com.google.common.collect.ImmutableList) FilterNode(com.facebook.presto.sql.planner.plan.FilterNode) ArrayList(java.util.ArrayList) PlanNode(com.facebook.presto.sql.planner.plan.PlanNode) RelationType(com.facebook.presto.sql.analyzer.RelationType) Unnest(com.facebook.presto.sql.tree.Unnest) JoinNode(com.facebook.presto.sql.planner.plan.JoinNode) QualifiedName(com.facebook.presto.sql.tree.QualifiedName) ComparisonExpressionType(com.facebook.presto.sql.tree.ComparisonExpressionType) InPredicate(com.facebook.presto.sql.tree.InPredicate) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) ExpressionInterpreter.evaluateConstantExpression(com.facebook.presto.sql.planner.ExpressionInterpreter.evaluateConstantExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) Expression(com.facebook.presto.sql.tree.Expression) CoalesceExpression(com.facebook.presto.sql.tree.CoalesceExpression) AliasedRelation(com.facebook.presto.sql.tree.AliasedRelation)

Example 77 with Expression

use of com.facebook.presto.sql.tree.Expression in project presto by prestodb.

the class PlanBuilder method appendProjections.

public PlanBuilder appendProjections(Iterable<Expression> expressions, SymbolAllocator symbolAllocator, PlanNodeIdAllocator idAllocator) {
    TranslationMap translations = copyTranslations();
    Assignments.Builder projections = Assignments.builder();
    // add an identity projection for underlying plan
    for (Symbol symbol : getRoot().getOutputSymbols()) {
        projections.put(symbol, symbol.toSymbolReference());
    }
    ImmutableMap.Builder<Symbol, Expression> newTranslations = ImmutableMap.builder();
    ParameterRewriter parameterRewriter = new ParameterRewriter(parameters, getAnalysis());
    for (Expression expression : expressions) {
        Expression rewritten = ExpressionTreeRewriter.rewriteWith(parameterRewriter, expression);
        translations.addIntermediateMapping(expression, rewritten);
        Symbol symbol = symbolAllocator.newSymbol(rewritten, getAnalysis().getTypeWithCoercions(expression));
        projections.put(symbol, translations.rewrite(rewritten));
        newTranslations.put(symbol, rewritten);
    }
    // Now append the new translations into the TranslationMap
    for (Map.Entry<Symbol, Expression> entry : newTranslations.build().entrySet()) {
        translations.put(entry.getValue(), entry.getKey());
    }
    return new PlanBuilder(translations, new ProjectNode(idAllocator.getNextId(), getRoot(), projections.build()), parameters);
}
Also used : Expression(com.facebook.presto.sql.tree.Expression) Assignments(com.facebook.presto.sql.planner.plan.Assignments) ProjectNode(com.facebook.presto.sql.planner.plan.ProjectNode) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap)

Example 78 with Expression

use of com.facebook.presto.sql.tree.Expression in project presto by prestodb.

the class QueryPlanner method explicitCoercionFields.

private PlanBuilder explicitCoercionFields(PlanBuilder subPlan, Iterable<Expression> alreadyCoerced, Iterable<? extends Expression> uncoerced) {
    TranslationMap translations = new TranslationMap(subPlan.getRelationPlan(), analysis, lambdaDeclarationToSymbolMap);
    Assignments.Builder projections = Assignments.builder();
    projections.putAll(coerce(uncoerced, subPlan, translations));
    for (Expression expression : alreadyCoerced) {
        Symbol symbol = symbolAllocator.newSymbol(expression, analysis.getType(expression));
        Expression parametersReplaced = ExpressionTreeRewriter.rewriteWith(new ParameterRewriter(analysis.getParameters(), analysis), expression);
        translations.addIntermediateMapping(expression, parametersReplaced);
        Expression rewritten = subPlan.rewrite(expression);
        projections.put(symbol, rewritten);
        translations.put(parametersReplaced, symbol);
    }
    return new PlanBuilder(translations, new ProjectNode(idAllocator.getNextId(), subPlan.getRoot(), projections.build()), analysis.getParameters());
}
Also used : Expression(com.facebook.presto.sql.tree.Expression) Assignments(com.facebook.presto.sql.planner.plan.Assignments) ProjectNode(com.facebook.presto.sql.planner.plan.ProjectNode)

Example 79 with Expression

use of com.facebook.presto.sql.tree.Expression in project presto by prestodb.

the class DomainTranslator method extractDisjuncts.

private static List<Expression> extractDisjuncts(Type type, Ranges ranges, SymbolReference reference) {
    List<Expression> disjuncts = new ArrayList<>();
    List<Expression> singleValues = new ArrayList<>();
    List<Range> orderedRanges = ranges.getOrderedRanges();
    SortedRangeSet sortedRangeSet = SortedRangeSet.copyOf(type, orderedRanges);
    SortedRangeSet complement = sortedRangeSet.complement();
    List<Range> singleValueExclusionsList = complement.getOrderedRanges().stream().filter(Range::isSingleValue).collect(toList());
    List<Range> originalUnionSingleValues = SortedRangeSet.copyOf(type, singleValueExclusionsList).union(sortedRangeSet).getOrderedRanges();
    PeekingIterator<Range> singleValueExclusions = peekingIterator(singleValueExclusionsList.iterator());
    for (Range range : originalUnionSingleValues) {
        if (range.isSingleValue()) {
            singleValues.add(toExpression(range.getSingleValue(), type));
            continue;
        }
        // attempt to optimize ranges that can be coalesced as long as single value points are excluded
        List<Expression> singleValuesInRange = new ArrayList<>();
        while (singleValueExclusions.hasNext() && range.contains(singleValueExclusions.peek())) {
            singleValuesInRange.add(toExpression(singleValueExclusions.next().getSingleValue(), type));
        }
        if (!singleValuesInRange.isEmpty()) {
            disjuncts.add(combineRangeWithExcludedPoints(type, reference, range, singleValuesInRange));
            continue;
        }
        disjuncts.add(processRange(type, range, reference));
    }
    // Add back all of the possible single values either as an equality or an IN predicate
    if (singleValues.size() == 1) {
        disjuncts.add(new ComparisonExpression(EQUAL, reference, getOnlyElement(singleValues)));
    } else if (singleValues.size() > 1) {
        disjuncts.add(new InPredicate(reference, new InListExpression(singleValues)));
    }
    return disjuncts;
}
Also used : ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) SortedRangeSet(com.facebook.presto.spi.predicate.SortedRangeSet) NotExpression(com.facebook.presto.sql.tree.NotExpression) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) InListExpression(com.facebook.presto.sql.tree.InListExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) LiteralInterpreter.toExpression(com.facebook.presto.sql.planner.LiteralInterpreter.toExpression) Expression(com.facebook.presto.sql.tree.Expression) ArrayList(java.util.ArrayList) InListExpression(com.facebook.presto.sql.tree.InListExpression) Range(com.facebook.presto.spi.predicate.Range) InPredicate(com.facebook.presto.sql.tree.InPredicate)

Example 80 with Expression

use of com.facebook.presto.sql.tree.Expression in project presto by prestodb.

the class DomainTranslator method toPredicate.

private static Expression toPredicate(Domain domain, SymbolReference reference) {
    if (domain.getValues().isNone()) {
        return domain.isNullAllowed() ? new IsNullPredicate(reference) : FALSE_LITERAL;
    }
    if (domain.getValues().isAll()) {
        return domain.isNullAllowed() ? TRUE_LITERAL : new NotExpression(new IsNullPredicate(reference));
    }
    List<Expression> disjuncts = new ArrayList<>();
    disjuncts.addAll(domain.getValues().getValuesProcessor().transform(ranges -> extractDisjuncts(domain.getType(), ranges, reference), discreteValues -> extractDisjuncts(domain.getType(), discreteValues, reference), allOrNone -> {
        throw new IllegalStateException("Case should not be reachable");
    }));
    // Add nullability disjuncts
    if (domain.isNullAllowed()) {
        disjuncts.add(new IsNullPredicate(reference));
    }
    return combineDisjunctsWithDefault(disjuncts, TRUE_LITERAL);
}
Also used : ComparisonExpressionType(com.facebook.presto.sql.tree.ComparisonExpressionType) Block(com.facebook.presto.spi.block.Block) GREATER_THAN(com.facebook.presto.sql.tree.ComparisonExpressionType.GREATER_THAN) GREATER_THAN_OR_EQUAL(com.facebook.presto.sql.tree.ComparisonExpressionType.GREATER_THAN_OR_EQUAL) IsNullPredicate(com.facebook.presto.sql.tree.IsNullPredicate) PeekingIterator(com.google.common.collect.PeekingIterator) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Map(java.util.Map) NullableValue(com.facebook.presto.spi.predicate.NullableValue) BetweenPredicate(com.facebook.presto.sql.tree.BetweenPredicate) NotExpression(com.facebook.presto.sql.tree.NotExpression) EQUAL(com.facebook.presto.sql.tree.ComparisonExpressionType.EQUAL) SymbolReference(com.facebook.presto.sql.tree.SymbolReference) ImmutableMap(com.google.common.collect.ImmutableMap) Collections.emptyList(java.util.Collections.emptyList) SortedRangeSet(com.facebook.presto.spi.predicate.SortedRangeSet) Marker(com.facebook.presto.spi.predicate.Marker) SqlParser(com.facebook.presto.sql.parser.SqlParser) Preconditions.checkState(com.google.common.base.Preconditions.checkState) TRUE_LITERAL(com.facebook.presto.sql.tree.BooleanLiteral.TRUE_LITERAL) LESS_THAN(com.facebook.presto.sql.tree.ComparisonExpressionType.LESS_THAN) TupleDomain(com.facebook.presto.spi.predicate.TupleDomain) BooleanLiteral(com.facebook.presto.sql.tree.BooleanLiteral) NullLiteral(com.facebook.presto.sql.tree.NullLiteral) ExpressionUtils.combineDisjunctsWithDefault(com.facebook.presto.sql.ExpressionUtils.combineDisjunctsWithDefault) Domain(com.facebook.presto.spi.predicate.Domain) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) List(java.util.List) Utils(com.facebook.presto.spi.predicate.Utils) InPredicate(com.facebook.presto.sql.tree.InPredicate) Optional(java.util.Optional) Ranges(com.facebook.presto.spi.predicate.Ranges) ExpressionUtils.combineConjuncts(com.facebook.presto.sql.ExpressionUtils.combineConjuncts) ExpressionUtils.and(com.facebook.presto.sql.ExpressionUtils.and) ArrayList(java.util.ArrayList) InListExpression(com.facebook.presto.sql.tree.InListExpression) ImmutableList(com.google.common.collect.ImmutableList) ValueSet(com.facebook.presto.spi.predicate.ValueSet) Type(com.facebook.presto.spi.type.Type) Objects.requireNonNull(java.util.Objects.requireNonNull) Cast(com.facebook.presto.sql.tree.Cast) Iterators.peekingIterator(com.google.common.collect.Iterators.peekingIterator) Nullable(javax.annotation.Nullable) ExpressionUtils.or(com.facebook.presto.sql.ExpressionUtils.or) FALSE_LITERAL(com.facebook.presto.sql.tree.BooleanLiteral.FALSE_LITERAL) Session(com.facebook.presto.Session) Signature(com.facebook.presto.metadata.Signature) AstVisitor(com.facebook.presto.sql.tree.AstVisitor) Signature.internalOperator(com.facebook.presto.metadata.Signature.internalOperator) Iterables.getOnlyElement(com.google.common.collect.Iterables.getOnlyElement) IsNotNullPredicate(com.facebook.presto.sql.tree.IsNotNullPredicate) SATURATED_FLOOR_CAST(com.facebook.presto.spi.function.OperatorType.SATURATED_FLOOR_CAST) DiscreteValues(com.facebook.presto.spi.predicate.DiscreteValues) Range(com.facebook.presto.spi.predicate.Range) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) LiteralInterpreter.toExpression(com.facebook.presto.sql.planner.LiteralInterpreter.toExpression) LESS_THAN_OR_EQUAL(com.facebook.presto.sql.tree.ComparisonExpressionType.LESS_THAN_OR_EQUAL) NOT_EQUAL(com.facebook.presto.sql.tree.ComparisonExpressionType.NOT_EQUAL) Collectors.toList(java.util.stream.Collectors.toList) ExpressionAnalyzer(com.facebook.presto.sql.analyzer.ExpressionAnalyzer) Expression(com.facebook.presto.sql.tree.Expression) FunctionInvoker(com.facebook.presto.sql.FunctionInvoker) IdentityLinkedHashMap(com.facebook.presto.util.maps.IdentityLinkedHashMap) Metadata(com.facebook.presto.metadata.Metadata) NotExpression(com.facebook.presto.sql.tree.NotExpression) LogicalBinaryExpression(com.facebook.presto.sql.tree.LogicalBinaryExpression) InListExpression(com.facebook.presto.sql.tree.InListExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) LiteralInterpreter.toExpression(com.facebook.presto.sql.planner.LiteralInterpreter.toExpression) Expression(com.facebook.presto.sql.tree.Expression) ArrayList(java.util.ArrayList) IsNullPredicate(com.facebook.presto.sql.tree.IsNullPredicate) NotExpression(com.facebook.presto.sql.tree.NotExpression)

Aggregations

Expression (com.facebook.presto.sql.tree.Expression)137 ComparisonExpression (com.facebook.presto.sql.tree.ComparisonExpression)74 Test (org.testng.annotations.Test)46 NotExpression (com.facebook.presto.sql.tree.NotExpression)42 InListExpression (com.facebook.presto.sql.tree.InListExpression)40 DereferenceExpression (com.facebook.presto.sql.tree.DereferenceExpression)33 Type (com.facebook.presto.spi.type.Type)26 PlanNode (com.facebook.presto.sql.planner.plan.PlanNode)26 LiteralInterpreter.toExpression (com.facebook.presto.sql.planner.LiteralInterpreter.toExpression)25 LogicalBinaryExpression (com.facebook.presto.sql.tree.LogicalBinaryExpression)22 ImmutableList (com.google.common.collect.ImmutableList)22 LambdaExpression (com.facebook.presto.sql.tree.LambdaExpression)19 ArithmeticBinaryExpression (com.facebook.presto.sql.tree.ArithmeticBinaryExpression)18 Cast (com.facebook.presto.sql.tree.Cast)17 ArrayList (java.util.ArrayList)17 ExtractionResult (com.facebook.presto.sql.planner.DomainTranslator.ExtractionResult)16 CoalesceExpression (com.facebook.presto.sql.tree.CoalesceExpression)16 SubqueryExpression (com.facebook.presto.sql.tree.SubqueryExpression)16 SubscriptExpression (com.facebook.presto.sql.tree.SubscriptExpression)16 QuantifiedComparisonExpression (com.facebook.presto.sql.tree.QuantifiedComparisonExpression)15