[ 
https://issues.apache.org/jira/browse/SPARK-31262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Takeshi Yamamuro updated SPARK-31262:
-------------------------------------
    Component/s: Tests

> Test case import another test case contains bracketed comments, can't display 
> bracketed comments in golden files well.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-31262
>                 URL: https://issues.apache.org/jira/browse/SPARK-31262
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL, Tests
>    Affects Versions: 3.1.0
>            Reporter: jiaan.geng
>            Assignee: jiaan.geng
>            Priority: Major
>             Fix For: 3.0.0
>
>
> The content of 
> {code:java}
> nested-comments.sql 
> {code} show below:
> {code:java}
> -- This test case just used to test imported bracketed comments.
> -- the first case of bracketed comment
> --QUERY-DELIMITER-START
> /* This is the first example of bracketed comment.
> SELECT 'ommented out content' AS first;
> */
> SELECT 'selected content' AS first;
> --QUERY-DELIMITER-END
> {code}
> The test case 
> {code:java}
> comments.sql 
> {code} imports 
> {code:java}
> nested-comments.sql
> {code}
>  below:
> {code:java}
> --IMPORT nested-comments.sql
> {code}
> The output will be:
> {code:java}
> -- !query
> /* This is the first example of bracketed comment.
> SELECT 'ommented out content' AS first
> -- !query schema
> struct<>
> -- !query output
> org.apache.spark.sql.catalyst.parser.ParseException
> mismatched input '/' expecting {'(', 'ADD', 'ALTER', 'ANALYZE', 'CACHE', 
> 'CLEAR', 'COMMENT', 'COMMIT', 'CREATE', 'DELETE', 'DESC', 'DESCRIBE', 'DFS', 
> 'DROP', 
> 'EXPLAIN', 'EXPORT', 'FROM', 'GRANT', 'IMPORT', 'INSERT', 'LIST', 'LOAD', 
> 'LOCK', 'MAP', 'MERGE', 'MSCK', 'REDUCE', 'REFRESH', 'REPLACE', 'RESET', 
> 'REVOKE', '
> ROLLBACK', 'SELECT', 'SET', 'SHOW', 'START', 'TABLE', 'TRUNCATE', 'UNCACHE', 
> 'UNLOCK', 'UPDATE', 'USE', 'VALUES', 'WITH'}(line 1, pos 0)
> == SQL ==
> /* This is the first example of bracketed comment.
> ^^^
> SELECT 'ommented out content' AS first
> -- !query
> */
> SELECT 'selected content' AS first
> -- !query schema
> struct<>
> -- !query output
> org.apache.spark.sql.catalyst.parser.ParseException
> extraneous input '*/' expecting {'(', 'ADD', 'ALTER', 'ANALYZE', 'CACHE', 
> 'CLEAR', 'COMMENT', 'COMMIT', 'CREATE', 'DELETE', 'DESC', 'DESCRIBE', 'DFS', 
> 'DROP', 'EXPLAIN', 'EXPORT', 'FROM', 'GRANT', 'IMPORT', 'INSERT', 'LIST', 
> 'LOAD', 'LOCK', 'MAP', 'MERGE', 'MSCK', 'REDUCE', 'REFRESH', 'REPLACE', 
> 'RESET', 'REVOKE', 'ROLLBACK', 'SELECT', 'SET', 'SHOW', 'START', 'TABLE', 
> 'TRUNCATE', 'UNCACHE', 'UNLOCK', 'UPDATE', 'USE', 'VALUES', 'WITH'}(line 1, 
> pos 0)
> == SQL ==
> */
> ^^^
> SELECT 'selected content' AS first
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to