ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/2] incubator-ignite git commit: ignite-484 - sql parsing fixed
Date Tue, 19 May 2015 07:04:56 GMT
ignite-484 - sql parsing fixed


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

Branch: refs/heads/ignite-484
Commit: f2b96e0b5b159034058278c7cfc94273caa07a77
Parents: 9c7274b
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed May 13 23:35:29 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed May 13 23:35:29 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/sql/GridSqlQuerySplitter.java         | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f2b96e0b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 5795a1e..df519b4 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -252,8 +252,9 @@ public class GridSqlQuerySplitter {
         assert from != null;
 
         if (from instanceof GridSqlJoin) {
-            for (int i = 0; i < from.size(); i++)
-                collectAllSpacesInFrom(from.child(i), spaces);
+            // Left and right.
+            collectAllSpacesInFrom(from.child(0), spaces);
+            collectAllSpacesInFrom(from.child(1), spaces);
         }
         else if (from instanceof GridSqlTable) {
             String schema = ((GridSqlTable)from).schema();
@@ -266,7 +267,7 @@ public class GridSqlQuerySplitter {
         else if (from instanceof GridSqlAlias)
             collectAllSpacesInFrom(from.child(), spaces);
         else if (!(from instanceof GridSqlFunction))
-            throw new IllegalStateException(from.getClass().getName());
+            throw new IllegalStateException(from.getClass().getName() + " : " + from.getSQL());
     }
 
     /**


Mime
View raw message