我执行"ALTER TABLE table_name CHANGE COLUMN col_name col_name column_type COMMENT col_comment;"
向表中添加注释,我成功了。在蜂巢中,我对表进行了描述,我得到了这样的信息:
hive> desc mytable;
+---------+----------+---------+
|col_name |data_type |comment |
|---------+----------+---------+
|col1 |string |name |
+---------+----------+---------+
但是在spark-sql中,注释消失了:
spark-sql> desc mytable;
+---------+----------+---------+
|col_name |data_type |comment |
|---------+----------+---------+
|col1 |string |null |
+---------+----------+---------+
顺便说一下,我将MySQL用于metastore。 如何在spark-sql中获得评论?