Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix column lineage for UPDATE statements with subqueries #18815

Merged

Conversation

lucasdlemos
Copy link
Member

@lucasdlemos lucasdlemos commented Aug 25, 2023

Description

  • This PR fixes an issue where the query output columns were incorrectly not returning source columns for UPDATE statements with subqueries. For example:
UPDATE catalog.schema.test_table SET output_column = (SELECT test_column FROM catalog.schema.test_alt_table)

This query should set test_alt_table.test_column as a source column of test_table.output_column

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Section
* Fix event listener to capture source columns for UPDATE statements with subqueries.

@cla-bot cla-bot bot added the cla-signed label Aug 25, 2023
@lucasdlemos lucasdlemos force-pushed the lucas/fix-update-column-lineage branch from 5de0e84 to 71c1fb9 Compare August 25, 2023 20:50
This commit fixes the issue where the query output columns were not setting
source columns for UPDATE statements setting a target column to a subquery
result.
@lucasdlemos lucasdlemos force-pushed the lucas/fix-update-column-lineage branch from 71c1fb9 to 1bcf954 Compare August 28, 2023 14:32
@lucasdlemos lucasdlemos marked this pull request as ready for review August 28, 2023 17:24
@kokosing kokosing merged commit 482f755 into trinodb:master Aug 29, 2023
@kokosing
Copy link
Member

Thanks!

@github-actions github-actions bot added this to the 426 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants