diff --git a/python/sedona/sql/st_functions.py b/python/sedona/sql/st_functions.py index e9d07f8f65..f95a452886 100644 --- a/python/sedona/sql/st_functions.py +++ b/python/sedona/sql/st_functions.py @@ -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'] diff --git a/python/tests/sql/test_st_function_imports.py b/python/tests/sql/test_st_function_imports.py index 5ffb650edf..81bc768f1c 100644 --- a/python/tests/sql/test_st_function_imports.py +++ b/python/tests/sql/test_st_function_imports.py @@ -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)