Change ALLOW FILTERING logic and session cache merge a bit.
This commit is contained in:
parent
690cd1e064
commit
0b86d33725
3 changed files with 7 additions and 4 deletions
|
@ -369,7 +369,7 @@ public abstract class AbstractUnitOfWork<E extends Exception>
|
||||||
columnMap.forEach(
|
columnMap.forEach(
|
||||||
(columnKey, value) -> {
|
(columnKey, value) -> {
|
||||||
if (to.contains(rowKey, columnKey)) {
|
if (to.contains(rowKey, columnKey)) {
|
||||||
// TODO(gburd):...
|
// TODO(gburd): merge case, preserve object identity
|
||||||
to.put(
|
to.put(
|
||||||
rowKey,
|
rowKey,
|
||||||
columnKey,
|
columnKey,
|
||||||
|
|
|
@ -317,10 +317,13 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
|
||||||
Object pojo, String tableName, List<String[]> facetCombinations) {
|
Object pojo, String tableName, List<String[]> facetCombinations) {
|
||||||
for (String[] combination : facetCombinations) {
|
for (String[] combination : facetCombinations) {
|
||||||
String cacheKey = tableName + "." + Arrays.toString(combination);
|
String cacheKey = tableName + "." + Arrays.toString(combination);
|
||||||
|
if (pojo == null || pojo == HelenusSession.deleted) {
|
||||||
sessionCache.invalidate(cacheKey);
|
sessionCache.invalidate(cacheKey);
|
||||||
|
} else {
|
||||||
sessionCache.put(cacheKey, pojo);
|
sessionCache.put(cacheKey, pojo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Metadata getMetadata() {
|
public Metadata getMetadata() {
|
||||||
return metadata;
|
return metadata;
|
||||||
|
|
|
@ -312,8 +312,8 @@ public final class SelectOperation<E> extends AbstractFilterStreamOperation<E, S
|
||||||
if (allowFiltering == false) {
|
if (allowFiltering == false) {
|
||||||
switch (prop.getColumnType()) {
|
switch (prop.getColumnType()) {
|
||||||
case PARTITION_KEY:
|
case PARTITION_KEY:
|
||||||
case CLUSTERING_COLUMN:
|
|
||||||
break;
|
break;
|
||||||
|
case CLUSTERING_COLUMN:
|
||||||
default:
|
default:
|
||||||
// When using non-Cassandra-standard 2i types or when using more than one
|
// 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.
|
// indexed column or non-indexed columns the query must include ALLOW FILTERING.
|
||||||
|
|
Loading…
Reference in a new issue