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.

Hive and Impala produce different values for length of a String column

Hive and Impala produce different values for length of a String column

Explorer

It appears that Impala is counting 3 characters (226, 128,147) for what is displaying as 1 character (150) in the source system.

 

The query to get the results is:

SELECT investigateNode,

               LENGTH(investigateNode) AS datavalue

  FROM vw_closure where investigateNode like 'Malfunction%'

 

Hive returns 31 for the length. Impala returns 33 for the length.

 

 

The HDFS files are stored in Parquet format.

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here