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

Add new user doc to translate logical plan to physical plan #12026

Merged
merged 11 commits into from
Aug 21, 2024
Merged

Conversation

jc4x4
Copy link
Contributor

@jc4x4 jc4x4 commented Aug 16, 2024

#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?

  • doc change
  • sample rust code
  • tokio dependency to support async create_physical_plan

Are these changes tested?

Run test and pasted output into md.

Are there any user-facing changes?

Only doc

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 16, 2024
docs/Cargo.toml Outdated Show resolved Hide resolved
@jc4x4 jc4x4 requested a review from edmondop August 16, 2024 22:13
@alamb
Copy link
Contributor

alamb commented Aug 18, 2024

Thank you for this PR @jc4x4 and @edmondop -- I plan to review / help with it early next week

@@ -76,3 +79,32 @@ fn plan_builder_1() -> Result<()> {

Ok(())
}

#[tokio::test]
Copy link
Contributor

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

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)]
Copy link
Contributor

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;
Copy link
Contributor

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

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 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.

@github-actions github-actions bot added logical-expr Logical plan and expressions core Core DataFusion crate labels Aug 20, 2024
@jc4x4
Copy link
Contributor Author

jc4x4 commented Aug 20, 2024

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.

@alamb
Copy link
Contributor

alamb commented Aug 21, 2024

Thanks again @jc4x4 and @edmondop

@alamb alamb merged commit 78f58c8 into apache:main Aug 21, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate documentation Improvements or additions to documentation logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library Guide: Building LogicalPlans
3 participants