Author: shawkins
Date: 2010-10-18 11:23:08 -0400 (Mon, 18 Oct 2010)
New Revision: 2657
Modified:
branches/7.1.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
Log:
TEIID-1283 minor updates to client batching logic
Modified: branches/7.1.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2010-10-18
15:08:14 UTC (rev 2656)
+++ branches/7.1.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2010-10-18
15:23:08 UTC (rev 2657)
@@ -336,8 +336,7 @@
*/
public List getCurrentRecord() throws SQLException {
checkClosed();
- List wholeRecord = batchResults.getCurrentRow();
- return wholeRecord.subList(0, wholeRecord.size() - getOffset());
+ return batchResults.getCurrentRow();
}
/*
* @see java.sql.ResultSet#getType()
@@ -1062,6 +1061,9 @@
* @throws SQLException
*/
public boolean isAfterLast() throws SQLException {
+ if (getFinalRowNumber() == -1) {
+ return false;
+ }
// return true if the current row has a next row
// it is also not the last
return !hasNext() && this.getAbsoluteRowNumber() > BEFORE_FIRST_ROW
&& this.getAbsoluteRowNumber() > getFinalRowNumber();
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-10-18
15:08:14 UTC (rev 2656)
+++
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-10-18
15:23:08 UTC (rev 2657)
@@ -422,7 +422,7 @@
//TODO: support fetching more than 1 batch
boolean fromBuffer = false;
- if (batch == null || !(batch.containsRow(this.begin))) {
+ if (batch == null || !(batch.containsRow(this.begin) || (batch.getTerminationFlag()
&& batch.getEndRow() <= this.begin))) {
if (savedBatch != null && savedBatch.containsRow(this.begin)) {
batch = savedBatch;
} else {
Show replies by date