Skip to content

Fix column lineage for UPDATE statements with subqueries#18815

Merged
kokosing merged 1 commit intotrinodb:masterfrom
lucasdlemos:lucas/fix-update-column-lineage
Aug 29, 2023
Merged

Fix column lineage for UPDATE statements with subqueries#18815
kokosing merged 1 commit intotrinodb:masterfrom
lucasdlemos:lucas/fix-update-column-lineage

Conversation

@lucasdlemos
Copy link
Copy Markdown
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
Copy Markdown
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