Saturday 17 December 2022

Hive: rpad: Pad the character at right side of string

Signature

rpad(string str, int len, string pad)

 

Pad the characters to the string at right side until the string reaches to given length.

hive> SELECT rpad('He', 5, 'X');
OK
_c0
HeXXX
Time taken: 0.04 seconds, Fetched: 1 row(s)
hive> ;
hive> SELECT rpad('He', 4, 'X');
OK
_c0
HeXX
Time taken: 0.037 seconds, Fetched: 1 row(s)

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment