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: Reuse CometBroadcastExchangeExec with Spark ReuseExchangeAndSubquery rule #441

Merged
merged 1 commit into from
May 18, 2024

Conversation

viirya
Copy link
Member

@viirya viirya commented May 17, 2024

Which issue does this PR close?

Closes #439.

Rationale for this change

What changes are included in this PR?

How are these changes tested?

@viirya viirya changed the title fix: Reuse CometBroadcastExchangeExec with Spark ReuseExchangeAndSubq… fix: Reuse CometBroadcastExchangeExec with Spark ReuseExchangeAndSubquery rule May 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 34.17%. Comparing base (fcf7d5b) to head (67acabc).
Report is 4 commits behind head on main.

Files Patch % Lines
...e/spark/sql/comet/CometBroadcastExchangeExec.scala 50.00% 0 Missing and 1 partial ⚠️
...n/scala/org/apache/spark/sql/comet/operators.scala 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main     #441   +/-   ##
=========================================
  Coverage     34.17%   34.17%           
  Complexity      850      850           
=========================================
  Files           116      116           
  Lines         38547    38552    +5     
  Branches       8523     8524    +1     
=========================================
+ Hits          13172    13176    +4     
- Misses        22609    22610    +1     
  Partials       2766     2766           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@viirya viirya force-pushed the fix_broadcast_reuse branch from c41c097 to 67acabc Compare May 17, 2024 06:53
@viirya
Copy link
Member Author

viirya commented May 17, 2024

cc @andygrove @sunchao

@viirya viirya force-pushed the fix_broadcast_reuse branch from 67acabc to 4e174d2 Compare May 17, 2024 15:49
@viirya viirya requested review from andygrove and sunchao May 17, 2024 17:23
Copy link
Contributor

@kazuyukitanimura kazuyukitanimura left a comment

Choose a reason for hiding this comment

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

LGTM

case plan if plan.children.exists(_.isInstanceOf[BroadcastExchangeExec]) =>
val newChildren = plan.children.map {
case b: BroadcastExchangeExec
if isCometNative(b.child) &&
isCometOperatorEnabled(conf, "broadcastExchangeExec") =>
isCometOperatorEnabled(conf, "broadcastExchangeExec") &&
isSpark34Plus => // Spark 3.4+ only
Copy link
Contributor

Choose a reason for hiding this comment

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

If BroadcastExchangeExec is only for 3.4+, is isSpark34Plus extra?

Copy link
Member Author

Choose a reason for hiding this comment

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

CometBroadcastExchangeExec is only for 3.4+ not BroadcastExchangeExec.

@viirya viirya merged commit ec8da30 into apache:main May 18, 2024
40 checks passed
@viirya
Copy link
Member Author

viirya commented May 18, 2024

Merged. Thanks @kazuyukitanimura @sunchao

@viirya viirya deleted the fix_broadcast_reuse branch May 18, 2024 16:26
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
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.

CometBroadcastExchangeExec cannot be reused by Spark ReuseExchangeAndSubquery rule
4 participants