未验证 提交 dfbfc2b5 编写于 作者: H Hao Wu 提交者: GitHub

Remove dead else code for AO, since the condition is always true (#7186)

Gp_role is asserted to GP_ROLE_DISPATCH
上级 90030cc7
......@@ -1769,16 +1769,10 @@ aorow_compression_ratio_internal(Relation parentrel)
*/
aosegrel = heap_open(segrelid, AccessShareLock);
initStringInfo(&sqlstmt);
if (Gp_role == GP_ROLE_DISPATCH)
appendStringInfo(&sqlstmt, "select sum(eof), sum(eofuncompressed) "
"from gp_dist_random('%s.%s')",
get_namespace_name(RelationGetNamespace(aosegrel)),
RelationGetRelationName(aosegrel));
else
appendStringInfo(&sqlstmt, "select eof, eofuncompressed "
"from %s.%s",
get_namespace_name(RelationGetNamespace(aosegrel)),
RelationGetRelationName(aosegrel));
appendStringInfo(&sqlstmt, "select sum(eof), sum(eofuncompressed) "
"from gp_dist_random('%s.%s')",
get_namespace_name(RelationGetNamespace(aosegrel)),
RelationGetRelationName(aosegrel));
heap_close(aosegrel, AccessShareLock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册