关于string类型只能转换为double数字类型进行排序
case1:
select cast(num as double) as num1
from (
select DISTINCT regexp_replace(categories,'\[|\]','') as num
from table_name
WHERE dt=20180115
and categories is not null
)
ORDER BY num1
关于string类型只能转换为double数字类型进行排序
case1:
select cast(num as double) as num1
from (
select DISTINCT regexp_replace(categories,'\[|\]','') as num
from table_name
WHERE dt=20180115
and categories is not null
)
ORDER BY num1
本文标题:3-Hive类型隐式转换
本文链接:https://www.haomeiwen.com/subject/wwoxzxtx.html
网友评论