You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/18 15:23:18 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #4268: Return parse error for invalid sql syntax

andygrove commented on code in PR #4268:
URL: https://github.com/apache/arrow-datafusion/pull/4268#discussion_r1026566442


##########
datafusion/sql/src/parser.rs:
##########
@@ -715,6 +715,17 @@ mod tests {
             "CREATE EXTERNAL TABLE t STORED AS x OPTIONS ('k1' 'v1', k2 v2, k3) LOCATION 'blahblah'";
         expect_parse_error(sql, "sql parser error: Expected literal string, found: )");
 
+        // Error case: `with header` is an invalid syntax
+        let sql = "CREATE EXTERNAL TABLE t STORED AS CSV WITH HEADER LOCATION 'abc'";
+        expect_parse_error(sql, "sql parser error: Expected LOCATION, found: WITH");
+
+        // Error case: `with header` is an invalid syntax

Review Comment:
   nit: comment seems incorrect here



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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