From 9e4cd7e3af4ff5326fcb7a1dde3861f64badab41 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 4 Nov 2006 00:27:28 +0000 Subject: Fixed exception when printing join plan with blank parameters. --- src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java | 6 +----- src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | 4 ++-- src/main/java/com/amazon/carbonado/qe/StandardQuery.java | 2 -- src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java | 2 -- 4 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/qe') diff --git a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java index 1fe3ba8..b4bc0a3 100644 --- a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java @@ -126,14 +126,10 @@ public class DelegatedQueryExecutor implements QueryExecutor } private Query applyFilterValues(FilterValues values) { - // FIXME: figure out how to transfer values directly to query. - Query query = mQuery; Filter filter = query.getFilter(); - // FIXME: this code can get confused if filter has constants. if (values != null && filter != null && query.getBlankParameterCount() != 0) { - // FIXME: throws exception if not all values supplied - query = query.withValues(values.getValuesFor(filter)); + query = query.withValues(values.getSuppliedValuesFor(filter)); } return query; } diff --git a/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java index f3399a5..00ffda3 100644 --- a/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java @@ -595,8 +595,8 @@ public class JoinedQueryExecutor if (values == null) { return null; } - // FIXME: throws exception if not all values supplied - return mOuterLoopFilterValues.withValues(values.getValuesFor(mSourceFilterAsFromTarget)); + return mOuterLoopFilterValues + .withValues(values.getSuppliedValuesFor(mSourceFilterAsFromTarget)); } @SuppressWarnings("unused") diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java index d7f5263..c1038c7 100644 --- a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java +++ b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java @@ -162,8 +162,6 @@ public abstract class StandardQuery extends AbstractQuery if (mValues == null) { return new EmptyQuery(queryFactory(), mOrdering); } - // FIXME: Just like with DelegatedQueryExecutor, need a better way of - // transfering values. FilterValues newValues = mValues.getFilter().not() .initialFilterValues().withValues(mValues.getSuppliedValues()); return createQuery(newValues, mOrdering); diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java b/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java index c7ac720..06767c5 100644 --- a/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java +++ b/src/main/java/com/amazon/carbonado/qe/StandardQueryFactory.java @@ -157,8 +157,6 @@ public abstract class StandardQueryFactory implements QueryF if (values == null) { query = query(Filter.getOpenFilter(mType), ordering); } else { - // FIXME: Just like with DelegatedQueryExecutor, need a better way - // of transfering values. query = query(values.getFilter(), ordering).withValues(values.getSuppliedValues()); } return query; -- cgit v1.2.3