Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Feb 28, 2024

Draft until #9346 is merged

Which issue does this PR close?

Related to #9346

Rationale for this change

After #9346, some of the functions that were previously on ExecutionPlan were moved to an extension trait

But the docs don't show up in rustdoc
Screenshot 2024-02-28 at 1 25 54 PM

What changes are included in this PR?

  1. Move docs to the trait so they show up in rustdoc
  2. Add a reference to the new trait to rust docs

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added physical-expr Changes to the physical-expr crates core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Feb 28, 2024
@alamb alamb changed the title Alamb/more plan docs Improve documentation for ExecutionPlanProperties, use consistent field name Feb 28, 2024
@alamb alamb force-pushed the alamb/more_plan_docs branch from 5bdb95e to fb3acf5 Compare February 28, 2024 18:59
@github-actions github-actions bot removed physical-expr Changes to the physical-expr crates core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Feb 28, 2024
///
/// See also [`ExecutionPlan::maintains_input_order`] and [`Self::output_ordering`]
/// for related concepts.
fn equivalence_properties(&self) -> &EquivalenceProperties;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

github rendered the diff strangely -- what I did was move the comments into the trait

/// Stores output ordering of the [`ExecutionPlan`]. A `None` value represents
/// no ordering.
/// See [ExecutionPlanProperties::execution_mode]
pub execution_mode: ExecutionMode,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A drive by change was to rename this field to match the trait

@alamb alamb marked this pull request as ready for review February 28, 2024 19:52
Copy link
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM, have one minor suggestion

fn equivalence_properties(&self) -> &EquivalenceProperties;
}

impl ExecutionPlanProperties for Arc<dyn ExecutionPlan> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
impl ExecutionPlanProperties for Arc<dyn ExecutionPlan> {
impl ExecutionPlanProperties for dyn ExecutionPlan {

Maybe doing this will make the extension trait a bit more generally applicable?

Copy link
Contributor Author

@alamb alamb Feb 29, 2024

Choose a reason for hiding this comment

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

Added in 839d783

It turns out I had to also leave the

impl ExecutionPlanProperties for Arc<dyn ExecutionPlan> {

Otherwise the compiler didn't seem to be able to find the relevant methods without code changes (e.g. execution_plan.as_ref()....)

Copy link
Contributor

@mustafasrepo mustafasrepo left a comment

Choose a reason for hiding this comment

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

LGTM!. Thanks @alamb for this PR.

@alamb alamb merged commit e1ed13d into apache:main Feb 29, 2024
@alamb alamb deleted the alamb/more_plan_docs branch February 29, 2024 21:09
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.

3 participants