Skip to content

docs: add custom TopK operator walkthrough to Extending Operators guide - #27011

Open
codewarnab wants to merge 3 commits into
apache:mainfrom
codewarnab:docs/topk-operator-guide
Open

codewarnab wants to merge 3 commits into
apache:mainfrom
codewarnab:docs/topk-operator-guide

Conversation

@codewarnab

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

The TopK example in user_defined_plan.rs shows how to add a custom operator to DataFusion. Users who read the Extending Operators guide cannot find it there. This PR adds a short walkthrough of the example to that guide.

What changes are included in this PR?

  • A new "A custom TopK operator" section in extending-operators.md. It covers:
    • the custom logical node, TopKPlanNode
    • the optimizer rule that adds the node to the plan
    • the physical operator that runs it
    • the limits of the example
  • A small update to the intro, so that it covers both examples.

The µWheel section, the example code, and its invariant tests are unchanged. A follow-up PR will move the invariant tests into focused unit tests. That PR will also update the link in this section if the example moves.

What is the testing strategy for this PR?

This PR changes only documentation. The snippets and descriptions match the current code in user_defined_plan.rs.

Are there any user-facing changes?

Yes. The library user guide has a new section. There are no API changes.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 2, 2026
@codewarnab

Copy link
Copy Markdown
Author

Hi @alamb, a gentle ping on this when you have time. It’s a small docs-only change (one file) that adds the TopK walkthrough, kept small as you suggested on #15774. CI is green. Happy to adjust anything. Thanks!

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants