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