uros-db commented on code in PR #54950:
URL: https://github.com/apache/spark/pull/54950#discussion_r3242293799
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala:
##########
@@ -217,6 +217,15 @@ abstract class TypeCoercionSuiteBase extends AnalysisTest {
shouldNotCast(checkedType, IntegralType)
}
+ test("SPARK-56152: implicit type cast - TimeType") {
+ val checkedType = TimeType()
+ checkTypeCasting(checkedType, castableTypes = Seq(checkedType, StringType))
Review Comment:
Thanks for catching this and for the clear repro. Applied the suggested
change in the latest commit — castableTypes = Seq(checkedType, StringType) ++
datetimeTypes. Since datetimeTypes itself now excludes TimeType, the original
symmetry concern (no implied cross-castability via the shared dataset) is
preserved, while the shouldNotCast set no longer asserts something that
implicitCast doesn't actually honor today. Agreed on leaving the underlying
DatetimeType -> DatetimeType drift out of scope here — happy to address it in a
follow-up.
--
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]