Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Oct 23, 2023

Which issue does this PR close?

Follow on to #7793

Rationale for this change

While integrating #7793 into IOx, I found I had to change many of our ExecutionPlan implementations with the boilerplate (but non trivial) ExecutionPlan::statistics implementation

        fn statistics(&self) -> Result<datafusion::physical_plan::Statistics, DataFusionError> {
            Ok(datafusion::physical_plan::Statistics::new_unknown(&self.schema()))
        }

In order the ease the upgrade pain for others, we should provide this as a default.

What changes are included in this PR?

  1. Provide a default impl for ExecutionPlan::statistics
  2. Improve documentation

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

Hopefully a slightly less painful upgrade for #7793

@github-actions github-actions bot added the core Core DataFusion crate label Oct 23, 2023
}))
}

fn statistics(&self) -> Result<Statistics> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole point of this PR is to provide this as a default implementation

@crepererum crepererum merged commit ba50a8b into apache:main Oct 24, 2023
@alamb alamb deleted the alamb/default_statistics branch October 24, 2023 12:59
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.

3 participants