Skip to content

Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400) - #1405

Merged
MuhammadTahaNaveed merged 1 commit into
apache:PG12from
jrgemignani:PG12_master_fix_issue_1399
Nov 17, 2023
Merged

MuhammadTahaNaveed merged 1 commit into
apache:PG12from
jrgemignani:PG12_master_fix_issue_1399

Conversation

@jrgemignani

Copy link
Copy Markdown
Contributor

Fixed issue #1399 where EXISTS doesn't handle non-existent labels. However, the issue actually is due to the extra processing (read: extra distance between the AST nodes) that prevented the transform logic from being able to resolve variables created in previous clauses further than one parent up.

Added logic to allow the find_variable function to search up the parent parse nodes.

Added regression tests to cover these cases.

@github-actions github-actions Bot added the PG12 PostgreSQL12 label Nov 17, 2023
…he#1400)

Fixed issue apache#1399 where EXISTS doesn't handle non-existent labels.
However, the issue actually is due to the extra processing (read:
extra distance between the AST nodes) that prevented the transform
logic from being able to resolve variables created in previous clauses
further than one parent up.

Added logic to allow the `find_variable` function to search up the
parent parse nodes.

Added regression tests to cover these cases.
@MuhammadTahaNaveed
MuhammadTahaNaveed merged commit a4911fd into apache:PG12 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PG12 PostgreSQL12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants