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

fix: dataframe optimize user input #3092

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

eakmanrq
Copy link
Collaborator

@eakmanrq eakmanrq commented Mar 6, 2024

Prior to this change user inputted queries were not optimized and therefore could lack expected aliases. This is now fixed.

I plan on making a follow up PR to write spark specific rules to optimizer so it will qualify columns based on how spark does it rather than sqlglot's format.

Fixes #3091

@eakmanrq eakmanrq force-pushed the eakmanrq/df_optimize_user_input branch from 2e1a751 to e3a24df Compare March 6, 2024 23:53
sqlglot/dataframe/sql/session.py Outdated Show resolved Hide resolved
sqlglot/dataframe/sql/session.py Show resolved Hide resolved
@eakmanrq eakmanrq merged commit 4fb74ff into main Mar 7, 2024
5 checks passed
@eakmanrq eakmanrq deleted the eakmanrq/df_optimize_user_input branch March 7, 2024 00:37
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.

spark sql SELECT MAX without column alias throws error
2 participants