Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.IndexOperator


                        if (value == null)
                            throw new InvalidRequestException(String.format("Unsupported null value for indexed column %s", name));
                        if (value.remaining() > 0xFFFF)
                            throw new InvalidRequestException("Index expression values may not be larger than 64K");

                        IndexOperator op = slice.getIndexOperator(b);
                        // If the underlying comparator for name is reversed, we need to reverse the IndexOperator: user operation
                        // always refer to the "forward" sorting even if the clustering order is reversed, but the 2ndary code does
                        // use the underlying comparator as is.
                        if (name.type instanceof ReversedType)
                            op = reverse(op);
View Full Code Here


                {
                    if (slice.hasBound(b))
                    {
                        ByteBuffer value = slice.bound(b, variables);
                        validateIndexExpressionValue(value, name);
                        IndexOperator op = slice.getIndexOperator(b);
                        // If the underlying comparator for name is reversed, we need to reverse the IndexOperator: user operation
                        // always refer to the "forward" sorting even if the clustering order is reversed, but the 2ndary code does
                        // use the underlying comparator as is.
                        if (name.type instanceof ReversedType)
                            op = reverse(op);
View Full Code Here

                {
                    if (slice.hasBound(b))
                    {
                        ByteBuffer value = slice.bound(b, variables);
                        validateIndexExpressionValue(value, name);
                        IndexOperator op = slice.getIndexOperator(b);
                        // If the underlying comparator for name is reversed, we need to reverse the IndexOperator: user operation
                        // always refer to the "forward" sorting even if the clustering order is reversed, but the 2ndary code does
                        // use the underlying comparator as is.
                        if (name.type instanceof ReversedType)
                            op = reverse(op);
View Full Code Here

        {
            log.error("Error while retrieving records {}, Caused by:", e);
            throw new PersistenceException(e);
        }
        Object pk = PropertyAccessorHelper.getObject(m.getIdAttribute().getJavaType(), superColumnName);
        IndexOperator condition = expression.getOp();

        if (log.isInfoEnabled())
        {
            log.info("RowKey: {} ; Super column Name: {} on condition.", rowKey, superColumnNameStr, condition);
        }
View Full Code Here

        {
            for (IndexExpression e : expressions)
            {
                if (primaryKeyName.equals(new String(e.getColumn_name())))
                {
                    IndexOperator operator = e.op;
                    if (operator.equals(IndexOperator.LTE) || operator.equals(IndexOperator.LT))
                    {
                        rowKeys.put(MAX_, e.getValue());
                        rowExpressions.add(e);
                    }
                    else if (operator.equals(IndexOperator.GTE) || operator.equals(IndexOperator.GT))
                    {
                        rowKeys.put(MIN_, e.getValue());
                        rowExpressions.add(e);
                    }
                    else if (operator.equals(IndexOperator.EQ))
                    {
                        rowKeys.put(MAX_, e.getValue());
                        rowKeys.put(MIN_, e.getValue());
                        rowExpressions.add(e);
                    }
View Full Code Here

                if (value != null && value.size() > 1)
                {
                    log.error("IN clause is not enabled for thrift, use cql3.");
                    throw new QueryHandlerException("IN clause is not enabled for thrift, use cql3.");
                }
                IndexOperator operator = getOperator(condition, idPresent);

                IndexExpression expression = new IndexExpression(ByteBufferUtil.bytes(fieldName), operator,
                        getBytesValue(fieldName, m, value.get(0)));

                expr.add(expression);
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.IndexOperator

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.