You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "uros-db (via GitHub)" <gi...@apache.org> on 2026/01/28 18:07:23 UTC
[PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
uros-db opened a new pull request, #54038:
URL: https://github.com/apache/spark/pull/54038
### What changes were proposed in this pull request?
Disable geospatial types (Geometry and Geography) in all file based data sources except Parquet: CSV, JSON, ORC, Parquet, Avro, XML.
### Why are the changes needed?
Explicitly disallow geospatial data types in the unsupported formats.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Added tests to verify that GEOMETRY and GEOGRAPHY are disallowed in CSV, JSON, ORC, Parquet, Avro, and XML.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #54038:
URL: https://github.com/apache/spark/pull/54038#discussion_r2739601447
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/text/TextTable.scala:
##########
@@ -46,7 +46,11 @@ case class TextTable(
}
}
- override def supportsDataType(dataType: DataType): Boolean = dataType == StringType
+ override def supportsDataType(dataType: DataType): Boolean = dataType match {
+ case _: GeometryType | _: GeographyType => false
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: 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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "uros-db (via GitHub)" <gi...@apache.org>.
uros-db commented on code in PR #54038:
URL: https://github.com/apache/spark/pull/54038#discussion_r2740457771
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/text/TextFileFormat.scala:
##########
@@ -142,7 +142,10 @@ case class TextFileFormat() extends TextBasedFileFormat with DataSourceRegister
}
}
- override def supportDataType(dataType: DataType): Boolean =
- dataType.isInstanceOf[StringType]
+ override def supportDataType(dataType: DataType): Boolean = dataType match {
+ case _: GeometryType | _: GeographyType => false
Review Comment:
Makes sense, we don't really need these changes given the original condition. Reverted.
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/text/TextTable.scala:
##########
@@ -46,7 +46,11 @@ case class TextTable(
}
}
- override def supportsDataType(dataType: DataType): Boolean = dataType == StringType
+ override def supportsDataType(dataType: DataType): Boolean = dataType match {
+ case _: GeometryType | _: GeographyType => false
Review Comment:
Done, thanks!
--
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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #54038:
URL: https://github.com/apache/spark/pull/54038#issuecomment-3812957575
## JIRA Issue Information
=== Sub-task SPARK-55262 ===
Summary: Block Geo types in all file based data sources except Parquet
Assignee: None
Status: Open
Affected: ["4.2"]
---
*This comment was automatically generated by GitHub Actions*
--
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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on PR #54038:
URL: https://github.com/apache/spark/pull/54038#issuecomment-3818352827
thanks, merging to master!
--
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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #54038:
URL: https://github.com/apache/spark/pull/54038#discussion_r2739600317
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/text/TextFileFormat.scala:
##########
@@ -142,7 +142,10 @@ case class TextFileFormat() extends TextBasedFileFormat with DataSourceRegister
}
}
- override def supportDataType(dataType: DataType): Boolean =
- dataType.isInstanceOf[StringType]
+ override def supportDataType(dataType: DataType): Boolean = dataType match {
+ case _: GeometryType | _: GeographyType => false
Review Comment:
do we need this change? text format supports string type only
--
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
Re: [PR] [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan closed pull request #54038: [SPARK-55262][Geo][SQL] Block Geo types in all file based data sources except Parquet
URL: https://github.com/apache/spark/pull/54038
--
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