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

Lineage Analysis Incorrectly Captures Source Tables for UNION Query #25148

Open
predator4ann opened this issue Feb 26, 2025 · 0 comments · May be fixed by #25149
Open

Lineage Analysis Incorrectly Captures Source Tables for UNION Query #25148

predator4ann opened this issue Feb 26, 2025 · 0 comments · May be fixed by #25149

Comments

@predator4ann
Copy link

Description
The data lineage analysis fails to capture all source columns when processing UNION ALL operations. Specifically, lineage information for tb2 is missing in the following query scenario.

SQL to Reproduce

CREATE TABLE memory.test.tb1 (id VARCHAR);

CREATE TABLE memory.test.tb2 (id VARCHAR);

SELECT id FROM (
    SELECT id FROM tb1
    UNION ALL
    SELECT id FROM tb2
) t;

Observed Behavior

{
  "OutputColumn": {
    "column": "id (varchar)",
    "sourceColumns": [
      {"tableName": "memory.test.tb1", "columnName": "id"}
    ]
  }
}

Expected Behavior

{
  "OutputColumn": {
    "column": "id (varchar)",
    "sourceColumns": [
      {"tableName": "memory.test.tb1", "columnName": "id"},
      {"tableName": "memory.test.tb2", "columnName": "id"}
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant