ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [23/50] ignite git commit: Fixed GridQueryParsingTest.
Date Wed, 14 Sep 2016 11:10:39 GMT
Fixed GridQueryParsingTest.


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

Branch: refs/heads/ignite-3661
Commit: e23a94fbab4040f60b7a8ef3638aaebe4b9ba5f6
Parents: 8970b3e
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Sep 6 11:34:14 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Sep 6 11:34:14 2016 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/e23a94fb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index cf000e9..d559d2e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -292,7 +292,10 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      * @param sql2 Sql 2.
      */
     private void assertSqlEquals(String sql1, String sql2) {
-        assertEquals(normalizeSql(sql1), normalizeSql(sql2));
+        String nsql1 = normalizeSql(sql1);
+        String nsql2 = normalizeSql(sql2);
+
+        assertEquals(nsql1, nsql2);
     }
 
     /**
@@ -301,7 +304,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
     private static String normalizeSql(String sql) {
         return sql.toLowerCase()
             .replaceAll("/\\*(?:.|\r|\n)*?\\*/", " ")
-            .replaceAll("\\s*on\\s+1\\s*=\\s*1\\s*", " ")
+            .replaceAll("\\s*on\\s+1\\s*=\\s*1\\s*", " on true ")
             .replaceAll("\\s+", " ")
             .replaceAll("\\( +", "(")
             .replaceAll(" +\\)", ")")
@@ -314,9 +317,9 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
     private void checkQuery(String qry) throws Exception {
         Prepared prepared = parse(qry);
 
-        GridSqlQueryParser ses = new GridSqlQueryParser();
+        GridSqlQuery gQry = new GridSqlQueryParser().parse(prepared);
 
-        String res = ses.parse(prepared).getSQL();
+        String res = gQry.getSQL();
 
         System.out.println(normalizeSql(res));
 


Mime
View raw message