필드명과 주석에 쓰이는 문자열을 표시하는 기호가 다르다.


필드명은 `로 사용하고, 주석은 '로 사용한다.



hive> ALTER TABLE  users ADD COLUMNS (`json` string, `timezone` string COMMENT `timezone of user`);

mismatched input 'timezone of user' expecting StringLiteral near 'COMMENT' in column specification




hive> ALTER TABLE  users ADD COLUMNS (`json` string, `timezone` string COMMENT 'timezone of user');

OK


Posted by 김용환 '김용환'

댓글을 달아 주세요