天天看点

处理hive中;分号字符

     分号是sql的结束符,在hql中亦如此,但是hive对分号的识别没有那么智能,如下:

select concat(';','aa') from lhc limit 1;

FAILED: Parse Error: line 1:13 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in function specification

可见,hql只要遇见分号则认识是语句的EOF。

解决如下

select concat('\073','aa')col from lhc limit 1;

col

;11