andygrove opened a new issue, #4248: URL: https://github.com/apache/datafusion-comet/issues/4248
## Summary `CometCast.isSupported` claims support for several complex-type cast operations that are not currently exercised in `CometCastSuite`. This epic tracks the remaining gaps. Replaces #2766, which is partially out of date (Array → Array and most Struct → Struct cases are now covered). ## Already covered (do not refile) - `cast ArrayType to StringType` for Bool/String/Byte/Int/Long/Short/Decimal element types: `CometCastSuite:1545` - `cast ArrayType to ArrayType` full primitive matrix incl. Date/Timestamp/Binary, with empty/null/edge-case rows: `CometCastSuite:1570` - `cast StructType to StringType`, `StructType to StructType` (incl. renamed fields): `CometCastSuite:1442-1503` ## Gaps to close ### Array element types not covered - [ ] `Array(Float)` and `Array(Double)` → String (currently commented out at `CometCastSuite:1560`; reinstate or document the reason) - [ ] `Array(Binary)` → String (marked `Incompatible` in `CometCast.scala:154`; add a documenting test that asserts fallback) - [ ] `Array(TimestampNTZ)` → String, `Array(TimestampNTZ)` → `Array(other)` ### Array of Date negative case - [ ] `Array(Date)` → `Array(Long)`/`Array(Boolean)`/etc. should fall back per `CometCast.scala:151-153`. Add a negative test. ### Nested complex types - [ ] `Array(Struct(...))` → `Array(Struct(...))` with field type changes - [ ] `Array(Struct(...))` → String - [ ] `Struct` with `Array` field → `Struct` with `Array` field (cast on inner element type) - [ ] Deep nesting (>2 levels) for `Struct(Struct(...))` → `Struct(Struct(...))` and → String - Note: nested `Array → Array` (e.g. `Array(Array(Int))` → `Array(Array(String))`) is already tracked by #3906; do not duplicate here. ### Eval-mode coverage - [ ] ANSI / TRY mode for `Struct → Struct` and `Struct → String` casts (only LEGACY is currently exercised) - [ ] ANSI overflow paths for array element casts (e.g. `Array(Long)` → `Array(Byte)` with overflowing values) ### Map type - [ ] `CometCast.isSupported` has no `MapType` branch: map casts silently fall through to the catch-all `Unsupported`. Add either an explicit `Unsupported` arm with a clear reason, or an implementation. Filed as a sibling issue once direction is decided. Documenting `ignore`d tests in the meantime is acceptable. ## Out of scope - Map cast implementation: separate decision, separate issue. - Nested `Array → Array`: tracked in #3906. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
