Wednesday 14 December 2022

Hive: find_in_set: Find the occurrence of a string in given list of strings

find_in_set(string search_string, string source_string_list)

 Search for the occurrence of a string in given string list. This method return 0 if no occurrence found.

hive> SELECT find_in_set('World','Hello,World,Program');
OK
_c0
2
Time taken: 0.045 seconds, Fetched: 1 row(s)
hive> ;
hive> ;
hive> SELECT find_in_set('World1','Hello,World,Program');
OK
_c0
0
Time taken: 0.044 seconds, Fetched: 1 row(s)

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment