Skip to content

ExecutionPlan visitor example documentation #10286

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

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

matthewmturner
Copy link
Contributor

Which issue does this PR close?

Closes #10012

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@matthewmturner
Copy link
Contributor Author

@alamb FYI

@matthewmturner matthewmturner changed the title Parquet exec visitor ExecutionPlan visitor example documentation Apr 29, 2024
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.

Thank you @matthewmturner -- this looks great and I think will really help.

It looks like clippy is complaining in CI: https://github.com/apache/datafusion/actions/runs/8878883209/job/24375602460?pr=10286 (maybe you could print the batch count)

Once the CI is fixed I think we can merge this PR, though I had a few suggestions for improvmements:

  1. I left some suggestions for additional comments for context
  2. I think we should also add an entry to the example readme explaining what this shows (e.g. "Extract statistics by visiting an ExecutionPlan after execution" or something)

@matthewmturner
Copy link
Contributor Author

Thanks @alamb, I have updated.

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.

Thank you @matthewmturner -- looks very helpful to me

);
}

/// Define a struct with fields to hold the information you want to collect
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is very chatgpt-like :))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha I promise I did not use ChatGPT to make this.

Maybe need to add fine print like "LLMs were not used in the generation of this code" 😆

Copy link
Contributor

Choose a reason for hiding this comment

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

:) Lets refine struct doc to be more specific

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 intentionally general, because its up to the user, and it's not really obvious to me that making it more specific would add value to the example but I can add something if you really think its needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

mm. perhaps we can rephrase it something like
struct for storing parquet execution metrics, (scanned bytes) in this example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm @matthewmturner thanks for addressing the comments. Im planning to merge it once CI completed

@comphead comphead merged commit 39d9323 into apache:main Apr 30, 2024
23 checks passed
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.

Docs for ExecutionPlanVisitor
3 participants