You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chen (Jira)" <ji...@apache.org> on 2020/02/20 04:33:00 UTC
[jira] [Resolved] (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 ]
Danny Chen resolved CALCITE-3771.
---------------------------------
Fix Version/s: 1.22.0
Assignee: Danny Chen
Resolution: Fixed
Fixed in [5fa4160|https://github.com/apache/calcite/commit/5fa41609cb0fe310a0a11d86319d861423850a36], thanks for your PR [~dhirenda.gautam] !
> 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
> Assignee: Danny Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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)