diff --git a/spark/src/main/scala-shims/spark-4.0/GeoTypesShim.scala b/spark/src/main/scala-shims/spark-4.0/GeoTypesShim.scala index 9bb266e9539..3d2586948cf 100644 --- a/spark/src/main/scala-shims/spark-4.0/GeoTypesShim.scala +++ b/spark/src/main/scala-shims/spark-4.0/GeoTypesShim.scala @@ -46,6 +46,9 @@ object GeoTypesShim { */ val geoExpressions: Set[Class[_]] = Set.empty[Class[_]] + /** Geospatial Catalyst type classes; empty on Spark 4.0 where these types do not exist. */ + val geoTypes: Seq[Class[_]] = Seq.empty[Class[_]] + /** Returns the CRS of a `GeometryType`. Only valid when `isGeometryType(dt)` is true. */ def geometryCrs(dt: DataType): String = throw new IllegalArgumentException(s"Not a geometry type: $dt") diff --git a/spark/src/main/scala-shims/spark-4.2/GeoTypesShim.scala b/spark/src/main/scala-shims/spark-4.2/GeoTypesShim.scala index 1abf05163b2..caceb77518d 100644 --- a/spark/src/main/scala-shims/spark-4.2/GeoTypesShim.scala +++ b/spark/src/main/scala-shims/spark-4.2/GeoTypesShim.scala @@ -62,6 +62,9 @@ object GeoTypesShim { classOf[ST_SetSrid], classOf[ST_Srid]) + /** Geospatial Catalyst type classes (`GeometryType`, `GeographyType`). */ + val geoTypes: Seq[Class[_]] = Seq(classOf[GeometryType], classOf[GeographyType]) + /** Returns the CRS of a `GeometryType`. Only valid when `isGeometryType(dt)` is true. */ def geometryCrs(dt: DataType): String = dt match { case g: GeometryType => g.crs