@Override protected Object visitBooleanLiteral(BooleanLiteral node, Object context) { return node.equals(BooleanLiteral.TRUE_LITERAL); }
private JoinEnumerationResult getJoinSource(LinkedHashSet<PlanNode> nodes, List<Symbol> outputSymbols) { if (nodes.size() == 1) { PlanNode planNode = getOnlyElement(nodes); ImmutableList.Builder<Expression> predicates = ImmutableList.builder(); predicates.addAll(allFilterInference.generateEqualitiesPartitionedBy(outputSymbols::contains).getScopeEqualities()); stream(nonInferrableConjuncts(allFilter)) .map(conjunct -> allFilterInference.rewriteExpression(conjunct, outputSymbols::contains)) .filter(Objects::nonNull) .forEach(predicates::add); Expression filter = combineConjuncts(predicates.build()); if (!TRUE_LITERAL.equals(filter)) { planNode = new FilterNode(idAllocator.getNextId(), planNode, filter); } return createJoinEnumerationResult(planNode); } return chooseJoinOrder(nodes, outputSymbols); }
@Override public PlanNode visitTableScan(TableScanNode node, RewriteContext<Expression> context) { Expression predicate = simplifyExpression(context.get()); if (!TRUE_LITERAL.equals(predicate)) { return new FilterNode(idAllocator.getNextId(), node, predicate); } return node; }
decomposedPredicate.getRemainingExpression()); if (!TRUE_LITERAL.equals(resultingPredicate)) { return new FilterNode(idAllocator.getNextId(), tableScan, resultingPredicate);
@Override protected Object visitBooleanLiteral(BooleanLiteral node, Object context) { return node.equals(BooleanLiteral.TRUE_LITERAL); }
@Override public PlanNode visitTableScan(TableScanNode node, RewriteContext<Expression> context) { Expression predicate = simplifyExpression(context.get()); if (!BooleanLiteral.TRUE_LITERAL.equals(predicate)) { return new FilterNode(idAllocator.getNextId(), node, predicate); } return node; } }
decomposedPredicate.getRemainingExpression()); if (!BooleanLiteral.TRUE_LITERAL.equals(resultingPredicate)) { return withDerivedProperties( new FilterNode(idAllocator.getNextId(), result.getNode(), resultingPredicate),
DomainTranslator.toPredicate(layout.getUnenforcedConstraint().transform(assignments::get))); if (!BooleanLiteral.TRUE_LITERAL.equals(resultingPredicate)) { return new FilterNode(idAllocator.getNextId(), result, resultingPredicate);