hadoop
[hive] alter table 시 주의 사항
'김용환'
2016. 4. 19. 11:20
필드명과 주석에 쓰이는 문자열을 표시하는 기호가 다르다.
필드명은 `로 사용하고, 주석은 '로 사용한다.
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