diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/qe')
-rw-r--r-- | src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java | 2 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java index 6e87c7a..366c2d7 100644 --- a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java +++ b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java @@ -113,7 +113,7 @@ public class IndexedQueryAnalyzer<S extends Storable> { // Now try to find best foreign index.
- if (bestLocalScore.getFilteringScore().isKeyMatch()) {
+ if (bestLocalScore != null && bestLocalScore.getFilteringScore().isKeyMatch()) {
// Don't bother checking foreign indexes. The local one is perfect.
return new Result(filter, bestLocalScore, bestLocalIndex, null, null);
}
diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java index 64888ba..ea60490 100644 --- a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java +++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java @@ -330,7 +330,7 @@ public class UnionQueryAnalyzer<S extends Storable> implements QueryExecutorFact OrderingScore<S> score = result.getCompositeScore().getOrderingScore();
OrderingList<S> handled = score.getHandledOrdering();
for (OrderedProperty<S> property : handled) {
- if (chained.equals(property)) {
+ if (chained.equals(property.getChainedProperty())) {
return property.getDirection();
}
}
|