uros-db commented on code in PR #53009:
URL: https://github.com/apache/spark/pull/53009#discussion_r2538687795
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/PhysicalDataType.scala:
##########
@@ -414,18 +415,22 @@ object UninitializedPhysicalType extends PhysicalDataType
{
@transient private[sql] lazy val tag = typeTag[InternalType]
}
+@Unstable
Review Comment:
Removed.
##########
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:
This one may be important because of scala & python functions. Disallowing
SQL function lookup is not sufficient to block expressions in those APIs.
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/types/DataTypeSuite.scala:
##########
@@ -279,25 +280,27 @@ class DataTypeSuite extends SparkFunSuite {
checkDataTypeFromJson(VarcharType(10))
checkDataTypeFromDDL(VarcharType(11))
- // GEOMETRY type with default fixed SRID.
- checkDataTypeFromJson(GeometryType(GeometryType.GEOMETRY_DEFAULT_SRID))
- checkDataTypeFromDDL(GeometryType(GeometryType.GEOMETRY_DEFAULT_SRID))
+ withSQLConf("spark.sql.geospatial.enabled" -> "true") {
Review Comment:
This may be a leftover from some prototyping, removing it.
##########
sql/core/src/test/scala/org/apache/spark/sql/RowSuite.scala:
##########
@@ -147,4 +148,30 @@ class RowSuite extends SparkFunSuite with
SharedSparkSession {
assert(row.getGeometry(0).getBytes() == point)
assert(row.getGeography(1).getBytes() == point)
}
+
+ test("geospatial feature disabled") {
Review Comment:
Yes, we can remove this. Tests in `GeographyDataFrameSuite` and
`GeographyDataFrameSuite` should be sufficient
--
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]