@Override protected String visitIsNullPredicate(IsNullPredicate node, Void context) { return "(" + process(node.getValue(), context) + " IS NULL)"; }
@Override protected Boolean visitIsNullPredicate(IsNullPredicate node, Void context) { return process(node.getValue(), context); }
@Override protected R visitIsNullPredicate(IsNullPredicate node, C context) { return process(node.getValue(), context); }
@Override protected Type visitIsNullPredicate(IsNullPredicate node, StackableAstVisitorContext<Context> context) { process(node.getValue(), context); return setExpressionType(node, BOOLEAN); }
@Override protected ExtractionResult visitIsNullPredicate(IsNullPredicate node, Boolean complement) { if (!(node.getValue() instanceof SymbolReference)) { return super.visitIsNullPredicate(node, complement); } Symbol symbol = Symbol.from(node.getValue()); Type columnType = checkedTypeLookup(symbol); Domain domain = complementIfNecessary(Domain.onlyNull(columnType), complement); return new ExtractionResult( TupleDomain.withColumnDomains(ImmutableMap.of(symbol, domain)), TRUE_LITERAL); }
@Override protected RowExpression visitIsNullPredicate(IsNullPredicate node, Void context) { RowExpression expression = process(node.getValue(), context); return call(Signatures.isNullSignature(expression.getType()), BOOLEAN, expression); }
@Override protected PlanNodeStatsEstimate visitNotExpression(NotExpression node, Void context) { if (node.getValue() instanceof IsNullPredicate) { return process(new IsNotNullPredicate(((IsNullPredicate) node.getValue()).getValue())); } return subtractSubsetStats(input, process(node.getValue())); }
@Override protected PlanNodeStatsEstimate visitIsNullPredicate(IsNullPredicate node, Void context) { if (node.getValue() instanceof SymbolReference) { Symbol symbol = Symbol.from(node.getValue()); SymbolStatsEstimate symbolStats = input.getSymbolStatistics(symbol); PlanNodeStatsEstimate.Builder result = PlanNodeStatsEstimate.buildFrom(input); result.setOutputRowCount(input.getOutputRowCount() * symbolStats.getNullsFraction()); result.addSymbolStatistics(symbol, SymbolStatsEstimate.builder() .setNullsFraction(1.0) .setLowValue(NaN) .setHighValue(NaN) .setDistinctValuesCount(0.0) .build()); return result.build(); } return PlanNodeStatsEstimate.unknown(); }
@Override protected String visitIsNullPredicate(IsNullPredicate node, Boolean unmangleNames) { if (!(node.getValue() instanceof Identifier)) { throw new IllegalArgumentException("inlined expressions are not supported"); } return format("attribute_not_exists(%s)", process(node.getValue(), unmangleNames)); }
@Override protected String visitIsNullPredicate(IsNullPredicate node, Void context) { return "(" + process(node.getValue(), context) + " IS NULL)"; }
@Override protected String visitIsNullPredicate(IsNullPredicate node, Boolean context) { return process(node.getValue(), context) + " == null"; }
@Override protected R visitIsNullPredicate(IsNullPredicate node, C context) { return process(node.getValue(), context); }
@Override protected String visitIsNullPredicate(IsNullPredicate node, Void context) { return "(" + process(node.getValue(), context) + " IS NULL)"; }
@Override protected Type visitIsNullPredicate(IsNullPredicate node, StackableAstVisitorContext<AnalysisContext> context) { process(node.getValue(), context); expressionTypes.put(node, BOOLEAN); return BOOLEAN; }
@Override protected String visitIsNullPredicate(IsNullPredicate node, Boolean unmangleNames) { return "(" + process(node.getValue(), unmangleNames) + " IS NULL)"; }
@Override protected RowExpression visitIsNullPredicate(IsNullPredicate node, Void context) { RowExpression expression = process(node.getValue(), context); return call(Signatures.isNullSignature(expression.getType()), BOOLEAN, expression); }