Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
dcd6e301
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dcd6e301
编写于
10月 08, 2018
作者:
J
Jamie McAtamney
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bad variable name
Authored-by:
N
Jamie McAtamney
<
jmcatamney@pivotal.io
>
上级
20d55451
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
4 deletion
+4
-4
gpMgmt/bin/gpexpand
gpMgmt/bin/gpexpand
+4
-4
未找到文件。
gpMgmt/bin/gpexpand
浏览文件 @
dcd6e301
...
...
@@ -2274,14 +2274,14 @@ class ExpandTable():
status_conn
.
commit
()
def
expand
(
self
,
table_conn
,
cancel_flag
,
num_segments
):
foo
=
self
.
distrib_policy_names
.
strip
()
policy_names
=
self
.
distrib_policy_names
.
strip
()
new_storage_options
=
''
if
self
.
storage_options
:
new_storage_options
=
','
+
self
.
storage_options
(
schema_name
,
table_name
)
=
self
.
fq_name
.
split
(
'.'
)
logger
.
info
(
"Distribution policy for table %s is '%s' "
%
(
self
.
fq_name
.
decode
(
'utf-8'
),
foo
.
decode
(
'utf-8'
)))
logger
.
info
(
"Distribution policy for table %s is '%s' "
%
(
self
.
fq_name
.
decode
(
'utf-8'
),
policy_names
.
decode
(
'utf-8'
)))
#
The
UPDATE
query
below
updates
the
numsegments
value
on
the
master
only
.
#
The
following
ALTER
TABLE
query
updates
the
segment
values
as
part
of
the
redistribution
process
.
...
...
@@ -2290,11 +2290,11 @@ class ExpandTable():
if
self
.
distrib_policy_type
.
strip
()
==
'r'
:
sql
+=
'ALTER TABLE ONLY "%s"."%s" SET WITH(REORGANIZE=TRUE%s) DISTRIBUTED REPLICATED'
%
(
schema_name
,
table_name
,
new_storage_options
)
elif
foo
==
""
or
foo
==
"None"
or
foo
is
None
:
elif
policy_names
==
""
or
policy_names
==
"None"
or
policy_names
is
None
:
sql
+=
'ALTER TABLE ONLY "%s"."%s" SET WITH(REORGANIZE=TRUE%s) DISTRIBUTED RANDOMLY'
%
(
schema_name
,
table_name
,
new_storage_options
)
else
:
dist_cols
=
foo
.
split
(
','
)
dist_cols
=
policy_names
.
split
(
','
)
dist_cols
=
[
'"%s"'
%
x
.
strip
()
for
x
in
dist_cols
]
dist_cols
=
','
.
join
(
dist_cols
)
sql
+=
'ALTER TABLE ONLY "%s"."%s" SET WITH(REORGANIZE=TRUE%s) DISTRIBUTED BY (%s)'
%
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录