Change ALLOW FILTERING logic and session cache merge a bit.

This commit is contained in:
Greg Burd 2017-11-03 08:49:31 -04:00
parent 690cd1e064
commit 0b86d33725
3 changed files with 7 additions and 4 deletions

View file

@ -369,7 +369,7 @@ public abstract class AbstractUnitOfWork<E extends Exception>
columnMap.forEach(
(columnKey, value) -> {
if (to.contains(rowKey, columnKey)) {
// TODO(gburd):...
// TODO(gburd): merge case, preserve object identity
to.put(
rowKey,
columnKey,

View file

@ -317,8 +317,11 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
Object pojo, String tableName, List<String[]> facetCombinations) {
for (String[] combination : facetCombinations) {
String cacheKey = tableName + "." + Arrays.toString(combination);
sessionCache.invalidate(cacheKey);
sessionCache.put(cacheKey, pojo);
if (pojo == null || pojo == HelenusSession.deleted) {
sessionCache.invalidate(cacheKey);
} else {
sessionCache.put(cacheKey, pojo);
}
}
}

View file

@ -312,8 +312,8 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
if (allowFiltering == false) {
switch (prop.getColumnType()) {
case PARTITION_KEY:
case CLUSTERING_COLUMN:
break;
case CLUSTERING_COLUMN:
default:
// When using non-Cassandra-standard 2i types or when using more than one
// indexed column or non-indexed columns the query must include ALLOW FILTERING.