Package org.apache.phoenix.expression

Examples of org.apache.phoenix.expression.LikeExpression


                    rhs = LiteralExpression.newConstant(rhsLiteral, PDataType.CHAR, rhs.isDeterministic());
                    return new ComparisonExpression(op, Arrays.asList(lhs,rhs));
                }
            }
        }
        Expression expression = new LikeExpression(children);
        if (ExpressionUtil.isConstant(expression)) {
            ImmutableBytesWritable ptr = context.getTempPtr();
            if (!expression.evaluate(null, ptr)) {
                return LiteralExpression.newConstant(null, expression.isDeterministic());
            } else {
                return LiteralExpression.newConstant(Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(ptr)) ^ node.isNegate(), expression.isDeterministic());
            }
        }
        if (node.isNegate()) {
            expression = new NotExpression(expression);
        }
View Full Code Here


    public static Expression constantComparison(CompareOp op, Expression e, Object o) {
        return  new ComparisonExpression(op, Arrays.asList(e, LiteralExpression.newConstant(o)));
    }

    public static Expression like(Expression e, Object o) {
        return  new LikeExpression(Arrays.asList(e, LiteralExpression.newConstant(o)));
    }
View Full Code Here

                    rhs = LiteralExpression.newConstant(rhsLiteral, PDataType.CHAR);
                    return new ComparisonExpression(op, Arrays.asList(lhs,rhs));
                }
            }
        }
        Expression expression = new LikeExpression(children);
        if (node.isConstant()) {
            ImmutableBytesWritable ptr = context.getTempPtr();
            if (!expression.evaluate(null, ptr)) {
                return LiteralExpression.NULL_EXPRESSION;
            } else {
                return LiteralExpression.newConstant(Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(ptr)) ^ node.isNegate());
            }
        }
View Full Code Here

    public static Expression constantComparison(CompareOp op, Expression e, Object o) {
        return  new ComparisonExpression(op, Arrays.asList(e, LiteralExpression.newConstant(o)));
    }

    public static Expression like(Expression e, Object o) {
        return  new LikeExpression(Arrays.asList(e, LiteralExpression.newConstant(o)));
    }
View Full Code Here

    public static Expression constantComparison(CompareOp op, Expression e, Object o) {
        return  new ComparisonExpression(op, Arrays.asList(e, LiteralExpression.newConstant(o)));
    }

    public static Expression like(Expression e, Object o) {
        return  new LikeExpression(Arrays.asList(e, LiteralExpression.newConstant(o)));
    }
View Full Code Here

                    rhs = LiteralExpression.newConstant(rhsLiteral, PDataType.CHAR, rhs.isDeterministic());
                    return new ComparisonExpression(op, Arrays.asList(lhs,rhs));
                }
            }
        }
        Expression expression = new LikeExpression(children);
        if (ExpressionUtil.isConstant(expression)) {
            ImmutableBytesWritable ptr = context.getTempPtr();
            if (!expression.evaluate(null, ptr)) {
                return LiteralExpression.newConstant(null, expression.isDeterministic());
            } else {
                return LiteralExpression.newConstant(Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(ptr)) ^ node.isNegate(), expression.isDeterministic());
            }
        }
        if (node.isNegate()) {
            expression = new NotExpression(expression);
        }
View Full Code Here

    public static Expression constantComparison(CompareOp op, Expression e, Object o) {
        return  new ComparisonExpression(op, Arrays.asList(e, LiteralExpression.newConstant(o)));
    }

    public static Expression like(Expression e, Object o) {
        return  new LikeExpression(Arrays.asList(e, LiteralExpression.newConstant(o)));
    }
View Full Code Here

                    rhs = LiteralExpression.newConstant(rhsLiteral, PDataType.CHAR, rhs.isDeterministic());
                    return new ComparisonExpression(op, Arrays.asList(lhs,rhs));
                }
            }
        }
        Expression expression = new LikeExpression(children);
        if (node.isStateless()) {
            ImmutableBytesWritable ptr = context.getTempPtr();
            if (!expression.evaluate(null, ptr)) {
                return LiteralExpression.newConstant(null, expression.isDeterministic());
            } else {
                return LiteralExpression.newConstant(Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(ptr)) ^ node.isNegate(), expression.isDeterministic());
            }
        }
        if (node.isNegate()) {
            expression = new NotExpression(expression);
        }
View Full Code Here

TOP

Related Classes of org.apache.phoenix.expression.LikeExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.