Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.IndexExpression$IndexExpressionTupleSchemeFactory


    super(k, keySerializer, nameSerializer, valueSerializer);
    indexClause = new IndexClause();
  }

  public IndexedSlicesQuery<K,N,V> addEqualsExpression(N columnName, V columnValue) {
    indexClause.addToExpressions(new IndexExpression(columnNameSerializer.toByteBuffer(columnName),
        IndexOperator.EQ,
        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }
View Full Code Here


        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }

  public IndexedSlicesQuery<K,N,V> addLteExpression(N columnName, V columnValue) {
    indexClause.addToExpressions(new IndexExpression(columnNameSerializer.toByteBuffer(columnName),
        IndexOperator.LTE,
        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }
View Full Code Here

        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }

  public IndexedSlicesQuery<K,N,V> addGteExpression(N columnName, V columnValue) {
    indexClause.addToExpressions(new IndexExpression(columnNameSerializer.toByteBuffer(columnName),
        IndexOperator.GTE,
        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }
View Full Code Here

        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }

  public IndexedSlicesQuery<K,N,V> addLtExpression(N columnName, V columnValue) {
    indexClause.addToExpressions(new IndexExpression(columnNameSerializer.toByteBuffer(columnName),
        IndexOperator.LT,
        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }
View Full Code Here

        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }

  public IndexedSlicesQuery<K,N,V> addGtExpression(N columnName, V columnValue) {
    indexClause.addToExpressions(new IndexExpression(columnNameSerializer.toByteBuffer(columnName),
        IndexOperator.GT,
        valueSerializer.toByteBuffer(columnValue)));
    return this;
  }
View Full Code Here

    public List<Row> scan(IndexClause clause, AbstractBounds range, IFilter dataFilter)
    {
        // Start with the most-restrictive indexed clause, then apply remaining clauses
        // to each row matching that clause.
        // TODO: allow merge join instead of just one index + loop
        IndexExpression primary = highestSelectivityPredicate(clause);
        ColumnFamilyStore indexCFS = getIndexedColumnFamilyStore(primary.column_name);
        if (logger.isDebugEnabled())
            logger.debug("Primary scan clause is " + getComparator().getString(primary.column_name));
        assert indexCFS != null;
        DecoratedKey indexKey = indexCFS.partitioner.decorateKey(primary.value);
View Full Code Here

        return rows;
    }

    private IndexExpression highestSelectivityPredicate(IndexClause clause)
    {
        IndexExpression best = null;
        int bestMeanCount = Integer.MAX_VALUE;
        for (IndexExpression expression : clause.expressions)
        {
            ColumnFamilyStore cfs = getIndexedColumnFamilyStore(expression.column_name);
            if (cfs == null || !expression.op.equals(IndexOperator.EQ))
View Full Code Here

    public List<Row> scan(IndexClause clause, AbstractBounds range, IFilter dataFilter)
    {
        // Start with the most-restrictive indexed clause, then apply remaining clauses
        // to each row matching that clause.
        // TODO: allow merge join instead of just one index + loop
        IndexExpression primary = highestSelectivityPredicate(clause);
        ColumnFamilyStore indexCFS = getIndexedColumnFamilyStore(primary.column_name);
        if (logger.isDebugEnabled())
            logger.debug("Primary scan clause is " + getComparator().getString(primary.column_name));
        assert indexCFS != null;
        DecoratedKey indexKey = indexCFS.partitioner.decorateKey(primary.value);
View Full Code Here

        return rows;
    }

    private IndexExpression highestSelectivityPredicate(IndexClause clause)
    {
        IndexExpression best = null;
        int bestMeanCount = Integer.MAX_VALUE;
        for (IndexExpression expression : clause.expressions)
        {
            ColumnFamilyStore cfs = getIndexedColumnFamilyStore(expression.column_name);
            if (cfs == null || !expression.op.equals(IndexOperator.EQ))
View Full Code Here

    public List<Row> scan(IndexClause clause, AbstractBounds range, IFilter dataFilter)
    {
        // Start with the most-restrictive indexed clause, then apply remaining clauses
        // to each row matching that clause.
        // TODO: allow merge join instead of just one index + loop
        IndexExpression primary = highestSelectivityPredicate(clause);
        ColumnFamilyStore indexCFS = getIndexedColumnFamilyStore(primary.column_name);
        if (logger.isDebugEnabled())
            logger.debug("Primary scan clause is " + getComparator().getString(primary.column_name));
        assert indexCFS != null;
        DecoratedKey indexKey = indexCFS.partitioner.decorateKey(primary.value);
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.IndexExpression$IndexExpressionTupleSchemeFactory

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.