当我尝试向 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
有人知道如何正确添加评论吗?
最佳答案
注释必须是带引号的字符串。例如,这些应该有效:
ALTER TABLE table1 SET TBLPROPERTIES ('comment' = 'Hello World!');
ALTER TABLE table1 SET TBLPROPERTIES ('comment' = "Hello World!");
关于Hive - 向表添加注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20356688/