Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

RPAD LPAD wrong results with special character

RPAD LPAD wrong results with special character

New Contributor

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