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

Library Guide: Building LogicalPlans #7306

Closed
alamb opened this issue Aug 16, 2023 · 6 comments · Fixed by #12026
Closed

Library Guide: Building LogicalPlans #7306

alamb opened this issue Aug 16, 2023 · 6 comments · Fixed by #12026
Labels
devrel Issues related to making it easier to use DataFusion by developers documentation Improvements or additions to documentation enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Aug 16, 2023

Is your feature request related to a problem or challenge?

Part of #7014

If we want to have DataFusion used as the core of many new systems, we need it to be as easy as possible for someone to get their idea working on top of DataFusion.

Thanks to @tshauck we now have a basic Library Users Guide ❤️ and this ticket describes expanding it out

Describe the solution you'd like

Fill in the content of https://arrow.apache.org/datafusion/library-user-guide/building-logical-plans.html

Example Outline

  1. Building LogicalPlans directly
  2. Building LogicalPlans using LogicalPlanBuilder
  3. Translating LogicalPlan --> ExecutionPlan via physical planner

The examples directory holds a bunch more of examples: https://github.com/apache/arrow-datafusion/tree/main/datafusion-examples

Describe alternatives you've considered

No response

Additional context

No response

@alamb alamb added enhancement New feature or request documentation Improvements or additions to documentation devrel Issues related to making it easier to use DataFusion by developers labels Aug 16, 2023
@andygrove andygrove self-assigned this Oct 26, 2023
@andygrove andygrove removed their assignment May 23, 2024
@edmondop
Copy link
Contributor

@alamb I checked the previous @andygrove PR and it seems like we have a good setup. I read the docs, and noticed they lack a paragraph on how to translate the LogicalPlan into Physical Plan .

What do you think we should do? I can add that paragraph, but maybe we also want to link the examples? What else do you think it's needed to close this

@alamb
Copy link
Contributor Author

alamb commented May 25, 2024

What do you think we should do? I can add that paragraph, but maybe we also want to link the examples? What else do you think it's needed to close this

Those both sound like excellent ideas to close off this issue. Thank you @edmondop

@edmondop
Copy link
Contributor

What do you think we should do? I can add that paragraph, but maybe we also want to link the examples? What else do you think it's needed to close this

Those both sound like excellent ideas to close off this issue. Thank you @edmondop

I noticed that the original work from @andygrove referred examples in the docs and these seems to be pretty "unique" in the sense that no other doc page seems to take this approach , see https://github.com/apache/datafusion/tree/main/docs/src

What do you think about moving those into examples and linking them from the docs? Do we have a preprocessor macro to includes the Rust code in a markdown upon compilation, or maybe to ensure that the embedded snippets compile and execute correctly ?

@alamb
Copy link
Contributor Author

alamb commented Jun 3, 2024

I think @andygrove started on a pre-processor that extracted the markdown and tested it here #7956

Maybe we can revive that idea

@edmondop
Copy link
Contributor

edmondop commented Jun 3, 2024

I have created #10768 which I think would be a replacement of the Python scripts with something maintained somewhere else

@jc4x4
Copy link
Contributor

jc4x4 commented Aug 16, 2024

I've added a first draft to the doc. Let me know if you would look for a more sophisticated example.

alamb added a commit that referenced this issue Aug 21, 2024
* Add new user doc to translate logical plan to physical plan

#7306

* prettier

* Run doc examples as part of cargo --doc

* Update first example to run

* Fix next example

* fix last example

* prettier

* clarify table source

* prettier

* Revert changes

---------

Co-authored-by: Andrew Lamb <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devrel Issues related to making it easier to use DataFusion by developers documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants