直接举例子:
hive> select dp_android_dlu,
video_android_dlu
from video_mertics where p_date=20141204;
4250015 890699
Time taken: 75.391 seconds
hive> select dp_android_dlu, p from video_mertics
lateral view explode(split(video_android_dlu,'06')) nouseTmptable as p
where p_date=20141204;
4250015 89
4250015 99
Time taken: 77.124 seconds
重点是红色粗体部分!
Spark SQL上一样可以运行。