当我尝试将注释添加到我的Hive表时,
ALTER TABLE table1 SET TBLPROPERTIES ('comment' = new_comment);
我收到以下错误:
FAILED: ParseException line 1:64 mismatched input 'new_comment' expecting StringLiteral near '=' in specifying key/value property
任何人都知道如何正确添加评论?
答案 0 :(得分:8)
评论需要是带引号的字符串。例如,这些应该有效:
ALTER TABLE table1 SET TBLPROPERTIES ('comment' = 'Hello World!');
ALTER TABLE table1 SET TBLPROPERTIES ('comment' = "Hello World!");