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

Not fully processed top-level subquery in DML #564

Closed
maoxingda opened this issue Jan 23, 2024 · 0 comments · Fixed by #565
Closed

Not fully processed top-level subquery in DML #564

maoxingda opened this issue Jan 23, 2024 · 0 comments · Fixed by #565
Labels
bug Something isn't working

Comments

@maoxingda
Copy link
Contributor

SQL

INSERT INTO tab1 (col1, col2) ((SELECT * FROM tab2 UNION SELECT * FROM tab3))
INSERT INTO tab1 (col1, col2) (((SELECT * FROM tab2 UNION SELECT * FROM tab3)))

CREATE VIEW my_view (random1,random2) AS ((SELECT col1,col2 FROM tbl))
CREATE VIEW my_view (random1,random2) AS (((SELECT col1,col2 FROM tbl)))

To Reproduce

Note here we refer to SQL provided in prior step as stored in a file named test.sql

from sqllineage.runner import LineageRunner

with open("test.sql") as f:
    sql = f.read()

lr = LineageRunner(sql, dialect="redshift")

lr.print_table_lineage()

Actual behavior

Statements(#): 1
Source Tables:
    
Target Tables:
    <default>.tab1

Expected behavior

Statements(#): 1
Source Tables:
    <default>.tab2
    <default>.tab3
Target Tables:
    <default>.tab1

Python version (available via python --version)

  • 3.10

SQLLineage version (available via sqllineage --version):

  • 1.5.0

Additional context

@maoxingda maoxingda added the bug Something isn't working label Jan 23, 2024
maoxingda added a commit to maoxingda/sqllineage that referenced this issue Jan 23, 2024
maoxingda added a commit to maoxingda/sqllineage that referenced this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant