背景
hive中遇到length函数不支持bigint
解决方法,sql转为string之后计算长度
SELECT COUNT(1)
FROM ( select msisdn FROM tb_nrmr_sample_lt_dd_total
where loc_time in
(23090201,23090202,23090203,23090204,23090205,23090206)
and length(cast(msisdn as string))=11 GROUP BY msisdn )A;