tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hj...@apache.org
Subject [15/29] tajo git commit: TAJO-1220: Implement createStatement() and setEscapeProcessing() in JdbcConnection. (YeonSu Han via hyunsik)
Date Fri, 05 Dec 2014 08:21:19 GMT
TAJO-1220: Implement createStatement() and setEscapeProcessing() in  JdbcConnection. (YeonSu
Han via hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/ea2dbf82
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/ea2dbf82
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/ea2dbf82

Branch: refs/heads/hbase_storage
Commit: ea2dbf82c04d609dac46abd322241a15ccf30956
Parents: f69938a
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Wed Dec 3 16:04:56 2014 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Wed Dec 3 16:04:56 2014 +0900

----------------------------------------------------------------------
 CHANGES                                                |  3 +++
 .../main/java/org/apache/tajo/jdbc/JdbcConnection.java | 13 ++++++++++---
 .../main/java/org/apache/tajo/jdbc/TajoStatement.java  |  7 ++++---
 3 files changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/ea2dbf82/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c26b8a9..ea8e1ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -83,6 +83,9 @@ Release 0.9.1 - unreleased
 
   BUG FIXES
 
+    TAJO-1220: Implement createStatement() and setEscapeProcessing() in 
+    JdbcConnection. (YeonSu Han via hyunsik)
+
     TAJO-1183: Keep command execution even with errors. (Jaewoong Jung via 
     hyunsik)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/ea2dbf82/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
----------------------------------------------------------------------
diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
index 4250da4..a76443d 100644
--- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
+++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
@@ -181,9 +181,16 @@ public class JdbcConnection implements Connection {
   }
 
   @Override
-  public Statement createStatement(int resultSetType, int resultSetConcurrency)
-      throws SQLException {
-    throw new SQLFeatureNotSupportedException("createStatement");
+  public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
{
+    if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE) {
+      throw new SQLException("TYPE_SCROLL_SENSITIVE is not supported");
+    }
+
+    if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) {
+      throw new SQLException("CONCUR_READ_ONLY mode is not supported.");
+    }
+
+    return new TajoStatement(this, tajoClient);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/tajo/blob/ea2dbf82/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
----------------------------------------------------------------------
diff --git a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
index 8308211..eb7f8c9 100644
--- a/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
+++ b/tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
@@ -311,10 +311,11 @@ public class TajoStatement implements Statement {
     throw new SQLFeatureNotSupportedException("setCursorName not supported");
   }
 
+  /**
+   * Not necessary.
+   */
   @Override
-  public void setEscapeProcessing(boolean enable) throws SQLException {
-    throw new SQLFeatureNotSupportedException("setEscapeProcessing not supported");
-  }
+  public void setEscapeProcessing(boolean enable) throws SQLException {}
 
   @Override
   public void setFetchDirection(int direction) throws SQLException {


Mime
View raw message