From 49d0e32955c647f33dbfbec592cd77fba3c7d8fa Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 4 Sep 2006 23:29:27 +0000 Subject: Ensure remainder orderings have a specified direction. --- src/main/java/com/amazon/carbonado/qe/OrderingScore.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java index ce85cb6..a2b46b9 100644 --- a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java +++ b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java @@ -224,6 +224,13 @@ public class OrderingScore { } // Property not handled and not an identity filter. + + if (property.getDirection() == UNSPECIFIED) { + // Specify a direction in order for a comparator to be later + // created from remainder orderings. + property = property.direction(ASCENDING); + } + remainderProperties.add(property); indexPos = Integer.MAX_VALUE; } @@ -317,7 +324,9 @@ public class OrderingScore { /** * Returns the ordering properties that the evaluated index does not - * support. The list of orderings is reduced to eliminate redundancies. + * support. The list of orderings is reduced to eliminate redundancies. If + * any remainder ordering properties originally had an unspecified + * direction, the direction in this list is specified as ascending. * * @return remainder orderings, never null */ -- cgit v1.2.3