[ 
https://issues.apache.org/jira/browse/HIVE-27488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742056#comment-17742056
 ] 

Stamatis Zampetakis commented on HIVE-27488:
--------------------------------------------

It's not clear from the description if the problem is in the trim function or 
in the literal representation. It seems that the problem is somehow related to 
escaping the single quote character inside literals.

Why do we care about how Oracle does it? Shouldn't we follow Hive's rules?

Does Hive allow escaping single quotes by doubling the character? 

> HPL/SQL Quote literals not behaving as expected
> -----------------------------------------------
>
>                 Key: HIVE-27488
>                 URL: https://issues.apache.org/jira/browse/HIVE-27488
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>            Reporter: Dayakar M
>            Assignee: Dayakar M
>            Priority: Major
>              Labels: pull-request-available
>
> HPL/SQL Quote literals not behaving as expected when compared to Oracle's 
> PL/SQL.
>  
> DECLARE
> begin
> dbms_output.put_line(trim('a''a'));
> dbms_output.put_line(trim('''a'));
> dbms_output.put_line(trim('a'''));
> end;
>  
> {noformat}
> Oracle Output:
> a'a
> 'a
> a'
> {noformat}
>  
> {noformat}
> Hive Output
> INFO : a'a
> INFO : 'a
> INFO : a{noformat}
> Hive does not match the Oracle results for trim('a'''). Please check
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to