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

Handle when column name wildcard is prefixed by table name #296 #330

Merged
merged 8 commits into from
Sep 11, 2024

Conversation

macbre
Copy link
Owner

@macbre macbre commented Jul 16, 2022

Query to reproduce:

parsed = Parser("""
with cte_one as (
    select table_one.*
    from table_one
)

select cte_one.column_one
from cte_one
""")

Above code will fail when getting parsed.columns. But if the query of cte_one is select * from table_one it is succeeded.

This PR add handler for if f"{table}.*" in subparser.columns to make above query success to parse.


See #296 for a original PR from @sumartoyo.

@macbre macbre requested a review from collerek as a code owner July 16, 2022 23:23
@macbre macbre enabled auto-merge (squash) July 16, 2022 23:23
@macbre macbre merged commit 8bdc496 into master Sep 11, 2024
10 checks passed
@macbre macbre deleted the fix/column-name-wildcard-prefix-table-name branch September 11, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants