You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (Jira)" <ji...@apache.org> on 2020/03/26 23:11:00 UTC

[jira] [Resolved] (SPARK-31262) Test case import another test case contains bracketed comments, can't display bracketed comments in golden files well.

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

Takeshi Yamamuro resolved SPARK-31262.
--------------------------------------
    Fix Version/s: 3.0.0
         Assignee: jiaan.geng
       Resolution: Fixed

Resolved by [https://github.com/apache/spark/pull/28018#]

> 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
>    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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org