calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [02/15] calcite git commit: Add test case for 'select * as x' parser bug
Date Mon, 02 Oct 2017 21:00:02 GMT
Add test case for 'select * as x' parser bug


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

Branch: refs/heads/master
Commit: 43fa8e94249d796d0e42b366feb4a8c886994aa4
Parents: 7a98575
Author: Julian Hyde <jhyde@apache.org>
Authored: Mon Sep 11 15:58:17 2017 -0700
Committer: Julian Hyde <jhyde@apache.org>
Committed: Mon Oct 2 11:13:41 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/calcite/sql/parser/SqlParserTest.java     | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/43fa8e94/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
index e91a76c..117862e 100644
--- a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
@@ -699,6 +699,13 @@ public class SqlParserTest {
         "Lexical error at line 1, column 10\\.  Encountered: \"#\" \\(35\\), after : \"\"");
   }
 
+  // TODO: should fail in parser
+  @Test public void testStarAsFails() {
+    sql("select * as x from emp")
+        .ok("SELECT * AS `X`\n"
+            + "FROM `EMP`");
+  }
+
   @Test public void testDerivedColumnList() {
     check("select * from emp as e (empno, gender) where true",
         "SELECT *\n"


Mime
View raw message