Finding the length of a string – Apache Hive & Apache Impala

The LENGTH() function returns the length of a string. Both leading and trailing spaces at the begin and end of the string is included when calculating the length. 

  • Note: The below specified function is common in both Apache Hive & Apache Impala.

Syntax: LENGTH(String)
This accepts both characters and numbers in the input but returns INT value.

Examples:
length function in hive

4 comments

Leave a Reply