2

这是我对 impala-shell 的创建语句:

CREATE  TABLE IF NOT EXISTS tmp.demo0011(
  uid Bigint, comment'用户uid'
  nick String, comment'昵称'
  primary key(uid)
)
partition by hash(uid) partitions 128
stored as kudu
tblproperties (
  'kudu.master_addresses'='10.10.10.1'
);

当我进入时,desc tmp.demo0011;我得到:

+--------+--------+---------+
| 姓名 | 类型 | 评论 |
+--------+--------+---------+
| uid | 大整数 | |
| 尼克 | 字符串 | |
+--------+--------+---------+

评论区什么都没有。为什么?

谢谢。

4

2 回答 2

1

好吧,我知道为什么。

当我进入时:

alter table demo0011 change uid uid bigint comment 'test comment';

我得到:

错误:AnalysisException:Kudu 不支持列注释。

于 2018-10-25T01:44:58.587 回答
0
CREATE TABLE test_db.babylist
(
    id INT COMMENT 'Comment of ID Column',
    patient_name STRING,
    mother_name STRING,
    Primary key (id)
)
PARTITION BY HASH(id) PARTITIONS 3 
COMMENT 'Comment of Table' 
STORED AS KUDU;

ALTER TABLE test_db.babylist CHANGE patient_name patient_name string COMMENT 'Comment of Column-patient_name';

DESCRIBE test_db.babylist;

ALTER TABLE test_db.babylist ALTER COLUMN id SET COMMENT 'Comment of Column-id';

DESCRIBE test_db.babylist

ALTER TABLE stest_db.babylist ADD COLUMN IF NOT EXISTS father_name string;

DESCRIBE test_db.babylist;

ALTER TABLE test_db.babylist DROP COLUMN mother_name;

DESCRIBE test_db.babylist;

ALTER TABLE test_db.babylist ALTER COLUMN father_name SET COMMENT 'Comment of Column-father_name';

在此处输入图像描述

于 2021-08-18T04:44:07.763 回答