Fix the naming of output columns of append node

上级 547b33ed
......@@ -3588,7 +3588,7 @@ CTranslatorDXLToPlStmt::PappendFromDXLAppend
TargetEntry *pte = MakeNode(TargetEntry);
pte->expr = (Expr *) pvar;
pte->resname = CTranslatorUtils::SzFromWsz(pdxlopScIdent->Pdxlcr()->Pmdname()->Pstr()->Wsz());
pte->resname = CTranslatorUtils::SzFromWsz(pdxlopPrel->PmdnameAlias()->Pstr()->Wsz());
pte->resno = attno;
// add column mapping to output translation context
......
......@@ -9934,6 +9934,14 @@ explain select * from orca.index_test where a = 5 and c = 5;
Optimizer status: PQO version 1.602
(5 rows)
-- renaming columns
select * from (values (2),(null)) v(k);
k
---
2
(2 rows)
-- clean up
drop schema orca cascade;
NOTICE: drop cascades to table orca.index_test
......
......@@ -1277,6 +1277,9 @@ explain select * from orca.index_test where c = 5;
-- force_explain
explain select * from orca.index_test where a = 5 and c = 5;
-- renaming columns
select * from (values (2),(null)) v(k);
-- clean up
drop schema orca cascade;
reset optimizer_segments;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册