Package com.salesforce.phoenix.expression

Examples of com.salesforce.phoenix.expression.Expression.evaluate()


            .setTableName(sequence.getSequenceName().getTableName()).build().buildException();
        }
        final long startsWith = (Long)PDataType.LONG.toObject(ptr, startsWithExpr.getDataType());

        Expression incrementByExpr = incrementByNode.accept(expressionCompiler);
        incrementByExpr.evaluate(null, ptr);
        if (ptr.getLength() == 0 || !incrementByExpr.getDataType().isCoercibleTo(PDataType.LONG)) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.INCREMENT_BY_MUST_BE_CONSTANT)
            .setSchemaName(sequence.getSequenceName().getSchemaName())
            .setTableName(sequence.getSequenceName().getTableName()).build().buildException();
        }
View Full Code Here


        final long incrementBy = (Long)PDataType.LONG.toObject(ptr, incrementByExpr.getDataType());
       
        int cacheSizeValue = connection.getQueryServices().getProps().getInt(QueryServices.SEQUENCE_CACHE_SIZE_ATTRIB,QueryServicesOptions.DEFAULT_SEQUENCE_CACHE_SIZE);
        if (cacheNode != null) {
            Expression cacheSizeExpr = cacheNode.accept(expressionCompiler);
            cacheSizeExpr.evaluate(null, ptr);
            if (ptr.getLength() != 0 && (!cacheSizeExpr.getDataType().isCoercibleTo(PDataType.INTEGER) || (cacheSizeValue = (Integer)PDataType.INTEGER.toObject(ptr)) < 0)) {
                throw new SQLExceptionInfo.Builder(SQLExceptionCode.CACHE_MUST_BE_NON_NEGATIVE_CONSTANT)
                .setSchemaName(sequence.getSequenceName().getSchemaName())
                .setTableName(sequence.getSequenceName().getTableName()).build().buildException();
            }
View Full Code Here

        ImmutableBytesWritable ptr = context.getTempPtr();
        for (int i = 0; i < splits.length; i++) {
            ParseNode node = splitNodes.get(i);
            if (node.isStateless()) {
                Expression expression = node.accept(expressionCompiler);
                if (expression.evaluate(null, ptr)) {;
                    splits[i] = ByteUtil.copyKeyBytesIfNecessary(ptr);
                    continue;
                }
            }
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.SPLIT_POINT_NOT_CONSTANT)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.