uros-db commented on code in PR #54039:
URL: https://github.com/apache/spark/pull/54039#discussion_r2753441412


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/parquet/ParquetTable.scala:
##########
@@ -51,6 +51,10 @@ case class ParquetTable(
   }
 
   override def supportsDataType(dataType: DataType): Boolean = dataType match {
+    // GeoSpatial data types in Parquet are limited only to types with 
supported SRIDs.
+    case g: GeometryType => GeometryType.isSridSupported(g.srid)

Review Comment:
   Yes, this is a safe guard for Spark, but the same code is used both for 
reads and writes, please see the comment in the base class 
(`sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileTable.scala`):
   
   ```
     /**
      * Returns whether this format supports the given [[DataType]] in 
read/write path.
      * By default all data types are supported.
      */
     def supportsDataType(dataType: DataType): Boolean = true
   ```
   
   
https://github.com/apache/spark/blob/3fa07bb841fd9bb6e9a4e6c0f17ae2dfa86d65ca/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileTable.scala#L120



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