You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by gr...@apache.org on 2014/11/06 19:54:12 UTC
phoenix git commit: PHOENIX-1404 Ignore call to ResultSet#setFetchSize
Repository: phoenix
Updated Branches:
refs/heads/3.0 9ffd8c63a -> d2cd2856b
PHOENIX-1404 Ignore call to ResultSet#setFetchSize
Don't throw an exception on calls to ResultSet#setFetchSize,
instead just ignore the call.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d2cd2856
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d2cd2856
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d2cd2856
Branch: refs/heads/3.0
Commit: d2cd2856bfd41167e27b30d137e07342c2fc2b96
Parents: 9ffd8c6
Author: Gabriel Reid <ga...@ngdata.com>
Authored: Thu Nov 6 19:31:39 2014 +0100
Committer: Gabriel Reid <ga...@ngdata.com>
Committed: Thu Nov 6 19:51:04 2014 +0100
----------------------------------------------------------------------
.../apache/phoenix/jdbc/PhoenixResultSet.java | 23 ++++++++++++--------
1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/d2cd2856/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index 8a6cf64..8c3c863 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -41,6 +41,8 @@ import java.text.Format;
import java.util.Calendar;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.phoenix.compile.ColumnProjector;
import org.apache.phoenix.compile.RowProjector;
@@ -56,7 +58,7 @@ import org.apache.phoenix.util.SQLCloseable;
/**
- *
+ *
* JDBC ResultSet implementation of Phoenix.
* Currently only the following data types are supported:
* - String
@@ -77,31 +79,34 @@ import org.apache.phoenix.util.SQLCloseable;
* - ResultSet.CONCUR_READ_ONLY
* - ResultSet.TYPE_FORWARD_ONLY
* - ResultSet.CLOSE_CURSORS_AT_COMMIT
- *
- *
+ *
+ *
* @since 0.1
*/
public class PhoenixResultSet implements ResultSet, SQLCloseable, org.apache.phoenix.jdbc.Jdbc7Shim.ResultSet {
+
+ private static final Log LOG = LogFactory.getLog(PhoenixResultSet.class);
+
private final static String STRING_FALSE = "0";
private final static BigDecimal BIG_DECIMAL_FALSE = BigDecimal.valueOf(0);
private final static Integer INTEGER_FALSE = Integer.valueOf(0);
private final static Tuple BEFORE_FIRST = new ResultTuple();
-
+
private final ResultIterator scanner;
private final RowProjector rowProjector;
private final PhoenixStatement statement;
private final ImmutableBytesWritable ptr = new ImmutableBytesWritable();
-
+
private Tuple currentRow = BEFORE_FIRST;
private boolean isClosed = false;
private boolean wasNull = false;
-
+
public PhoenixResultSet(ResultIterator resultIterator, RowProjector rowProjector, PhoenixStatement statement) throws SQLException {
this.rowProjector = rowProjector;
this.scanner = resultIterator;
this.statement = statement;
}
-
+
@Override
public boolean absolute(int row) throws SQLException {
throw new SQLFeatureNotSupportedException();
@@ -726,7 +731,7 @@ public class PhoenixResultSet implements ResultSet, SQLCloseable, org.apache.pho
public Tuple getCurrentRow() {
return currentRow;
}
-
+
@Override
public boolean next() throws SQLException {
checkOpen();
@@ -782,7 +787,7 @@ public class PhoenixResultSet implements ResultSet, SQLCloseable, org.apache.pho
@Override
public void setFetchSize(int rows) throws SQLException {
- throw new SQLFeatureNotSupportedException();
+ LOG.warn("Ignoring setFetchSize(" + rows + ")");
}
@Override