Package org.apache.cassandra.db.composites

Examples of org.apache.cassandra.db.composites.CellNameType.compare()


            int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx);
            if (index < 0 || index == indexList.size())
                continue;
            IndexHelper.IndexInfo indexInfo = indexList.get(index);
            // Check the index block does contain the column names and that we haven't inserted this block yet.
            if (comparator.compare(name, indexInfo.firstName) < 0 || index == lastIndexIdx)
                continue;
            ranges.add(indexInfo);
            lastIndexIdx = index;
        }
View Full Code Here


            int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx);
            if (index < 0 || index == indexList.size())
                continue;
            IndexHelper.IndexInfo indexInfo = indexList.get(index);
            // Check the index block does contain the column names and that we haven't inserted this block yet.
            if (comparator.compare(name, indexInfo.firstName) < 0 || index == lastIndexIdx)
                continue;

            ranges.add(indexInfo);
            lastIndexIdx = index;
        }
View Full Code Here

            int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx);
            if (index < 0 || index == indexList.size())
                continue;
            IndexHelper.IndexInfo indexInfo = indexList.get(index);
            // Check the index block does contain the column names and that we haven't inserted this block yet.
            if (comparator.compare(name, indexInfo.firstName) < 0 || index == lastIndexIdx)
                continue;

            ranges.add(indexInfo);
            lastIndexIdx = index;
        }
View Full Code Here

        CellNameType type = fullKeyMapper.clusteringKeyType;
        boolean accepted = true;
        Composite start = columnSlice.start;
        if (!start.isEmpty())
        {
            accepted = type.compare(start, key) <= 0;
        }
        Composite finish = columnSlice.finish;
        if (!finish.isEmpty())
        {
            accepted &= type.compare(finish, key) >= 0;
View Full Code Here

            accepted = type.compare(start, key) <= 0;
        }
        Composite finish = columnSlice.finish;
        if (!finish.isEmpty())
        {
            accepted &= type.compare(finish, key) >= 0;
        }
        return accepted;
    }

}
View Full Code Here

            public int compare(Row row1, Row row2)
            {
                CellNameType nameType = clusteringKeyMapper.getType();
                CellName name1 = clusteringKeyMapper.cellName(row1);
                CellName name2 = clusteringKeyMapper.cellName(row2);
                return nameType.compare(name1, name2);
            }
        });
    }

    @Override
View Full Code Here

    private int compare(BytesRef fieldValue1, BytesRef fieldValue2)
    {
        CellName bb1 = clusteringKeyMapper.cellName(fieldValue1);
        CellName bb2 = clusteringKeyMapper.cellName(fieldValue2);
        CellNameType type = clusteringKeyMapper.getType();
        return type.compare(bb1, bb2);
    }
}
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.