分号是sql的结束符,在hql中亦如此,但是hive对分号的识别没有那么智能,如下:select concat(
分号是sql的结束符,在hql中亦如此,,但是hive对分号的识别没有那么智能,如下:
select concat(';','aa') from lhc limit 1;
failed: parse error: line 1:13 cannot recognize input near '' '' '' in function specification
可见,hql只要遇见分号则认识是语句的eof。
解决如下
select concat('\073','aa')col from lhc limit 1;
col
;11
hive 的详细介绍:请点这里
hive 的下载地址:请点这里
相关阅读:
基于hadoop集群的hive安装
hive内表和外表的区别
hadoop + hive + map +reduce 集群安装部署
hive本地独立模式安装
hive学习之wordcount单词统计