Opened 2 months ago

Closed 4 weeks ago

#35744 closed Bug (fixed)

Combine query support doesn't repoint nested external references

Reported by: Simon Charette Owned by: Simon Charette
Component: Database layer (models, ORM) Version: 4.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Simon Charette)

As I came to discover trying to help someone on the forum the support for correlated subqueries (aka OuterRef) in combined queries (union, intersection, difference) added in #29338 fails to re-point external references on relabeling (an operation performed on subquery pushdown to prevent table name collisions) causing nested outer query references to be orphaned.

Change History (6)

comment:1 by Simon Charette, 2 months ago

Has patch: set

comment:2 by Simon Charette, 2 months ago

Description: modified (diff)
Summary: Composite query support doesn't report nested correlated queries external referencesCombine query support doesn't repoint nested external references

comment:3 by Sarah Boyce, 2 months ago

Triage Stage: UnreviewedAccepted

comment:4 by Sarah Boyce, 2 months ago

Owner: set to Simon Charette

comment:5 by Mariusz Felisiak, 5 weeks ago

Triage Stage: AcceptedReady for checkin

comment:6 by GitHub <noreply@…>, 4 weeks ago

Resolution: fixed
Status: assignedclosed

In 53ea4cce:

Fixed #35744 -- Relabelled external aliases of combined queries.

Just like normal queries, combined queries' outer references might fully
resolve before their reference is assigned its final alias.

Refs #29338.

Thanks Antony_K for the report and example, and thanks Mariusz Felisiak
for the review.

Note: See TracTickets for help on using tickets.
Back to Top