Skip to content

fix(docs): Fix code snippet in LogicalPlan docs - #25377

Merged
martin-g merged 2 commits into
apache:mainfrom
martin-g:fix-example
Sep 17, 2026
Merged

martin-g merged 2 commits into
apache:mainfrom
martin-g:fix-example

Conversation

@martin-g

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes N/A.

Rationale for this change

See https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.LogicalPlan.html#visiting-and-rewriting-logicalplans

The comment says // Projection(name, salary) but the code does project(vec![col("name")])?. It should include the col("salary") too

What changes are included in this PR?

The code snippet in the docstring is fixed to match the plan in the comments.

What is the testing strategy for this PR?

Build the docs and verify that the code snippet matches the comments above it.

Are there any user-facing changes?

No.

https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.LogicalPlan.html#visiting-and-rewriting-logicalplans

The comment says `// Projection(name, salary)` but the code does `project(vec![col("name")])?`. It should include the `col("salary")` too
@github-actions github-actions Bot added the logical-expr Logical plan and expressions label Sep 16, 2026
@codecov-commenter

codecov-commenter commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.93%. Comparing base (606ae0f) to head (9d4ba0a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25377      +/-   ##
==========================================
- Coverage   81.94%   81.93%   -0.02%     
==========================================
  Files        1135     1136       +1     
  Lines      428278   428677     +399     
  Branches   428278   428677     +399     
==========================================
+ Hits       350952   351219     +267     
- Misses      56369    56442      +73     
- Partials    20957    21016      +59     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martin-g
martin-g added this pull request to the merge queue Sep 17, 2026
@martin-g

Copy link
Copy Markdown
Member Author

Thank you for the review, @nuno-faria !

Merged via the queue into apache:main with commit a436660 Sep 17, 2026
41 checks passed
@martin-g
martin-g deleted the fix-example branch September 17, 2026 04:54
Omega359 pushed a commit to Omega359/arrow-datafusion that referenced this pull request Oct 11, 2026
## Which issue does this PR close?

Closes N/A.

## Rationale for this change

See
https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.LogicalPlan.html#visiting-and-rewriting-logicalplans

The comment says `// Projection(name, salary)` but the code does
`project(vec![col("name")])?`. It should include the `col("salary")` too

## What changes are included in this PR?

The code snippet in the docstring is fixed to match the plan in the
comments.

## What is the testing strategy for this PR?

Build the docs and verify that the code snippet matches the comments
above it.

## Are there any user-facing changes?

No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants