You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jacky Woo (JIRA)" <ji...@apache.org> on 2019/07/31 08:14:00 UTC
[jira] [Comment Edited] (CALCITE-3220) HiveSqlDialect transform
function trim to correct hive format
[ https://issues.apache.org/jira/browse/CALCITE-3220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16896895#comment-16896895 ]
Jacky Woo edited comment on CALCITE-3220 at 7/31/19 8:13 AM:
-------------------------------------------------------------
ok, pr link attached.
[https://github.com/apache/calcite/pull/1342]
was (Author: jackywoo):
ok, pr link attached.
> HiveSqlDialect transform function trim to correct hive format
> -------------------------------------------------------------
>
> Key: CALCITE-3220
> URL: https://issues.apache.org/jira/browse/CALCITE-3220
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.19.0
> Reporter: Jacky Woo
> Priority: Minor
>
> Let's assume sql = SELECT TRIM(' str ')
> When we use HiveSqlDialect and transform "sql", we expect SELECT TRIM(' str '),but get SELECT TRIM(BOTH ' ' FROM ' str ') which is incorrect sql format in hive.
> So maybe HiveSqlDialect behavior should be changed when transform function trim:
> # {{SELECT TRIM(' str ') => SELECT TRIM(' str ') }}
> # {{SELECT TRIM(BOTH ' ' from ' str ') => SELECT TRIM(' str ')}}
> # {{SELECT TRIM(LEADING ' ' from ' str ') => SELECT LTRIM(' str ')}}
> # {{SELECT TRIM(TRAILING ' ' from ' str ')=> SELECT RTRIM(' str ') }}
> {{This is the linked github pr #1342 [https://github.com/apache/calcite/pull/1342]}}
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)