You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Justin Swett (Jira)" <ji...@apache.org> on 2020/10/28 20:46:00 UTC

[jira] [Commented] (CALCITE-4361) BigQuery comments starting with # cause SqlParseException

    [ https://issues.apache.org/jira/browse/CALCITE-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17222450#comment-17222450 ] 

Justin Swett commented on CALCITE-4361:
---------------------------------------

Should also add a # inside "" scenario too
{code:java}
select * from
 (select "# testing")
 union all
 (select "foo") # this is also a comment
 # this is a comment
 union all
 (select "baz")
 # union all 
 # (select "nope"){code}

> BigQuery comments starting with # cause SqlParseException
> ---------------------------------------------------------
>
>                 Key: CALCITE-4361
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4361
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel
>            Reporter: Justin Swett
>            Priority: Minor
>
> Unable to parse big query sql statements that use #.
>  
> {code:java}
> @Test void testBigQueryHashtagComments(){
>   final String s = "select * from \n" +
>       "  (select 1 as foo)\n" +
>       "  union all\n" +
>       "  # (select 2)\n" +
>       "  (select 3) # something useful to be said about this line";
>   sql(s).withConformance(SqlConformanceEnum.BIG_QUERY).ok();
> }
> {code}
>  
>  



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