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

Move TaskContext to datafusion-execution #5677

Merged
merged 4 commits into from
Mar 23, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Mar 21, 2023

Which issue does this PR close?

Part of #1754

Rationale for this change

I am trying to extract the physical_plan code into its own crate; and to do so I need to remove the circular dependencies between core --> datasource --> execution --> datasource

The TaskContext is the part of the SessionState that is used at runtime, so it must be in the datafusion_execution crate. After this the next step will be to pull out datasource into its own crate (and only depend on datafusion_execution)

See more details in #1754 (comment)

What changes are included in this PR?

  1. Move TaskContext to datafusion_execution
  2. Mark TaskContext::try_new() as deprecated (we now have SessionConfig that works better)

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

I added a pub use so this code movement should not affect users other than the deprecated API

@github-actions github-actions bot added the core Core DataFusion crate label Mar 21, 2023
@@ -561,6 +561,11 @@ pub trait ExtensionOptions: Send + Sync + std::fmt::Debug + 'static {
pub struct Extensions(BTreeMap<&'static str, ExtensionBox>);

impl Extensions {
/// Create a new, empty [`Extensions`]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was part of #5676 that I didn't want to lose

@@ -1802,74 +1802,6 @@ impl OptimizerConfig for SessionState {
}
}

/// Task Execution Context
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this PR simply moves this code into datafusion_execution

@alamb alamb merged commit 8594ec7 into apache:main Mar 23, 2023
@alamb alamb deleted the alamb/move_task_context branch July 26, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants