Skip to content

Commit

Permalink
Fix importing GeometryType from sedona.spark
Browse files Browse the repository at this point in the history
  • Loading branch information
Kontinuation committed Jul 31, 2024
1 parent 9ebdd5d commit 2c1ac36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/sedona/sql/st_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2050,4 +2050,4 @@ def ST_Rotate(geometry: ColumnOrName, angle: Union[ColumnOrName, float], originX

# Automatically populate __all__
__all__ = [name for name, obj in inspect.getmembers(sys.modules[__name__])
if inspect.isfunction(obj)]
if inspect.isfunction(obj) and name != 'GeometryType']
5 changes: 5 additions & 0 deletions python/tests/sql/test_st_function_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ def test_import(self):
ST_Point
ST_Contains
ST_Envelope_Aggr

def test_geometry_type_should_be_a_sql_type(self):
from sedona.spark import GeometryType
from pyspark.sql.types import UserDefinedType
assert isinstance(GeometryType(), UserDefinedType)

0 comments on commit 2c1ac36

Please sign in to comment.