You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ra...@apache.org on 2017/04/10 15:43:18 UTC

phoenix git commit: PHOENIX-3776 Implement setDate in PhoenixCalcitePreparedStatement to pass java.sql.Date as java.util.Date till PHOENIX-868 is fixed(Rajeshbabu)

Repository: phoenix
Updated Branches:
  refs/heads/calcite ca2f7fdca -> 6fee45d6c


PHOENIX-3776 Implement setDate in PhoenixCalcitePreparedStatement to pass java.sql.Date as java.util.Date till PHOENIX-868 is fixed(Rajeshbabu)


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

Branch: refs/heads/calcite
Commit: 6fee45d6c71146b2d64e2ec1eb5d2cf5df8c9ae0
Parents: ca2f7fd
Author: Rajeshbabu Chintaguntla <ra...@apache.org>
Authored: Mon Apr 10 21:13:00 2017 +0530
Committer: Rajeshbabu Chintaguntla <ra...@apache.org>
Committed: Mon Apr 10 21:13:00 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6fee45d6/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java b/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
index f1d8048..c79b34f 100644
--- a/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
+++ b/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
@@ -525,6 +525,11 @@ public class PhoenixCalciteFactory extends CalciteFactory {
             getSite(parameterIndex)
             .setNClob(reader);
         }
+
+        @Override
+        public void setDate(int parameterIndex, Date x) throws SQLException {
+            getSite(parameterIndex).setObject(new java.util.Date(x.getTime()));
+        }
     }
 
     /** Implementation of database metadata for JDBC 4.1. */