Author: shawkins
Date: 2009-05-26 14:46:46 -0400 (Tue, 26 May 2009)
New Revision: 998
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SubqueryAwareEvaluator.java
trunk/engine/src/test/java/com/metamatrix/query/processor/HardcodedDataManager.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
Log:
TEIID-629 fix for subqueries throwing blocked exceptions.
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SubqueryAwareEvaluator.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SubqueryAwareEvaluator.java 2009-05-25
16:32:46 UTC (rev 997)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SubqueryAwareEvaluator.java 2009-05-26
18:46:46 UTC (rev 998)
@@ -129,6 +129,10 @@
}
try {
state.processor.process(Integer.MAX_VALUE);
+ } catch (MetaMatrixComponentException e) {
+ throw e;
+ } catch (MetaMatrixProcessingException e) {
+ throw e;
} catch (MetaMatrixCoreException e) {
throw new MetaMatrixComponentException(e);
}
Modified:
trunk/engine/src/test/java/com/metamatrix/query/processor/HardcodedDataManager.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/query/processor/HardcodedDataManager.java 2009-05-25
16:32:46 UTC (rev 997)
+++
trunk/engine/src/test/java/com/metamatrix/query/processor/HardcodedDataManager.java 2009-05-26
18:46:46 UTC (rev 998)
@@ -50,6 +50,8 @@
private boolean mustRegisterCommands = true;
+ private boolean blockOnce;
+
// Collect all commands run against this class
private Collection commandHistory = new ArrayList(); // Commands
@@ -70,6 +72,10 @@
this.commandHistory.clear();
}
+ public void setBlockOnce(boolean blockOnce) {
+ this.blockOnce = blockOnce;
+ }
+
/**
* Set of model names that are valid. Invalid ones will throw an error.
* @param models
@@ -132,6 +138,9 @@
}
FakeTupleSource source = new FakeTupleSource(projectedSymbols, rows);
+ if (blockOnce) {
+ source.setBlockOnce();
+ }
return source;
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-05-25
16:32:46 UTC (rev 997)
+++
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-05-26
18:46:46 UTC (rev 998)
@@ -7641,6 +7641,7 @@
// Construct data manager with data
HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.setBlockOnce(true);
dataManager.addData("SELECT pm1.g1.e2, pm1.g1.e1 FROM pm1.g1", new
List[] { //$NON-NLS-1$
Arrays.asList(Integer.valueOf(1), "a"), //$NON-NLS-1$
Arrays.asList(Integer.valueOf(2), "b") //$NON-NLS-1$