带有分号 ';' 的 ParseException
ParseException with semicolon ';'
我正在尝试 select 一些带有字符串常量的数据。有一个
ParseException line 3:21 cannot recognize input near '<EOF>'
添加“=”、“;”后迹象。
select
t.*,
concat('=test;',t.id),
t.other_id
from service t;
你能告诉我问题是什么以及如何解决吗?
问题只出在分号上。它需要逃避。用双斜线转义分号 \;
或替换为 3
.
在 hive cli 中都工作正常。在直线中使用 3
.
查询更改:
concat('=test\;',t.id)
或
concat('=test3',t.id)
我正在尝试 select 一些带有字符串常量的数据。有一个
ParseException line 3:21 cannot recognize input near '<EOF>'
添加“=”、“;”后迹象。
select
t.*,
concat('=test;',t.id),
t.other_id
from service t;
你能告诉我问题是什么以及如何解决吗?
问题只出在分号上。它需要逃避。用双斜线转义分号 \;
或替换为 3
.
在 hive cli 中都工作正常。在直线中使用 3
.
查询更改:
concat('=test\;',t.id)
或
concat('=test3',t.id)