cloud-fan commented on code in PR #53009:
URL: https://github.com/apache/spark/pull/53009#discussion_r2538532615
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:
##########
@@ -1246,8 +1258,8 @@ case class Cast(
case FloatType => castToFloat(from)
case LongType => castToLong(from)
case DoubleType => castToDouble(from)
- case _: GeographyType => identity
- case _: GeometryType => castToGeometry(from)
+ case _: GeographyType if SQLConf.get.geospatialEnabled => identity
Review Comment:
we can it go here. The analyzer already forbid cast involving geo types.
--
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]