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

Set query_execution_start_time on snapshot from SessionContext (#4747) #4750

Merged
merged 3 commits into from
Dec 27, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Dec 27, 2022

Which issue does this PR close?

Closes #4747
Closes #4626

Rationale for this change

This works around #4747 by ensuring that the execution time is already set by the time a user has obtained a SessionState.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate physical-expr Physical Expressions labels Dec 27, 2022
@@ -44,14 +44,16 @@ impl ExecutionProps {
/// Creates a new execution props
pub fn new() -> Self {
ExecutionProps {
query_execution_start_time: chrono::Utc::now(),
// Set this to a fixed sentinel to make it obvious if this is
// not being updated / propagated correctly
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

self.create_physical_plan_impl().await
}

/// Temporary pending #4626
Copy link
Contributor Author

@tustvold tustvold Dec 27, 2022

Choose a reason for hiding this comment

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

I no longer intend to do this, as it creates far too much churn to justify it, this PR instead opts to workaround the issue by punting responsibility for setting the execution start time onto the caller if they're using the lower-level APIs.

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.

Makes sense to me

pub fn state(&self) -> SessionState {
self.state.read().clone()
let mut state = self.state.read().clone();
state.execution_props.start_execution();
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nice change 👍 make sense

@tustvold tustvold merged commit 981a9bb into apache:master Dec 27, 2022
@ursabot
Copy link

ursabot commented Dec 27, 2022

Benchmark runs are scheduled for baseline = 5630339 and contender = 981a9bb. 981a9bb is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate physical-expr Physical Expressions
Projects
None yet
4 participants