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

reuse datafusion physical planner in ballista building from protobuf #532

Merged
merged 4 commits into from
Jun 11, 2021

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented Jun 10, 2021

Which issue does this PR close?

Closes #.

Rationale for this change

reuse datafusion physical planner in ballista building from protobuf.

so far there are duplicated code within ballista and datafusion planner because the latter needs to handle alias but for ballista the expr name is flattened in protobuf, resulting two similar codepath in building the aggregation exec.

this tries to unify both and reuse code.

What changes are included in this PR?

Are there any user-facing changes?

@jimexist jimexist changed the title use logical planner in ballista building from protobuf use datafusion physical planner in ballista building from protobuf Jun 10, 2021
@jimexist jimexist changed the title use datafusion physical planner in ballista building from protobuf reuse datafusion physical planner in ballista building from protobuf Jun 10, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #532 (d0f2804) into master (8f84564) will increase coverage by 0.12%.
The diff coverage is 66.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
+ Coverage   76.04%   76.17%   +0.12%     
==========================================
  Files         157      156       -1     
  Lines       27098    27017      -81     
==========================================
- Hits        20608    20580      -28     
+ Misses       6490     6437      -53     
Impacted Files Coverage Δ
...ta/rust/core/src/serde/physical_plan/from_proto.rs 39.83% <47.05%> (+2.11%) ⬆️
datafusion/src/physical_plan/planner.rs 78.79% <61.90%> (-1.41%) ⬇️
datafusion/src/physical_plan/windows.rs 86.46% <100.00%> (+0.24%) ⬆️
...sta/rust/core/src/serde/logical_plan/from_proto.rs 35.04% <0.00%> (-0.17%) ⬇️
datafusion/src/physical_plan/window_frames.rs
datafusion/src/sql/planner.rs 84.85% <0.00%> (+0.23%) ⬆️
datafusion/src/logical_plan/window_frames.rs 89.39% <0.00%> (+2.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f84564...d0f2804. Read the comment docs.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a nice change to me -- but I think someone more familiar with Ballista to review it too -- @andygrove / @edrevo can you suggest someone?

@andygrove
Copy link
Member

andygrove commented Jun 10, 2021 via email

Comment on lines 68 to 70
_partition_by: &[Arc<dyn PhysicalExpr>],
_order_by: &[PhysicalSortExpr],
_window_frame: WindowFrame,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: once this is merged, it would be cool to add a link to this code in the respective issues that are tracking these missing features to make it easier for new contributors to start contributing.

Copy link
Contributor

@edrevo edrevo Jun 11, 2021

Choose a reason for hiding this comment

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

I just realized that this PR changes the behavior when there is a non-empty partition_by/order_by/window_frame: before (at least in ballista) it would error, whereas now it is silently ignored. Maybe it is worth erroring if they aren't empty to make it explicit that there is no support?

Copy link
Member Author

Choose a reason for hiding this comment

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

it'll be further developed in #520

Copy link
Member Author

Choose a reason for hiding this comment

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

but that's a good point let me add guard here.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is fixed now

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. I pulled the branch locally and ran the integration tests.

@alamb alamb merged commit ad70a1e into apache:master Jun 11, 2021
@houqp houqp added ballista datafusion Changes in the datafusion crate labels Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants