Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spark/src/main/scala-shims/spark-4.0/GeoTypesShim.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions spark/src/main/scala-shims/spark-4.2/GeoTypesShim.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading