Author: shawkins
Date: 2012-06-26 11:42:28 -0400 (Tue, 26 Jun 2012)
New Revision: 4204
Modified:
trunk/engine/src/main/java/org/teiid/query/processor/relational/SubqueryAwareEvaluator.java
trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
Log:
TEIID-2077 correcting the reset/close methods
Modified:
trunk/engine/src/main/java/org/teiid/query/processor/relational/SubqueryAwareEvaluator.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/query/processor/relational/SubqueryAwareEvaluator.java 2012-06-26
15:22:47 UTC (rev 4203)
+++
trunk/engine/src/main/java/org/teiid/query/processor/relational/SubqueryAwareEvaluator.java 2012-06-26
15:42:28 UTC (rev 4204)
@@ -79,6 +79,14 @@
}
return false;
}
+
+ @Override
+ public void clear() {
+ for (TupleBuffer buffer : values()) {
+ buffer.remove();
+ }
+ super.clear();
+ }
}
public class SubqueryState {
@@ -125,17 +133,17 @@
public void reset() {
for (SubqueryState subQueryState : subqueries.values()) {
subQueryState.plan.reset();
+ subQueryState.close(true);
}
+ cache.clear();
+ smallCache.clear();
+ currentTuples = 0;
}
public void close() {
- for (SubqueryState state : subqueries.values()) {
- state.close(true);
- }
- for (TupleBuffer buffer : cache.values()) {
- buffer.remove();
- }
- cache.clear();
+ reset();
+ commands.clear();
+ subqueries.clear();
}
@Override
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2012-06-26
15:22:47 UTC (rev 4203)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2012-06-26
15:42:28 UTC (rev 4204)
@@ -2286,9 +2286,9 @@
ProcessorPlan plan = helpGetPlan(sql, RealMetadataFactory.example1Cached());
// Run query
- doProcess(plan, dataManager, expected, createCommandContext());
+ helpProcess(plan, dataManager, expected);
- //three queries - 1 for the outer and 1 each for true/false
+ //three queries - 1 for the outer and 1 each for true/false x 3 runs
assertEquals(3, dataManager.getQueries().size());
}
Show replies by date