Got it

What is the difference between LIKE and RLIKE operators in Hive?

Latest reply: Dec 29, 2021 14:41:19 22390 8 9 0 0

Hello, everyone! This post describes the difference between LIKE and RLIKE operators in Hive.

LIKE is an operator similar to LIKE in SQL. We use LIKE to search for string with similar text.

E.g. user_name LIKE ‘%Smith’


RLIKE (Right-Like) is a special function in Hive where if any substring of A matches with B then it evaluates to true. It also obeys Java regular expression pattern. Users don't need to put % symbol for a simple match in RLIKE.

Hive provides RLIKE operator that can be used for searching advanced Regular Expressions in Java.

E.g. user_name RLIKE ‘.(Smith|Sam).’

This will return user_name that has Smith or Sam in it.


Any further questions, let us know!


  • x
  • convention:

Phany
Created Jan 13, 2020 08:27:18

Rlike is an operator for Hive
View more
  • x
  • convention:

little_fish
little_fish Created Nov 9, 2020 05:47:27 (0) (0)
Yes, it's for Hive.  
Unicef
MVE Created Dec 29, 2021 03:26:27

No question for me
View more
  • x
  • convention:

user_4463975
Created Dec 29, 2021 04:12:41

oh good
View more
  • x
  • convention:

Mahedi
MVE Author Created Dec 29, 2021 05:59:26

Well described
View more
  • x
  • convention:

little_fish
little_fish Created Dec 29, 2021 07:26:14 (0) (0)
thanks.  
NgTrang
Created Dec 29, 2021 14:41:19

Thanks for sharing
View more
  • x
  • convention:

little_fish
little_fish Created May 6, 2022 09:41:10 (0) (0)
 

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.