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

refactor: pass the TaskContext when execute physical plan rather than holding it #1163

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

Rachelint
Copy link
Contributor

@Rachelint Rachelint commented Aug 21, 2023

Rationale

Part of #1112
I found we holding the execution context in DataFusionPhysicalPlanImpl, rather than passing it as a param when executing like what datafusion suggests to do.

It lead to problems when I plan to deserialize bytes to DataFusionPhysicalPlanImpl...

Detailed Changes

  • Remove SessionContext from DataFusionPhysicalPlanImpl.
  • Pass it as a param when executing the plan.
  • Wrap all common part to DfContextBuilder and use it to build SessionContext in DatafusionExecutorImpl and DatafusionPhysicalPlannerImpl.

Test Plan

Test by exist tests.

@Rachelint Rachelint marked this pull request as ready for review August 21, 2023 11:53
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@Rachelint Rachelint merged commit 78e90e9 into apache:main Aug 21, 2023
5 checks passed
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.

2 participants