Hi Ravi,

Quite an interesting literal :) Indeed It doesn't look valid.

Probably you are hitting a bug, please create a JIRA and include also the
original query that you are trying to parse.

Best,
Stamatis

On Wed, Nov 10, 2021 at 7:32 AM Ravi Kapoor <[email protected]> wrote:

> Hi Team,
> As per https://issues.apache.org/jira/browse/CALCITE-3147
> the triple quoted string for BigQuerySqlDialect should also be
> supported in case of query falls in multiple lines.
> However, I cannot see it working. Neither do we have a test case
> supporting the use case.
> Can you please provide some insights on that?
>
> I have a use case where RexLiteral value falls under multiple new
> lines in BQ dialect and the
> unparsed string generated as shown:
>
> 'SELECT wuaht_.report_access_brch_cd as branch_cd,
>                     wuaht_.report_access_brch_nm AS branch_name
>              FROM   BRCH_INCTV_PROD_DATA.wire_user_access_hier_1 as wuaht_
>              WHERE  wuaht_.system_access_swb_prsn_id = ?
>              GROUP BY 1,2;';  -> RexLiteral
> which fails in validation.
>
> I can set it as .withLiteralQuoteString(" ''' ") to the context
> But that would make all literals wrapped in triple quotes.
> Can we wrap it in triple quotes only when drills down to multiple lines?
>
> Thanks,
> Ravi
>

Reply via email to