phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maryann...@apache.org
Subject phoenix git commit: PHOENIX-3273 Support both != and
Date Tue, 27 Sep 2016 18:36:04 GMT
Repository: phoenix
Updated Branches:
  refs/heads/calcite 7115be51c -> 9f1e554e1


PHOENIX-3273 Support both != and


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

Branch: refs/heads/calcite
Commit: 9f1e554e12ae5738b27759da26c007c96afe4e08
Parents: 7115be5
Author: maryannxue <maryann.xue@gmail.com>
Authored: Tue Sep 27 11:35:54 2016 -0700
Committer: maryannxue <maryann.xue@gmail.com>
Committed: Tue Sep 27 11:35:54 2016 -0700

----------------------------------------------------------------------
 .../calcite/jdbc/PhoenixCalciteEmbeddedDriver.java   | 15 ++++++++++++++-
 pom.xml                                              |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9f1e554e/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixCalciteEmbeddedDriver.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixCalciteEmbeddedDriver.java
b/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixCalciteEmbeddedDriver.java
index f730e7f..c370e84 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixCalciteEmbeddedDriver.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixCalciteEmbeddedDriver.java
@@ -31,6 +31,7 @@ import org.apache.calcite.jdbc.CalcitePrepare;
 import org.apache.calcite.jdbc.Driver;
 import org.apache.calcite.linq4j.function.Function0;
 import org.apache.calcite.schema.SchemaPlus;
+import org.apache.calcite.sql.validate.SqlConformance;
 import org.apache.phoenix.calcite.PhoenixSchema;
 import org.apache.phoenix.calcite.rules.PhoenixConverterRules;
 import org.apache.phoenix.calcite.type.PhoenixRelDataTypeSystem;
@@ -84,8 +85,14 @@ public abstract class PhoenixCalciteEmbeddedDriver extends Driver implements
SQL
         }
         
         Properties info2 = new Properties(info);
-        info2.setProperty(CalciteConnectionProperty.TYPE_SYSTEM.camelName(),
+        setPropertyIfNotSpecified(
+                info2,
+                CalciteConnectionProperty.TYPE_SYSTEM.camelName(),
                 PhoenixRelDataTypeSystem.class.getName());
+        setPropertyIfNotSpecified(
+                info2,
+                CalciteConnectionProperty.CONFORMANCE.camelName(),
+                SqlConformance.ORACLE_10.toString());
         
         final String prefix = getConnectStringPrefix();
         assert url.startsWith(prefix);
@@ -113,4 +120,10 @@ public abstract class PhoenixCalciteEmbeddedDriver extends Driver implements
SQL
         
         return connection;
     }
+    
+    private static void setPropertyIfNotSpecified(Properties props, String key, String value)
{
+        if (props.getProperty(key) == null) {
+            props.setProperty(key, value);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/9f1e554e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d871784..ec6c8a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,7 +97,7 @@
     <jodatime.version>1.6</jodatime.version>
     <joni.version>2.1.2</joni.version>
     <avatica.version>1.8.0</avatica.version>
-    <calcite.version>1.9.0-SNAPSHOT</calcite.version>
+    <calcite.version>1.10.0-SNAPSHOT</calcite.version>
     <jettyVersion>8.1.7.v20120910</jettyVersion>
     <tephra.version>0.9.0-incubating</tephra.version>
     <spark.version>1.6.1</spark.version>


Mime
View raw message