DRILL-3993: Changes after code review.

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

Branch: refs/heads/master
Commit: 663518e8ae1a05e29895a3994213a1e9819c955b
Parents: 688e043
Author: Volodymyr Vysotskyi <vvo...@gmail.com>
Authored: Thu Dec 21 15:01:50 2017 +0200
Committer: Volodymyr Vysotskyi <vvo...@gmail.com>
Committed: Tue Jan 16 12:10:13 2018 +0200

----------------------------------------------------------------------
 .../apache/drill/exec/store/hbase/HBaseSchemaFactory.java    | 8 ++++----
 .../main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java | 2 +-
 .../exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java    | 8 ++++----
 .../java/org/apache/drill/exec/planner/sql/SqlConverter.java | 8 +-------
 exec/jdbc-all/pom.xml                                        | 2 +-
 5 files changed, 11 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/663518e8/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
----------------------------------------------------------------------
diff --git 
a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
 
b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
index 810daaa..b8e825b 100644
--- 
a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
+++ 
b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
@@ -75,10 +75,10 @@ public class HBaseSchemaFactory implements SchemaFactory {
       try {
         return new DrillHBaseTable(schemaName, plugin, scanSpec);
       } catch (Exception e) {
-        // Calcite firstly is looking for a table in the default schema, if a 
table was not found,
-        // it is looking in root schema.
-        // If a table does not exist, a query will fail at validation stage,
-        // so the error should not be thrown there.
+        // Calcite firstly looks for a table in the default schema, if the 
table was not found,
+        // it looks in the root schema.
+        // If the table does not exist, a query will fail at validation stage,
+        // so the error should not be thrown here.
         logger.warn("Failure while loading table '{}' for database '{}'.", 
name, schemaName, e.getCause());
         return null;
       }

http://git-wip-us.apache.org/repos/asf/drill/blob/663518e8/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
----------------------------------------------------------------------
diff --git 
a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
 
b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
index e335c08..63752fa 100644
--- 
a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
+++ 
b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
@@ -62,7 +62,7 @@ public class JdbcPrel extends AbstractRelNode implements Prel 
{
         (JavaTypeFactory) getCluster().getTypeFactory());
     final JdbcImplementor.Result result =
         jdbcImplementor.visitChild(0, input.accept(new SubsetRemover()));
-    sql = result.asSelect().toSqlString(dialect).getSql();
+    sql = result.asStatement().toSqlString(dialect).getSql();
     rowType = input.getRowType();
   }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/663518e8/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java
----------------------------------------------------------------------
diff --git 
a/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java
 
b/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java
index ca93445..3b86a95 100644
--- 
a/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java
+++ 
b/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java
@@ -64,10 +64,10 @@ public class OpenTSDBSchemaFactory implements SchemaFactory 
{
       try {
         return new DrillOpenTSDBTable(schemaName, plugin, new 
Schema(plugin.getClient(), name), scanSpec);
       } catch (Exception e) {
-        // Calcite firstly is looking for a table in the default schema, if a 
table was not found,
-        // it is looking in root schema.
-        // If a table does not exist, a query will fail at validation stage,
-        // so the error should not be thrown there.
+        // Calcite firstly looks for a table in the default schema, if the 
table was not found,
+        // it looks in the root schema.
+        // If the table does not exist, a query will fail at validation stage,
+        // so the error should not be thrown here.
         logger.warn("Failure while loading table '{}' for database '{}'.", 
name, schemaName, e.getCause());
         return null;
       }

http://git-wip-us.apache.org/repos/asf/drill/blob/663518e8/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java
index ae9b37f..563f58e 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java
@@ -586,13 +586,7 @@ public class SqlConverter {
               .build(logger);
         }
       }
-      // Fix for select from hbase table with schema name in query (example: 
"SELECT col FROM hbase.t)
-      // from hbase schema (did "USE hbase" before).
-      if (names.size() == getSchemaPaths().size() && getSchemaPaths().size() > 
1) {
-        if (names.get(0).equals(getSchemaPaths().get(0).get(0))) {
-          useRootSchemaAsDefault(true);
-        }
-      }
+
       return super.getTable(names);
     }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/663518e8/exec/jdbc-all/pom.xml
----------------------------------------------------------------------
diff --git a/exec/jdbc-all/pom.xml b/exec/jdbc-all/pom.xml
index f59780d..80d3716 100644
--- a/exec/jdbc-all/pom.xml
+++ b/exec/jdbc-all/pom.xml
@@ -569,7 +569,7 @@
                           This is likely due to you adding new dependencies to 
a java-exec and not updating the excludes in this module. This is important as 
it minimizes the size of the dependency of Drill application users.
 
                         </message>
-                        <maxsize>31000000</maxsize>
+                        <maxsize>32000000</maxsize>
                         <minsize>15000000</minsize>
                         <files>
                           
<file>${project.build.directory}/drill-jdbc-all-${project.version}.jar</file>

Reply via email to