sdf-jkl opened a new issue, #11033:
URL: https://github.com/apache/arrow-rs/issues/11033

   ### Is your feature request related to a problem or challenge?
   
   Follow-up to #5125. This issue captures the remaining test-organization work 
identified after the original module extractions.
   
   The test module in `arrow-cast/src/cast/mod.rs` contains approximately 
11,400 lines and more than 300 tests. Most cast implementations have been 
divided into functional submodules, but their public-behavior tests remain 
collected in one large inline module.
   
   This accounts for most of the remaining size of `cast/mod.rs` and makes 
tests for individual cast families difficult to locate and maintain.
   
   ### Describe the solution you'd like
   
   Move the public-behavior tests currently in `cast/mod.rs` into a crate-level 
test suite, following the organization used by Parquet:
   
   ```text
   arrow-cast/
   ├── src/
   ├── tests/
   │   └── cast/
   │       ├── mod.rs
   │       ├── binary.rs
   │       ├── decimal.rs
   │       ├── dictionary.rs
   │       ├── dispatch.rs
   │       ├── list.rs
   │       ├── map.rs
   │       ├── numeric.rs
   │       ├── run_array.rs
   │       ├── string.rs
   │       ├── struct.rs
   │       └── temporal.rs
   └── Cargo.toml
   ```
   
   Configure the suite as one test target:
   
   ```toml
   [[test]]
   name = "cast"
   path = "./tests/cast/mod.rs"
   ```
   
   A small first PR could establish the test target and move one coherent 
group, such as the map tests. Subsequent PRs can reference this issue while 
moving the remaining groups.
   
   Suggested tracking:
   
   - [ ] Establish `tests/cast/mod.rs` and the `cast` test target
   - [ ] Move a small initial group
   - [ ] List and list-view tests
   - [ ] Map tests
   - [ ] Dictionary tests
   - [ ] Decimal tests
   - [ ] String tests
   - [ ] Binary and byte-view tests
   - [ ] Numeric and boolean tests
   - [ ] Temporal, duration, and interval tests
   - [ ] Run-array tests
   - [ ] Struct tests
   - [ ] General dispatch, null, and `can_cast_types` tests
   - [ ] Remove the large inline test module from `cast/mod.rs`
   
   Tests that specifically exercise private implementation details can remain 
colocated with their source modules. This issue primarily concerns tests 
currently exercising the public cast API from `cast/mod.rs`.
   
   ### Additional context
   
   Parquet uses explicit test targets under `parquet/tests/`, including nested 
test suites rooted at files such as `tests/arrow_reader/mod.rs`. This proposal 
applies the same organization to `arrow-cast`.
   
   In Cargo terminology these are integration tests, but they remain part of 
the `arrow-cast` package, use its development dependencies, and test 
`arrow_cast` through its public API.
   
   Together with the separate implementation-extraction follow-up, this issue 
supersedes the remaining work under #5125 and allows that umbrella issue to be 
closed.
   
   This can remain a single tracking issue. Separate follow-ups are only 
necessary if large groups such as decimal or temporal tests need independent 
ownership or coordination.
   
   ### AI usage disclosure
   
   This issue was drafted with assistance from OpenAI Codex. Codex was used to 
inspect the existing `arrow-cast` and Parquet test organization and help 
formulate the proposed test structure. No code changes were generated or made.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to