I have a hive column value stored as string
[[1,2],[3,4,8],[5,6,7,9]]
I need to find out the length of each inner array. How should i go about it ?
Basically i need a query that sums up the sizes of each inner array. Had this column been stored as an array of arrays, i would do something like this
select sum(size(innerArray)) from myTab lateral view explode (mycol) arr as innerArray;
but now when i try the above, i get
FAILED: UDFArgumentException explode() takes an array or a map as a parameter