You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2025/12/04 00:35:14 UTC
Re: [PR] [SPARK-54253][Geo][CONNECT][FOLLOWUP] Enforce geospatial support config in Spark Connect [spark]
cloud-fan commented on code in PR #53259:
URL: https://github.com/apache/spark/pull/53259#discussion_r2587022235
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/SparkConnectPlanExecution.scala:
##########
@@ -126,6 +127,13 @@ private[execution] class SparkConnectPlanExecution(executeHolder: ExecuteHolder)
val sessionId = executePlan.sessionHolder.sessionId
val spark = dataframe.sparkSession
val schema = dataframe.schema
+ val geospatialEnabled = spark.sessionState.conf.geospatialEnabled
+ if (!geospatialEnabled && schema.fields.exists(field =>
+ STExpressionUtils.isGeoSpatialType(field.dataType))) {
Review Comment:
```suggestion
if (!geospatialEnabled && schema.existsRecursively(STExpressionUtils.isGeoSpatialType)) {
```
so that it checks nested struct fields as well.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org