summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/qe
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-05-09 03:36:30 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-05-09 03:36:30 +0000
commit3fad738c13c12f0be3cf4e453b559427e7f420d9 (patch)
tree6ac2f4befe3a1bfc2228e28ab9071e0732a11b0d /src/main/java/com/amazon/carbonado/qe
parent57023295c1af81b4e4fd3dfd2d5969263179f54c (diff)
Clustered index selection fixes.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/qe')
-rw-r--r--src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java2
-rw-r--r--src/main/java/com/amazon/carbonado/qe/OrderingScore.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java
index 0599b00..8954ed6 100644
--- a/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java
+++ b/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java
@@ -310,7 +310,7 @@ public class IndexedQueryExecutor<S extends Storable> extends AbstractQueryExecu
indent(app, indentLevel);
app.append("...covering filter: ");
mCoveringFilter.appendTo(app, values);
-
+ newline(app);
}
return true;
}
diff --git a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
index 9bfcde1..32f6936 100644
--- a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
+++ b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
@@ -526,7 +526,11 @@ public class OrderingScore<S extends Storable> {
// Choose index with any handled properties over the one with
// neither handled nor remainder properties.
if (Double.isNaN(firstRatio)) {
- if (!Double.isNaN(otherRatio)) {
+ if (Double.isNaN(otherRatio)) {
+ // Order checks are not really applicable. The query does
+ // not have an ordering applied to it.
+ return 0;
+ } else {
return 1;
}
} else if (Double.isNaN(otherRatio)) {