@Override protected String visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return "(" + process(node.getValue(), context) + " IS NOT NULL)"; }
@Override protected Boolean visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return process(node.getValue(), context); }
@Override protected Boolean visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return process(node.getValue(), context); }
@Override protected R visitIsNotNullPredicate(IsNotNullPredicate node, C context) { return process(node.getValue(), context); }
@Override protected String visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return "(" + process(node.getValue(), context) + " IS NOT NULL)"; }
@Override protected R visitIsNotNullPredicate(IsNotNullPredicate node, C context) { return process(node.getValue(), context); }
@Override protected Boolean visitIsNotNullPredicate(IsNotNullPredicate actual, Node expectedExpression) { if (!(expectedExpression instanceof IsNotNullPredicate)) { return false; } IsNotNullPredicate expected = (IsNotNullPredicate) expectedExpression; return process(actual.getValue(), expected.getValue()); }
@Override protected Boolean visitIsNotNullPredicate(IsNotNullPredicate actual, Node expectedExpression) { if (!(expectedExpression instanceof IsNotNullPredicate)) { return false; } IsNotNullPredicate expected = (IsNotNullPredicate) expectedExpression; return process(actual.getValue(), expected.getValue()); }
@Override protected Type visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<Context> context) { process(node.getValue(), context); return setExpressionType(node, BOOLEAN); }
@Override protected Type visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<Context> context) { process(node.getValue(), context); return setExpressionType(node, BOOLEAN); }
@Override protected ExtractionResult visitIsNotNullPredicate(IsNotNullPredicate node, Boolean complement) { if (!(node.getValue() instanceof SymbolReference)) { return super.visitIsNotNullPredicate(node, complement); } Symbol symbol = Symbol.from(node.getValue()); Type columnType = checkedTypeLookup(symbol); Domain domain = complementIfNecessary(Domain.notNull(columnType), complement); return new ExtractionResult( TupleDomain.withColumnDomains(ImmutableMap.of(symbol, domain)), TRUE_LITERAL); }
@Override protected ExtractionResult visitIsNotNullPredicate(IsNotNullPredicate node, Boolean complement) { if (!(node.getValue() instanceof SymbolReference)) { return super.visitIsNotNullPredicate(node, complement); } Symbol symbol = Symbol.from(node.getValue()); Type columnType = checkedTypeLookup(symbol); Domain domain = complementIfNecessary(Domain.notNull(columnType), complement); return new ExtractionResult( TupleDomain.withColumnDomains(ImmutableMap.of(symbol, domain)), TRUE_LITERAL); }
@Override public Expression rewriteIsNotNullPredicate(IsNotNullPredicate node, Void context, ExpressionTreeRewriter<Void> treeRewriter) { Expression value = treeRewriter.rewrite(node.getValue(), context); return new NotExpression(new IsNullPredicate(value)); }
@Override public Expression rewriteIsNotNullPredicate(IsNotNullPredicate node, Void context, ExpressionTreeRewriter<Void> treeRewriter) { Expression value = treeRewriter.rewrite(node.getValue(), context); return new NotExpression(new IsNullPredicate(value)); }
@Override protected RowExpression visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { RowExpression expression = process(node.getValue(), context); return call( Signatures.notSignature(), BOOLEAN, call(Signatures.isNullSignature(expression.getType()), BOOLEAN, ImmutableList.of(expression))); }
@Override protected RowExpression visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { RowExpression expression = process(node.getValue(), context); return call( Signatures.notSignature(), BOOLEAN, call(Signatures.isNullSignature(expression.getType()), BOOLEAN, ImmutableList.of(expression))); }
@Override protected PlanNodeStatsEstimate visitIsNotNullPredicate(IsNotNullPredicate 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() * (1 - symbolStats.getNullsFraction())); result.addSymbolStatistics(symbol, symbolStats.mapNullsFraction(x -> 0.0)); return result.build(); } return PlanNodeStatsEstimate.unknown(); }
@Override protected PlanNodeStatsEstimate visitIsNotNullPredicate(IsNotNullPredicate 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() * (1 - symbolStats.getNullsFraction())); result.addSymbolStatistics(symbol, symbolStats.mapNullsFraction(x -> 0.0)); return result.build(); } return PlanNodeStatsEstimate.unknown(); }