Repository: ignite
Updated Branches:
  refs/heads/master 2c13a0156 -> 4232692d7


IGNITE-8432: SQL: additional tests for CREATE TABLE parsing. This closes #5429.


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

Branch: refs/heads/master
Commit: 4232692d790e40bcf100e866df4f6d66dccd518d
Parents: 2c13a01
Author: Pavel Kuznetsov <[email protected]>
Authored: Mon Dec 10 11:58:07 2018 +0300
Committer: devozerov <[email protected]>
Committed: Mon Dec 10 11:58:07 2018 +0300

----------------------------------------------------------------------
 .../query/h2/sql/GridQueryParsingTest.java          | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4232692d/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 1a4b248..9021a03 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
@@ -632,6 +632,22 @@ public class GridQueryParsingTest extends 
GridCommonAbstractTest {
 
         assertParseThrows("create table Int (_key int primary key, _val int) 
WITH \"template=cache\"",
             IgniteSQLException.class, "Direct specification of _KEY and _VAL 
columns is forbidden");
+
+        assertParseThrows("create table Person (" +
+                "unquoted_id LONG, " +
+                "\"quoted_id\" LONG, " +
+                "PERSON_NAME VARCHAR(255), " +
+                "PRIMARY KEY (UNQUOTED_ID, quoted_id)) " +
+                "WITH \"template=cache\"",
+            IgniteSQLException.class, "PRIMARY KEY column is not defined: 
QUOTED_ID");
+
+        assertParseThrows("create table Person (" +
+                "unquoted_id LONG, " +
+                "\"quoted_id\" LONG, " +
+                "PERSON_NAME VARCHAR(255), " +
+                "PRIMARY KEY (\"unquoted_id\", \"quoted_id\")) " +
+                "WITH \"template=cache\"",
+            IgniteSQLException.class, "PRIMARY KEY column is not defined: 
unquoted_id");
     }
 
     /** */

Reply via email to