You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/05/28 02:30:07 UTC
[I] [Doc] CAST has no explicit TimeType branch (Spark 4.1) [datafusion-comet]
andygrove opened a new issue, #4490:
URL: https://github.com/apache/datafusion-comet/issues/4490
## Describe the bug
Spark 4.1 introduced `TimeType` (HH:mm:ss). Spark 4.1's `Cast.scala` adds many `TimeType` arms (`StringType <-> TimeType`, `TimeType <-> TimeType`, `TimeType -> IntegralType / DecimalType`, etc.). `CometCast.isSupported` has no `TimeType` arm at all, so every TimeType-involving cast falls into the default `case _ => unsupported(fromType, toType)` and falls back to Spark.
The fallback is correct, but it is implicit, and `getUnsupportedReasons()` on `CometCast` does not enumerate `TimeType` as one of the unsupported branches, so the auto-generated compatibility guide doesn't mention it.
Surfaced by the cast audit (collection PR queue).
## Expected behavior
Either:
1. Add an explicit `TimeType` arm to `CometCast.isSupported` that returns `Unsupported(Some("Cast to/from TimeType is not yet supported"))`, OR
2. Implement native `TimeType` cast (depends on `TimeType` being supported broadly across Comet, tracked by the broader date/time epic #4418).
The minimum here is the explicit `Unsupported` arm so the compatibility guide reflects it.
## Additional context
- Spark reference: `Cast.scala` in `/tmp/spark-v4.1.1/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/`.
- Comet matrix: `CometCast.scala`.
- Related: #4418 (EPIC for date/time expressions on Spark 4.x).
--
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-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org