Skip to content

refactor: move limit planning into operator builder - #7873

Draft
NginxL wants to merge 1 commit into
apache:mainfrom
NginxL:refactor/limit-operator-builder
Draft

NginxL wants to merge 1 commit into
apache:mainfrom
NginxL:refactor/limit-operator-builder

Conversation

@NginxL

@NginxL NginxL commented Dec 5, 2026

Copy link
Copy Markdown

Which issue does this PR close?

Refs #6979. This advances the remaining operator-registry migration for Limit; it does not finish the epic.

Rationale for this change

create_plan still contains a large monolithic match. Moving one operator family at a time keeps the registry migration reviewable and reduces conflicts in planner.rs.

What changes are included in this PR?

  • Adds LimitBuilder and registers OperatorType::Limit.
  • Moves the existing Limit arm into planner/limit.rs without changing its validation, local/global limit selection, fetch calculation, or plan tree construction.
  • Removes the corresponding arm and now-unused LocalLimitExec import from planner.rs.

How are these changes tested?

  • cargo fmt --manifest-path native/Cargo.toml -p datafusion-comet -- --check: passed.
  • cargo check --manifest-path native/Cargo.toml -p datafusion-comet --tests: passed.
  • cargo test --manifest-path native/Cargo.toml -p datafusion-comet --lib: 1092 passed, 0 failed, 5 ignored. The test UDF library was built first as required by the repository tests.
  • git diff --check: passed.

Spark SQL and JVM integration suites were not run locally. This is a behavior-preserving move, but Spark coverage remains for CI and human review.

AI disclosure: AI-assisted implementation by an autonomous coding agent. The diff and test results were reviewed before opening this Draft PR. A human committer must review and approve it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant