[alibaba/druid]hive解析异常(多种情况)

2025-11-11 667 views
7

貌似无法解析hive里的 ! 符号 例如: select * from bi.aaa where !array_contains(list, cc_id)

com.alibaba.druid.sql.parser.ParserException: pos 28, line 1, column 28, token !

回答

6

from insert 时,from 不支持join from (select name,address from test1) t1 left join (select name,school from test2) t2 on t2.name = t1.name insert overwrite table tt1 select name,address,school insert overwrite table tt2 select name,address

com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'test1) t1 left join (select name,school ', expect INSERT, actual LEFT, pos 45, line 1, column 42, token LEFT

3

set语法,ip配置,冒号报错

set test.url=xx.test.com:8808;

com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'test.com:8808; , pos 25, line 1, column 25, token :

6

alter set location ALTER TABLE bi.bi_xxx_external SET LOCATION 'hdfs://nameservice1/user/hive/warehouse/bi.db/bi_xxx/pt=aaa';

com.alibaba.druid.sql.parser.ParserException: TODO pos 65, line 1, column 58, token IDENTIFIER LOCATION