VoodooChild VoodooChild - 5 months ago 16
SQL Question

How to get maximum size used by a string in Hive?

I want to know the maximum length a particular string column is taking.
I tried taking the approached mentioned here :
how to get the max size used by a field in table but did not work in Hive
but that did not work in Hive.


In that example they use len, use length instead:

select max(length(mycolumn)) from mytable;

This works fine in hive QL.