Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48a1fb2

Browse files
committed
Oops, missed one fix for EquivalenceClass rearrangement.
Now that we're expecting a mergeclause's left_ec/right_ec to persist fromthe initial assignments, we can't just blithely zero these out whentransforming such a clause in adjust_appendrel_attrs. But really it shouldbe okay to keep the parent's values, since a child table's derived Varought to be equivalent to the parent Var for all EquivalenceClass purposes.(Indeed, I'm wondering whether we couldn't find a way to dispense withadd_child_rel_equivalences altogether. But this is wrong in any case.)
1 parent14231a4 commit48a1fb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/optimizer/prep/prepunion.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,13 +1682,13 @@ adjust_appendrel_attrs_mutator(Node *node, AppendRelInfo *context)
16821682

16831683
/*
16841684
* Reset cached derivative fields, since these might need to have
1685-
* different values when considering the child relation.
1685+
* different values when considering the child relation. Note we
1686+
* don't reset left_ec/right_ec: each child variable is implicitly
1687+
* equivalent to its parent, so still a member of the same EC if any.
16861688
*/
16871689
newinfo->eval_cost.startup=-1;
16881690
newinfo->norm_selec=-1;
16891691
newinfo->outer_selec=-1;
1690-
newinfo->left_ec=NULL;
1691-
newinfo->right_ec=NULL;
16921692
newinfo->left_em=NULL;
16931693
newinfo->right_em=NULL;
16941694
newinfo->scansel_cache=NIL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp