You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/02/05 13:57:00 UTC

[jira] [Updated] (CALCITE-3771) Support of TRIM function for SPARK dialect and improvement in HIVE Dialect

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

ASF GitHub Bot updated CALCITE-3771:
------------------------------------
    Labels: pull-request-available  (was: )

> Support of TRIM function for SPARK dialect and improvement in HIVE Dialect
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-3771
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3771
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Dhirenda Gautam
>            Priority: Major
>              Labels: pull-request-available
>
> In current Calcite implementation for query : SELECT TRIM('ABC') for SPARK Dialect it gets translated into SELECT TRIM(BOTH ' ' FROM 'ABC') .
> But the proper query for SPARK is :: SELECT TRIM('ABC')
> Unparse logic for the trim has been handled in Spark dialect to convert the source Trim query into valid SPARK query.
>  
> Also,In HIVE/SPARK dialect TRIM with two operand is not supported
> Eg: SELECT TRIM(BOTH 'a' from 'ABC') So its equivalent is REGEXP_REPLACE which is handle in unparseTrim function.



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