Reply
Highlighted
New Contributor
Posts: 7
Registered: ‎04-28-2015

RPAD LPAD wrong results with special character

[ Edited ]

Good evening,

I have a strange issue, on our CDH 5.10.2 Cluster using lpad or rpad on hive with special characters returns wrong results.

Example:

select length(lpad("è",50,' '));

result is 49 and obviously should be 50

select length(lpad("e",50,' '));

result is correctly 50, so if special characters are involved lpad and rpad gives wrong results.

 

I'm I missing something? or is it a bug

 

LANG is setted to UTF8

 

Thanks

 

 

Announcements