cloud-fan commented on code in PR #53009:
URL: https://github.com/apache/spark/pull/53009#discussion_r2538513878


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala:
##########
@@ -132,10 +133,12 @@ object AnsiTypeCoercion extends TypeCoercionBase {
 
     // We allow coercion from GEOGRAPHY(<srid>) types (i.e. fixed SRID types) 
to the
     // GEOGRAPHY(ANY) type (i.e. mixed SRID type). This coercion is always 
safe to do.
-    case (t1: GeographyType, t2: GeographyType) if t1 != t2 => 
Some(GeographyType("ANY"))
+    case (t1: GeographyType, t2: GeographyType) if 
SQLConf.get.geospatialEnabled && t1 != t2 =>

Review Comment:
   We can let go for these small geo functionalities. If users somehow creates 
geo values, it's not a big deal to support type coercion between them.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala:
##########
@@ -100,10 +100,12 @@ object TypeCoercion extends TypeCoercionBase {
 
       // We allow coercion from GEOGRAPHY(<srid>) types (i.e. fixed SRID 
types) to the
       // GEOGRAPHY(ANY) type (i.e. mixed SRID type). This coercion is always 
safe to do.
-      case (t1: GeographyType, t2: GeographyType) if t1 != t2 => 
Some(GeographyType("ANY"))
+      case (t1: GeographyType, t2: GeographyType) if 
SQLConf.get.geospatialEnabled && t1 != t2 =>

Review Comment:
   ditto



-- 
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]

Reply via email to