-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add new user doc to translate logical plan to physical plan #12026
Conversation
docs/src/library_logical_plan.rs
Outdated
@@ -76,3 +79,32 @@ fn plan_builder_1() -> Result<()> { | |||
|
|||
Ok(()) | |||
} | |||
|
|||
#[tokio::test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is confusing -- i don't think it is used anymore --- I added #12081 to remove it
@@ -131,6 +131,37 @@ Filter: person.id > Int32(500) [id:Int32;N, name:Utf8;N] | |||
TableScan: person [id:Int32;N, name:Utf8;N] | |||
``` | |||
|
|||
## Translating Logical Plan to Physical Plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jc4x4 -- I have some ideas on improving this example -- I will push some suggestions to this branch
@@ -678,6 +678,12 @@ doc_comment::doctest!( | |||
library_user_guide_sql_api | |||
); | |||
|
|||
#[cfg(doctest)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this block which means the examples in the library guide are now run as part of cargo test --doc
|
||
// print the plan | ||
println!("{}", plan.display_indent_schema()); | ||
use datafusion::common::DataFusionError; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated these examples so they compile as standalone examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @jc4x4 -- I hope you don't mind I pushed several commits to your branch to get the examples compiling and running. Your PR showed there were some issues with our current testing methodology.
I dont mind at all. Thanks for improving it. Let me know if I need to do anything on my end. |
#7306
Which issue does this PR close?
Closes #7306.
Rationale for this change
New user doc for translating logical plan to physical plan
What changes are included in this PR?
create_physical_plan
Are these changes tested?
Run test and pasted output into md.
Are there any user-facing changes?
Only doc