Skip to content

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

Closed
ludlows wants to merge 0 commit intoapache:masterfrom
ludlows:master
Closed

Spark 3.1 3.2: Fix always true/false condition in rewrite_data_files#7760
ludlows wants to merge 0 commit intoapache:masterfrom
ludlows:master

Conversation

@ludlows
Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

Please rebase.

spark-3.1 module is removed from master code.

@ludlows ludlows closed this Oct 1, 2023
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