kosiew opened a new issue, #16767:
URL: https://github.com/apache/datafusion/issues/16767

   ### Summary
   The `datafusion/expr-common/src/type_coercion/binary.rs` file has grown 
significantly and now exceeds 3000 lines, making it difficult to navigate and 
maintain — especially the test cases, which are tightly coupled with 
implementation logic.
   
   To improve readability, maintainability, and test organization, we propose 
refactoring the test cases into a dedicated module structure under a new 
`binary/tests` directory.
   
   ---
   
   ### Proposed Structure
   ```
   binary/
   ├── mod.rs
   └── tests/
   ├── mod.rs
   ├── arithmetic.rs
   ├── comparison.rs
   ├── null_coercion.rs
   └── dictionary.rs
   ```
   
   
   - `arithmetic.rs` — Tests for arithmetic type coercion and related logic
   - `comparison.rs` — Tests for comparison operator coercion and type 
signatures
   - `null_coercion.rs` — Tests for `NULL` literal handling and coercion 
behavior
   - `dictionary.rs` — Tests for dictionary type coercion and special handling
   - `mod.rs` — Aggregates and re-exports all test modules
   
   ---
   
   ### Benefits
   - ✅ Improved readability and modularity of tests
   - ✅ Easier navigation for contributors working on specific areas of 
`binary.rs`
   - ✅ Cleaner separation between logic and test code
   - ✅ Scales better with future test cases or additional categories
   
   ---
   
   ### Notes
   - The core logic of `binary.rs` remains unchanged — this is a non-functional 
refactor aimed at improving test structure.
   - Open to suggestions on module names or further grouping if appropriate.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to