You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/05/27 03:19:58 UTC

[GitHub] [calcite] xy2953396112 commented on a change in pull request #1988: [CALCITE-4019] Visit SqlInsert with SqlShuttle cause NullPointerException

xy2953396112 commented on a change in pull request #1988:
URL: https://github.com/apache/calcite/pull/1988#discussion_r430128274



##########
File path: core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
##########
@@ -5747,6 +5748,17 @@ public void subTestIntervalMonthFailsValidation() {
         .ok("INTERVAL '0' MONTH(0)");
   }
 
+  @Test void testSqlParserPosPlus() throws Exception {
+    final String sql = "insert into emps select * from emps";
+    final SqlNode sqlNode = getSqlParser(sql).parseStmt();
+    sqlNode.accept(new SqlShuttle() {
+      @Override public SqlNode visit(SqlIdentifier identifier) {
+        return new SqlIdentifier(identifier.names,
+            identifier.getParserPosition());
+      }
+    });
+  }

Review comment:
       Thanks, add check for it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org