Skip to content

PhysicalExprAdapter - Schema Rewriter Cleanup #20161

Closed

Description

@kosiew

Refactor PhysicalExprAdapter and schema rewriter utilities to improve maintainability, extract helper functions, and update the factory pattern to be fallible. All changes must remain behavior-preserving.

Scope

This PR focuses on cleanup and refactoring only — no behavioral changes.

Tasks

  • Refactor schema rewriter utilities for clarity
  • Extract reusable helper functions (nullability checks, metadata propagation, etc.)
  • Update adapter factory pattern to support fallible initialization
  • Consolidate duplicate logic in schema adaptation paths
  • Add unit tests to validate refactored code is behavior-preserving

Files/Modules

  • datafusion/physical-expr-adapter/src/schema_rewriter.rs
  • datafusion/physical-expr-adapter/src/lib.rs
  • Related adapter tests

Acceptance Criteria

✅ All existing tests pass without modification
✅ Refactored code is clearer and more maintainable
✅ No change in adapter output or behavior
✅ New helper functions are well-documented

Activity

  1. added a commit that references this issue on Feb 5, 2026
    639971a
  2. added a commit that references this issue on Mar 24, 2026
    2f202f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions