fix: Add alias_tokens parameter to _parse_join() for sqlglot 30.9.0 compactibilty #5847
Open
iawanish wants to merge 2 commits into
Open
fix: Add alias_tokens parameter to _parse_join() for sqlglot 30.9.0 compactibilty #5847iawanish wants to merge 2 commits into
iawanish wants to merge 2 commits into
Conversation
…ompatibility - Add missing alias_tokens parameter to _parse_join() method signature - Pass alias_tokens to internal __parse_join() calls - Maintain backward compatibility with optional parameter - Fixes TypeError when using sqlglot 30.9.0 or later Resolves compatibility issue where SQLMesh's _parse_join() override was incompatible with sqlglot 30.9.0's updated method signature. Signed-off-by: Awanish Gupta <awanishgupta159@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5840
This PR fixes compatibility with
sqlglot30.9.0 by updating the overridden_parse_join()method insqlmesh/core/dialect.pyto match the upstream parser signature.Problem
With
sqlglot30.9.0+, SQLMesh raises:This happens because
sqlglotintroduced thealias_tokensparameter inParser._parse_join(), while SQLMesh's override was still using the older method signature.Changes
alias_tokensparameter to_parse_join().alias_tokensto the internal__parse_join()calls.This change allows SQLMesh to work correctly with
sqlglot30.9.0+ without affecting existing behavior.Test Plan
sqlglot==30.9.0.TypeErrorno longer occurs.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO