如何计算Apache Pig中字符串的长度?

Kee*_* Kn 4 apache-pig

在pig中,substring函数有三个参数,我需要从第4个位置获取子串到字符串的长度.

所以我指定:

substring(division,4,string.length(division))
Run Code Online (Sandbox Code Playgroud)

它显示错误 Could not resolve string.LENGTH using imports:.如何找到猪的弦长?

Fre*_*ric 6

您可以使用SIZE.

SUBSTRING(分裂,4,SIZE(除法))