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

Spark 3.1 3.2: Fix always true/false condition in rewrite_data_files #7760

Closed
wants to merge 0 commits into from

Conversation

ludlows
Copy link
Contributor

@ludlows ludlows commented Jun 3, 2023

backport the fix in the PR (#6760) to Spark 3.1 and 3.2 versions.

@github-actions github-actions bot added the spark label Jun 3, 2023
val optimizedLogicalPlan = session.sessionState.executePlan(logicalPlan).optimizedPlan
val tableAttrs = session.table(tableName).queryExecution.analyzed.output
val unresolvedExpression = session.sessionState.sqlParser.parseExpression(where)
val filter = Filter(unresolvedExpression, DummyRelation(tableAttrs))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar, but the removal of select 42 is part of #6524, and I'm not confident if we can put that change here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that "select 42 from table where" is used only to form a complete sql sentence together with the where condtion. now we can evaluate the where condtion directly without this "select" sql sentence.

@ajantha-bhat
Copy link
Member

Please rebase.

spark-3.1 module is removed from master code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants