Java 类com.facebook.presto.sql.tree.IsNotNullPredicate 实例源码

项目:presto    文件:SqlToRowExpressionTranslator.java   
@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)));
}
项目:presto    文件:ExpressionInterpreter.java   
@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;
}
项目:presto    文件:DomainTranslator.java   
@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);
}
项目:presto    文件:ExpressionAnalyzer.java   
@Override
protected Type visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<AnalysisContext> context)
{
    process(node.getValue(), context);

    expressionTypes.put(node, BOOLEAN);
    return BOOLEAN;
}
项目:presto    文件:AstBuilder.java   
@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);
}
项目:hue    文件:VeroGenExpFormatter.java   
@Override
protected String visitIsNotNullPredicate(IsNotNullPredicate node, Void context)
{
    return "(" + process(node.getValue(), null) + " IS NOT NULL)";
}
项目:presto-query-formatter    文件:ExpressionFormatter.java   
@Override
protected String visitIsNotNullPredicate(IsNotNullPredicate node, StackableAstVisitorContext<Integer> indent)
{
    return "(" + process(node.getValue(), indent) + " IS NOT NULL)";
}
项目:presto    文件:CanonicalizeExpressions.java   
@Override
public Expression rewriteIsNotNullPredicate(IsNotNullPredicate node, Void context, ExpressionTreeRewriter<Void> treeRewriter)
{
    Expression value = treeRewriter.rewrite(node.getValue(), context);
    return new NotExpression(new IsNullPredicate(value));
}
项目:presto    文件:AggregationAnalyzer.java   
@Override
protected Boolean visitIsNotNullPredicate(IsNotNullPredicate node, Void context)
{
    return process(node.getValue(), context);
}
项目:presto    文件:ExpressionFormatter.java   
@Override
protected String visitIsNotNullPredicate(IsNotNullPredicate node, Boolean unmangleNames)
{
    return "(" + process(node.getValue(), unmangleNames) + " IS NOT NULL)";
}
项目:EchoQuery    文件:ExpressionFormatter.java   
@Override
protected String visitIsNotNullPredicate(IsNotNullPredicate node, Boolean unmangleNames)
{
    return "(" + process(node.getValue(), unmangleNames) + " IS NOT NULL)";
}