@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 Object visitIsNotNullPredicate(IsNotNullPredicate node, Object context) { Object value = process(node.getValue(), context); if (value instanceof Expression) { return new IsNotNullPredicate(toExpression(value, expressionTypes.get(node.getValue()))); } return value != null; }
@Override protected ExtractionResult visitIsNotNullPredicate(IsNotNullPredicate node, Boolean complement) { if (!(node.getValue() instanceof QualifiedNameReference)) { return super.visitIsNotNullPredicate(node, complement); } Symbol symbol = Symbol.fromQualifiedName(((QualifiedNameReference) node.getValue()).getName()); Type columnType = checkedTypeLookup(symbol); Domain domain = complementIfNecessary(Domain.notNull(columnType), complement); return new ExtractionResult( TupleDomain.withColumnDomains(ImmutableMap.of(symbol, domain)), TRUE_LITERAL); }
@Override protected Type visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<AnalysisContext> context) { process(node.getValue(), context); expressionTypes.put(node, BOOLEAN); return BOOLEAN; }
@Override public Node visitNullPredicate(SqlBaseParser.NullPredicateContext context) { Expression child = (Expression) visit(context.value); if (context.NOT() == null) { return new IsNullPredicate(getLocation(context), child); } return new IsNotNullPredicate(getLocation(context), child); }
@Override protected String visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return "(" + process(node.getValue(), null) + " IS NOT NULL)"; }
@Override protected String visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<Integer> indent) { return "(" + process(node.getValue(), indent) + " IS NOT NULL)"; }
@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 Boolean visitIsNotNullPredicate(IsNotNullPredicate node, Void context) { return process(node.getValue(), context); }
@Override protected String visitIsNotNullPredicate(IsNotNullPredicate node, Boolean unmangleNames) { return "(" + process(node.getValue(), unmangleNames) + " IS NOT NULL)"; }