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

Miklos Csanady commented on HIVE-10701:
---------------------------------------

According to 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-string
"Hive uses C-style escaping within the strings."

1: jdbc:hive2://> select 's''2' ;
OK
+------+
| _c0  |
+------+
| s2   |
+------+
1 row selected (0.051 seconds)
1: jdbc:hive2://> select 's\'2' ;
OK
+------+
| _c0  |
+------+
| s'2  |
+------+

IMHO the '' is not meant to be an escape-sequence, but two string literals.


> Escape apostrophe not work properly
> -----------------------------------
>
>                 Key: HIVE-10701
>                 URL: https://issues.apache.org/jira/browse/HIVE-10701
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 0.12.0, 0.13.0, 0.14.0
>            Reporter: Tracy Y
>            Priority: Minor
>
> SELECT  'S''2'  FROM table return S2 instead of S'2
> The apostrophe suppose to be escaped by the single quote in front.  
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to