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.

length function in hive


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s