cloud-fan commented on code in PR #52839:
URL: https://github.com/apache/spark/pull/52839#discussion_r2491765316
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:
##########
@@ -164,6 +164,10 @@ object Cast extends QueryErrorsBase {
case (udt1: UserDefinedType[_], udt2: UserDefinedType[_]) if
udt2.acceptsType(udt1) => true
+ // Casting from GEOGRAPHY to GEOMETRY with the same SRID is allowed.
+ case (geog: GeographyType, geom: GeometryType) if geog.srid == geom.srid =>
Review Comment:
We have a special srid that means ANY. Shall we allow casting from certain
srid to ANY?
--
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]