From 4d91d0037ca1f98e27bb0ce2790b4578d5a08bb8 Mon Sep 17 00:00:00 2001 From: "milos.colic" Date: Tue, 2 Jan 2024 15:11:47 +0000 Subject: [PATCH] Fix python definition. --- python/mosaic/api/functions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/mosaic/api/functions.py b/python/mosaic/api/functions.py index 7cd7c8b84..47c2e75df 100644 --- a/python/mosaic/api/functions.py +++ b/python/mosaic/api/functions.py @@ -155,7 +155,7 @@ def st_convexhull(geom: ColumnOrName) -> Column: ) -def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: ColumnOrName = lit(False)) -> Column: +def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: Any = False) -> Column: """ Compute the concave hull of a geometry or multi-geometry object. It uses lengthRatio and @@ -182,6 +182,10 @@ def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: Colum A polygon """ + + if type(has_holes) == bool: + has_holes = lit(has_holes) + return config.mosaic_context.invoke_function( "st_concavehull", pyspark_to_java_column(geom),