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

Pengcheng Xiong commented on HIVE-15229:
----------------------------------------

[~simanchal], thanks for your patch. Did u try "rlike"? If rlike and like have 
the same function, a simple rewrite in parser would finish the job.

> 'like any' and 'like all' operators in hive
> -------------------------------------------
>
>                 Key: HIVE-15229
>                 URL: https://issues.apache.org/jira/browse/HIVE-15229
>             Project: Hive
>          Issue Type: New Feature
>          Components: Operators
>            Reporter: Simanchal Das
>            Assignee: Simanchal Das
>            Priority: Minor
>         Attachments: HIVE-15229.1.patch
>
>
> In Teradata 'like any' and 'like all' operators are mostly used when we are 
> matching a text field with numbers of patterns.
> 'like any' and 'like all' operator are equivalents of multiple like operator 
> like example below.
> {noformat}
> --like any
> select col1 from table1 where col2 like any ('%accountant%', '%accounting%', 
> '%retail%', '%bank%', '%insurance%');
> --Can be written using multiple like condition 
> select col1 from table1 where col2 like '%accountant%' or col2 like 
> '%accounting%' or col2 like '%retail%' or col2 like '%bank%' or col2 like 
> '%insurance%' ;
> --like all
> select col1 from table1 where col2 like all ('%accountant%', '%accounting%', 
> '%retail%', '%bank%', '%insurance%');
> --Can be written using multiple like operator 
> select col1 from table1 where col2 like '%accountant%' and col2 like 
> '%accounting%' and col2 like '%retail%' and col2 like '%bank%' and col2 like 
> '%insurance%' ;
> {noformat}
> Problem statement:
> Now a days so many data warehouse projects are being migrated from Teradata 
> to Hive.
> Always Data engineer and Business analyst are searching for these two 
> operator.
> If we introduce these two operator in hive then so many scripts will be 
> migrated smoothly instead of converting these operators to multiple like 
> operators.



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

Reply via email to