建议使用以下浏览器,以获得最佳体验。 ie 9.0 以上版本 chrome 31 谷歌浏览器 firefox 30 火狐浏览器
温馨提示

抱歉,您需设置社区昵称后才能参与社区互动!

前往修改
我再想想
选择版块
数仓gaussdb(dws) 主题:3048帖子:12763

【 维护宝典-业务报错】

建表报错:error: there is no hash distributable column

5 小时前 52

【问题现象】建表时出现报错:error:  there is no hash distributable column/column %s is not a hash distributable data type

【问题原因】创建hash表时没有可用的分布列

目前,支持做分布列的类型有:int1,int2,int4,int8,numeric,char,varchar,bpchar,nvarchar2,date,timestamp,uuid,interval,text等。

因此,当创建的表中没有可用的分布键或指定的分布键列类型不支持时就会出现相关报错:

test_db=# create table t(a float);
error:  there is no hash distributable column
test_db=# 
test_db=# create table t(a float, b int) distribute by hash(a);
error:  column a is not a hash distributable data type
test_db=# 

【解决方法】增加一个可以用作分布列类型的字段,或修改现有类型:

test_db=# create table t(a float, b int);
notice:  the 'distribute by' clause is not specified. using 'b' as the distribution column by default.
hint:  please use 'distribute by' clause to specify suitable data distribution column.
create table
test_db=# 
test_db=# create table t2(a float, b int) distribute by hash(b);
create table
test_db=# 
test_db=# 
test_db=# create table t3(a numeric);
notice:  the 'distribute by' clause is not specified. using 'a' as the distribution column by default.
hint:  please use 'distribute by' clause to specify suitable data distribution column.
create table
test_db=# 

回复3

0 0
2022/6/6 21:39

感谢精彩分享 
                                          -- 高级云网管

0 0
2022/6/6 21:52

感谢分享

0 0
2022/6/6 22:12

感谢分享

上划加载中
直达楼层
全部回复
正序浏览
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 4008云顶国际网站的解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

建表报错:error: there is no hash distributable column-4008云顶国际网站

您已采纳当前回复为最佳回复

发帖: 37粉丝: 8

级别 : 版主

52 3
[业务报错] 建表报错:error: there is no hash distributable column

【问题现象】建表时出现报错:error:  there is no hash distributable column/column %s is not a hash distributable data type

【问题原因】创建hash表时没有可用的分布列

目前,支持做分布列的类型有:int1,int2,int4,int8,numeric,char,varchar,bpchar,nvarchar2,date,timestamp,uuid,interval,text等。

因此,当创建的表中没有可用的分布键或指定的分布键列类型不支持时就会出现相关报错:

test_db=# create table t(a float);
error:  there is no hash distributable column
test_db=# 
test_db=# create table t(a float, b int) distribute by hash(a);
error:  column a is not a hash distributable data type
test_db=# 

【解决方法】增加一个可以用作分布列类型的字段,或修改现有类型:

test_db=# create table t(a float, b int);
notice:  the 'distribute by' clause is not specified. using 'b' as the distribution column by default.
hint:  please use 'distribute by' clause to specify suitable data distribution column.
create table
test_db=# 
test_db=# create table t2(a float, b int) distribute by hash(b);
create table
test_db=# 
test_db=# 
test_db=# create table t3(a numeric);
notice:  the 'distribute by' clause is not specified. using 'a' as the distribution column by default.
hint:  please use 'distribute by' clause to specify suitable data distribution column.
create table
test_db=# 

分享文章到朋友圈

分享文章到微博
您已采纳当前回复为最佳回复

发帖: 58粉丝: 10

发表于2022年06月06日 21:39:07

感谢精彩分享 
                                          -- 高级云网管

您已采纳当前回复为最佳回复

红鲤鱼与绿鲤鱼

发帖: 2粉丝: 2

发表于2022年06月06日 21:52:35

感谢分享

您已采纳当前回复为最佳回复

慕雪

发帖: 2粉丝: 2

发表于2022年06月06日 22:12:42

感谢分享

您需要登录后才可以回帖 | 立即注册

您对问题的回复是否满意?
满意度
非常满意 满意 一般 不满意
我要反馈
0/200
网站地图