Skip to content

Improve documentation for ExecutionPlanProperties, use consistent field name - #9389

Merged
alamb merged 3 commits into
apache:mainfrom
alamb:alamb/more_plan_docs
Feb 29, 2024
Merged

Improve documentation for ExecutionPlanProperties, use consistent field name#9389
alamb merged 3 commits into
apache:mainfrom
alamb:alamb/more_plan_docs

Conversation

@alamb

@alambalamb commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

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-actionsgithub-actionsBot added physical-expr Changes to the physical-expr crates core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Feb 28, 2024
@alambalamb changed the title Alamb/more plan docsImprove documentation for ExecutionPlanProperties, use consistent field nameFeb 28, 2024
@alamb
alambforce-pushed the alamb/more_plan_docs branch from 5bdb95e to fb3acf5CompareFebruary 28, 2024 18:59
@github-actionsgithub-actionsBot 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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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

@ozankabakozankabak left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
implExecutionPlanPropertiesforArc<dynExecutionPlan>{
implExecutionPlanPropertiesfordynExecutionPlan{

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

@alambalambFeb 29, 2024

Copy link
Copy Markdown
ContributorAuthor

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

implExecutionPlanPropertiesforArc<dynExecutionPlan>{

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

@mustafasrepomustafasrepo left a comment

Copy link
Copy Markdown
Contributor

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:mainFeb 29, 2024
@alamb
alamb deleted the alamb/more_plan_docs branch February 29, 2024 21:09
Sign up for freeto 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

@alamb@ozankabak@mustafasrepo