teiid SVN: r4618 - in branches/7.7.x/engine/src: test/java/org/teiid/query/processor/relational and 1 other directory.
by teiid-commits@lists.jboss.org
Author: jolee
Date: 2013-12-16 09:07:10 -0500 (Mon, 16 Dec 2013)
New Revision: 4618
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/SourceState.java
branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
branches/7.7.x/engine/src/test/java/org/teiid/query/processor/relational/TestJoinNode.java
Log:
TEIID-2707: revert to using has/get FinalBuffer methods
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2013-11-21 20:27:31 UTC (rev 4617)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/RelationalNode.java 2013-12-16 14:07:10 UTC (rev 4618)
@@ -42,9 +42,8 @@
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.processor.ProcessorDataManager;
-import org.teiid.query.processor.QueryProcessor;
import org.teiid.query.processor.BatchCollector.BatchProducer;
+import org.teiid.query.processor.ProcessorDataManager;
import org.teiid.query.sql.symbol.AliasSymbol;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.SingleElementSymbol;
@@ -633,19 +632,4 @@
throw e;
}
- public boolean hasBuffer(boolean b) {
- return false;
- }
-
- /**
- * return the final tuple buffer or null if not available
- * @return
- * @throws TeiidProcessingException
- * @throws TeiidComponentException
- * @throws BlockedException
- */
- public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException {
- return null;
- }
-
}
\ No newline at end of file
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/SourceState.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/SourceState.java 2013-11-21 20:27:31 UTC (rev 4617)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/SourceState.java 2013-12-16 14:07:10 UTC (rev 4618)
@@ -189,8 +189,8 @@
((BatchIterator)this.iterator).readAhead(limit);
return;
}
- if (source.hasBuffer(true)) {
- this.buffer = source.getBuffer(-1);
+ if (source.hasFinalBuffer()) {
+ this.buffer = source.getFinalBuffer();
return;
}
if (collector == null) {
@@ -228,8 +228,8 @@
if (this.iterator instanceof BatchIterator) {
throw new AssertionError("cannot buffer the source"); //$NON-NLS-1$
}
- if (source.hasBuffer(true)) {
- this.buffer = source.getBuffer(-1);
+ if (source.hasFinalBuffer()) {
+ this.buffer = source.getFinalBuffer();
Assertion.assertTrue(this.buffer.isFinal());
return this.buffer;
}
@@ -255,8 +255,8 @@
}
if (this.sortUtility == null) {
TupleSource ts = null;
- if (source.hasBuffer(true)) {
- this.buffer = source.getBuffer(-1);
+ if (source.hasFinalBuffer()) {
+ this.buffer = source.getFinalBuffer();
} else if (this.buffer == null && this.collector != null) {
this.buffer = this.collector.collectTuples();
}
@@ -288,7 +288,7 @@
}
public boolean hasBuffer() {
- return this.buffer != null || this.source.hasBuffer(true);
+ return this.buffer != null || this.source.hasFinalBuffer();
}
public boolean nextBuffer() {
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2013-11-21 20:27:31 UTC (rev 4617)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2013-12-16 14:07:10 UTC (rev 4618)
@@ -342,7 +342,7 @@
@Override
public boolean hasFinalBuffer() {
- return this.table.getXQueryExpression().isStreaming();
+ return false;
}
@Override
Modified: branches/7.7.x/engine/src/test/java/org/teiid/query/processor/relational/TestJoinNode.java
===================================================================
--- branches/7.7.x/engine/src/test/java/org/teiid/query/processor/relational/TestJoinNode.java 2013-11-21 20:27:31 UTC (rev 4617)
+++ branches/7.7.x/engine/src/test/java/org/teiid/query/processor/relational/TestJoinNode.java 2013-12-16 14:07:10 UTC (rev 4618)
@@ -181,12 +181,10 @@
List rightElements = new ArrayList();
rightElements.add(es2);
rightNode = new BlockingFakeRelationalNode(2, rightTuples) {
- @Override
public boolean hasBuffer(boolean requireFinal) {
return false;
}
- @Override
public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException {
fail();
throw new AssertionError();
@@ -913,12 +911,10 @@
List rightElements = Arrays.asList(es3, es4);
rightNode = new BlockingFakeRelationalNode(2, rightTuples) {
- @Override
public boolean hasBuffer(boolean requireFinal) {
return false;
}
- @Override
public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException {
fail();
throw new AssertionError();