Skip to content

Fix property access on list comprehension / predicate loop variables#2402

Open
MuhammadTahaNaveed wants to merge 1 commit intoapache:masterfrom
MuhammadTahaNaveed:fix-i2395
Open

Fix property access on list comprehension / predicate loop variables#2402
MuhammadTahaNaveed wants to merge 1 commit intoapache:masterfrom
MuhammadTahaNaveed:fix-i2395

Conversation

@MuhammadTahaNaveed
Copy link
Copy Markdown
Member

transform_column_ref_for_indirection errored with could not find properties for <name> when the referenced RTE had no "properties" column (as is the case for the unnest() RTE used by list comprehension and the any/all/none/single predicate functions), breaking queries like [x IN list | x.name] and any(x IN list WHERE x.n > 1).

Return NULL instead so the caller continues transforming the ColumnRef as an agtype value and applies the indirection via agtype_access_operator.

transform_column_ref_for_indirection errored with "could not find
properties for <name>" when the referenced RTE had no "properties"
column (as is the case for the unnest() RTE used by list comprehension
and the any/all/none/single predicate functions), breaking queries like
[x IN list | x.name] and any(x IN list WHERE x.n > 1).

Return NULL instead so the caller continues transforming the ColumnRef
as an agtype value and applies the indirection via agtype_access_operator.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List comprehension over a collected node list may fail when accessing node properties.

1 participant