hive中将string数据转为bigint的操作

上传:工程甲 浏览: 20 推荐: 0 文件:PDF 大小:30.61KB 上传时间:2020-12-16 13:01:58 版权申诉
使用 CAST 函数将 STRING 转为 BIGINT: SELECT CAST(‘00321’ AS BIGINT) FROM table; As a BIGINT it will show on the screen and in delimited text files as 321. 参考:Hive – Converting a string to bigint 补充知识:hive中bigint和varchar字段做关联,关联数据错误的解决方法 把bigint和varchar都隐式转换成String类型的就可以关联出正确的结果了 cast(t1.PARTY_NUM as str
上传资源
用户评论