Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/21586#discussion_r196281679
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -2299,7 +2299,7 @@ class Analyzer(
case u @ UpCast(child, _, _) if !child.resolved => u
case UpCast(child, dataType, walkedTypePath)
- if Cast.mayTruncate(child.dataType, dataType) =>
+ if !Cast.canSafeCast(child.dataType, dataType) =>
fail(child, dataType, walkedTypePath)
--- End diff --
Is the error message of thrown `AnalysisException` valid under this change?
Seems it is not just because truncating.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]