You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2020/01/08 02:14:00 UTC

[jira] [Resolved] (CALCITE-3663) Support for TRIM function in Bigquery dialect

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

Chunwei Lei resolved CALCITE-3663.
----------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in [f6b939dc91b1daadb366a6d8bebcdc743d156dc2|https://github.com/apache/calcite/commit/f6b939dc91b1daadb366a6d8bebcdc743d156dc2]. Thanks for the pr, [~dhirenda.gautam]!

> Support for TRIM function in Bigquery dialect
> ---------------------------------------------
>
>                 Key: CALCITE-3663
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3663
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Dhirenda Gautam
>            Priority: Major
>             Fix For: 1.22.0
>
>
> In current Calcite implementation for query : SELECT TRIM('ABC') for  big-query Dialect it translated into SELECT TRIM(BOTH ' ' FROM 'ABC') .
> But the appropriate query for BigQuery is :: SELECT TRIM('ABC')
> Similarly below query
> SELECT TRIM(BOTH 'a' from 'ABC') 
> SELECT TRIM(LEADING ' ' from 'ABC') 
> SELECT TRIM(TRAILING ' ' from 'ABC') are translated into invalid BigQuery query.
> Unparse logic for the trim has been handle in BigQuery dialect to convert the source Trim query into valid bigQuery query.



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