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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/st/stExpressions.scala:
##########
@@ -68,13 +98,13 @@ case class ST_AsBinary(geo: Expression)
     TypeCollection(GeographyType, GeometryType)
   )
 
-  override lazy val replacement: Expression = StaticInvoke(
+  override lazy val replacement: Expression = GeospatialGuard(StaticInvoke(

Review Comment:
   I feel we are adding too many duplicated checks. We already disallow 
function lookup for st functions, and it should be good enough to block geo 
from normal users.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/st/stExpressions.scala:
##########
@@ -68,13 +98,13 @@ case class ST_AsBinary(geo: Expression)
     TypeCollection(GeographyType, GeometryType)
   )
 
-  override lazy val replacement: Expression = StaticInvoke(
+  override lazy val replacement: Expression = GeospatialGuard(StaticInvoke(

Review Comment:
   I feel we are adding too many duplicated checks. We already disallow 
function lookup for st functions, which should be good enough to block geo from 
normal users.



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