From 93d4edd35f8459251ecfe9612b052373b8165a9a Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Thu, 11 Sep 2025 10:46:30 -0600 Subject: [PATCH 1/8] Added support for Geospatial functions - part 1 --- CHANGELOG.md | 8 + docs/source/snowpark/functions.rst | 7 + .../snowpark/_functions/scalar_functions.py | 172 ++++++++++++++++++ 3 files changed, 187 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6757f356b..4812a1e0fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ - Added support for `FileOperation.list` to list files in a stage with metadata. - Added support for `FileOperation.remove` to remove files in a stage. - Added support for parameter `use_vectorized_scanner` in function `Session.write_pandas()`. +- Added support for the following scalar functions in `functions.py`: + - `h3_polygon_to_cells` + - `h3_polygon_to_cells_strings` + - `h3_string_to_int` + - `h3_try_polygon_to_cells_strings` + - `h3_cell_to_children` + - `h3_cell_to_children_string` + - `h3_int_to_string` #### Bug Fixes diff --git a/docs/source/snowpark/functions.rst b/docs/source/snowpark/functions.rst index ce396ef74f..b53c9f524a 100644 --- a/docs/source/snowpark/functions.rst +++ b/docs/source/snowpark/functions.rst @@ -227,6 +227,13 @@ Functions hex hex_encode hour + h3_polygon_to_cells + h3_polygon_to_cells_strings + h3_string_to_int + h3_try_polygon_to_cells_strings + h3_cell_to_children + h3_cell_to_children_string + h3_int_to_string iff ifnull in_ diff --git a/src/snowflake/snowpark/_functions/scalar_functions.py b/src/snowflake/snowpark/_functions/scalar_functions.py index a6ce9de8eb..9c04eba06e 100644 --- a/src/snowflake/snowpark/_functions/scalar_functions.py +++ b/src/snowflake/snowpark/_functions/scalar_functions.py @@ -314,3 +314,175 @@ def getbit( else None ) return builtin("getbit", _emit_ast=_emit_ast)(c, pos) + + +@publicapi +def h3_polygon_to_cells( + geography_polygon: ColumnOrName, + target_resolution: ColumnOrName, + _emit_ast: bool = True, +) -> Column: + """Returns the H3 cell IDs contained by the input polygon at the specified resolution. + + Args: + geography_polygon: A column containing a GEOGRAPHY object representing a polygon. + target_resolution: A column or literal value specifying the H3 resolution (0-15). + + Example:: + >>> from snowflake.snowpark.functions import to_geography, lit + >>> df = session.create_dataframe([ + ... ['POLYGON((-122.481889 37.826683,-122.479487 37.808548,-122.474150 37.808904,-122.476510 37.826935,-122.481889 37.826683))'] + ... ], schema=["polygon_wkt"]) + >>> df.select(h3_polygon_to_cells(to_geography(df["polygon_wkt"]), lit(9))).collect() + [Row(H3_POLYGON_TO_CELLS(TO_GEOGRAPHY("POLYGON_WKT"), 9)='[\\n 617700171177525247,\\n 617700171225497599,\\n 617700171167563775,\\n 617700171167825919,\\n 617700171188011007,\\n 617700171168350207,\\n 617700171168612351,\\n 617700171176476671,\\n 617700171168874495\\n]')] + """ + geography_polygon_c = _to_col_if_str(geography_polygon, "h3_polygon_to_cells") + target_resolution_c = _to_col_if_str(target_resolution, "h3_polygon_to_cells") + return builtin("h3_polygon_to_cells", _emit_ast=_emit_ast)( + geography_polygon_c, target_resolution_c + ) + + +@publicapi +def h3_polygon_to_cells_strings( + geography_polygon: ColumnOrName, + target_resolution: ColumnOrName, + _emit_ast: bool = True, +) -> Column: + """ + Returns an array of H3 cell IDs (as strings) that cover the given geography polygon at the specified resolution. + + Args: + geography_polygon: Column containing the geography polygon to convert to H3 cells. + target_resolution: Column containing the H3 resolution level (0-15) for the output cells. + + Example:: + >>> from snowflake.snowpark.functions import to_geography, lit + >>> df = session.create_dataframe([ + ... ['POLYGON((-122.481889 37.826683,-122.479487 37.808548,-122.474150 37.808904,-122.476510 37.826935,-122.481889 37.826683))'] + ... ], schema=['polygon_wkt']) + >>> df.select(h3_polygon_to_cells_strings(to_geography(df['polygon_wkt']), lit(9))).collect() + [Row(H3_POLYGON_TO_CELLS_STRINGS(TO_GEOGRAPHY("POLYGON_WKT"), 9)='[\\n "892830870bbffff",\\n "89283087397ffff",\\n "89283087023ffff",\\n "89283087027ffff",\\n "8928308715bffff",\\n "8928308702fffff",\\n "89283087033ffff",\\n "892830870abffff",\\n "89283087037ffff"\\n]')] + """ + geography_polygon_c = _to_col_if_str( + geography_polygon, "h3_polygon_to_cells_strings" + ) + target_resolution_c = _to_col_if_str( + target_resolution, "h3_polygon_to_cells_strings" + ) + return builtin("h3_polygon_to_cells_strings", _emit_ast=_emit_ast)( + geography_polygon_c, target_resolution_c + ) + + +@publicapi +def h3_string_to_int(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: + """ + Converts an H3 cell ID from hexadecimal string representation to its integer representation. + + Example:: + + >>> df = session.create_dataframe([['89283087033FFFF']], schema=["cell_id"]) + >>> df.select(h3_string_to_int(df["cell_id"]).alias("result")).collect() + [Row(RESULT=617700171168612351)] + """ + c = _to_col_if_str(cell_id, "h3_string_to_int") + return builtin("h3_string_to_int", _emit_ast=_emit_ast)(c) + + +@publicapi +def h3_try_polygon_to_cells_strings( + geography_polygon: ColumnOrName, + target_resolution: ColumnOrName, + _emit_ast: bool = True, +) -> Column: + """ + Returns an array of H3 cell IDs as strings that cover the given geography polygon + at the specified resolution. Returns NULL if the input is invalid. + + Args: + geography_polygon: A column or column name containing a GEOGRAPHY polygon. + target_resolution: A column or column name containing the target H3 resolution (0-15). + + Example:: + >>> from snowflake.snowpark.functions import to_geography, lit + >>> df = session.create_dataframe([ + ... 'POLYGON((-122.4194 37.7749, -122.4094 37.7749, -122.4094 37.7849, -122.4194 37.7849, -122.4194 37.7749))' + ... ], schema=["polygon_wkt"]) + >>> df.select(h3_try_polygon_to_cells_strings(to_geography(df["polygon_wkt"]), lit(9))).collect() + [Row(H3_TRY_POLYGON_TO_CELLS_STRINGS(TO_GEOGRAPHY("POLYGON_WKT"), 9)='[\\n "8928308287bffff",\\n "8928308280fffff",\\n "89283082873ffff",\\n "8928308286bffff",\\n "89283082847ffff",\\n "89283082863ffff",\\n "89283082877ffff",\\n "8928308280bffff",\\n "89283082867ffff"\\n]')] + """ + geography_col = _to_col_if_str(geography_polygon, "h3_try_polygon_to_cells_strings") + resolution_col = _to_col_if_str( + target_resolution, "h3_try_polygon_to_cells_strings" + ) + return builtin("h3_try_polygon_to_cells_strings", _emit_ast=_emit_ast)( + geography_col, resolution_col + ) + + +@publicapi +def h3_cell_to_children( + cell_id: ColumnOrName, target_resolution: ColumnOrName, _emit_ast: bool = True +) -> Column: + """ + Returns the children of an H3 cell at a specified target resolution. + + Args: + cell_id: The H3 cell ID to get children for. + target_resolution: The target resolution for the children cells. + + Example:: + >>> from snowflake.snowpark.functions import col + >>> df = session.create_dataframe([[613036919424548863, 9]], schema=["cell_id", "target_resolution"]) + >>> df.select(h3_cell_to_children(col("cell_id"), col("target_resolution")).alias("children")).collect() + [Row(CHILDREN='[\\n 617540519050084351,\\n 617540519050346495,\\n 617540519050608639,\\n 617540519050870783,\\n 617540519051132927,\\n 617540519051395071,\\n 617540519051657215\\n]')] + """ + cell_id_c = _to_col_if_str(cell_id, "h3_cell_to_children") + target_resolution_c = _to_col_if_str(target_resolution, "h3_cell_to_children") + return builtin("h3_cell_to_children", _emit_ast=_emit_ast)( + cell_id_c, target_resolution_c + ) + + +@publicapi +def h3_cell_to_children_string( + cell_id: ColumnOrName, target_resolution: ColumnOrName, _emit_ast: bool = True +) -> Column: + """ + Returns the children of the given H3 cell at the specified target resolution as a JSON array string. + + Args: + cell_id: Column containing the H3 cell ID. + target_resolution: Column containing the target resolution for the children cells. + + Example:: + >>> from snowflake.snowpark.functions import col + >>> df = session.create_dataframe([["881F1D4887FFFFF", 9]], schema=["cell_id", "target_resolution"]) + >>> df.select(h3_cell_to_children_string(col("cell_id"), col("target_resolution"))).collect() + [Row(H3_CELL_TO_CHILDREN_STRING("CELL_ID", "TARGET_RESOLUTION")='[\\n "891f1d48863ffff",\\n "891f1d48867ffff",\\n "891f1d4886bffff",\\n "891f1d4886fffff",\\n "891f1d48873ffff",\\n "891f1d48877ffff",\\n "891f1d4887bffff"\\n]')] + """ + cell_id_col = _to_col_if_str(cell_id, "h3_cell_to_children_string") + target_resolution_col = _to_col_if_str( + target_resolution, "h3_cell_to_children_string" + ) + return builtin("h3_cell_to_children_string", _emit_ast=_emit_ast)( + cell_id_col, target_resolution_col + ) + + +@publicapi +def h3_int_to_string(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: + """ + Converts an H3 cell ID from integer format to string format. + + Args: + cell_id: Column containing the H3 cell ID as an integer. + + Example:: + >>> df = session.create_dataframe([617700171168612351], schema=["cell_id"]) + >>> df.select(h3_int_to_string(df["cell_id"]).alias("result")).collect() + [Row(RESULT='89283087033ffff')] + """ + c = _to_col_if_str(cell_id, "h3_int_to_string") + return builtin("h3_int_to_string", _emit_ast=_emit_ast)(c) From 3545e5a0ad72be2aa7cb106dc075a4ee6320f656 Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Thu, 11 Sep 2025 16:01:54 -0600 Subject: [PATCH 2/8] Update src/snowflake/snowpark/_functions/scalar_functions.py Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --- src/snowflake/snowpark/_functions/scalar_functions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/snowflake/snowpark/_functions/scalar_functions.py b/src/snowflake/snowpark/_functions/scalar_functions.py index 9c04eba06e..f6f7f2e2e7 100644 --- a/src/snowflake/snowpark/_functions/scalar_functions.py +++ b/src/snowflake/snowpark/_functions/scalar_functions.py @@ -406,9 +406,11 @@ def h3_try_polygon_to_cells_strings( Example:: >>> from snowflake.snowpark.functions import to_geography, lit + >>> df = session.create_dataframe([ - ... 'POLYGON((-122.4194 37.7749, -122.4094 37.7749, -122.4094 37.7849, -122.4194 37.7849, -122.4194 37.7749))' + ... ['POLYGON((-122.4194 37.7749, -122.4094 37.7749, -122.4094 37.7849, -122.4194 37.7849, -122.4194 37.7749))'] ... ], schema=["polygon_wkt"]) + >>> df.select(h3_try_polygon_to_cells_strings(to_geography(df["polygon_wkt"]), lit(9))).collect() [Row(H3_TRY_POLYGON_TO_CELLS_STRINGS(TO_GEOGRAPHY("POLYGON_WKT"), 9)='[\\n "8928308287bffff",\\n "8928308280fffff",\\n "89283082873ffff",\\n "8928308286bffff",\\n "89283082847ffff",\\n "89283082863ffff",\\n "89283082877ffff",\\n "8928308280bffff",\\n "89283082867ffff"\\n]')] """ From d26020c3eea894e6092b45bfae22e81e38925835 Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Tue, 16 Sep 2025 15:45:16 -0600 Subject: [PATCH 3/8] Update docstrings --- .../snowpark/_functions/scalar_functions.py | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/src/snowflake/snowpark/_functions/scalar_functions.py b/src/snowflake/snowpark/_functions/scalar_functions.py index 8d6ad2c91b..99c44ff3e2 100644 --- a/src/snowflake/snowpark/_functions/scalar_functions.py +++ b/src/snowflake/snowpark/_functions/scalar_functions.py @@ -542,8 +542,12 @@ def h3_polygon_to_cells( """Returns the H3 cell IDs contained by the input polygon at the specified resolution. Args: - geography_polygon: A column containing a GEOGRAPHY object representing a polygon. - target_resolution: A column or literal value specifying the H3 resolution (0-15). + geography_polygon (ColumnOrName): A GEOGRAPHY object representing a polygon. + target_resolution (ColumnOrName): The H3 resolution (0-15). + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: An array of H3 cell IDs as integers. Example:: >>> from snowflake.snowpark.functions import to_geography, lit @@ -570,8 +574,12 @@ def h3_polygon_to_cells_strings( Returns an array of H3 cell IDs (as strings) that cover the given geography polygon at the specified resolution. Args: - geography_polygon: Column containing the geography polygon to convert to H3 cells. - target_resolution: Column containing the H3 resolution level (0-15) for the output cells. + geography_polygon (ColumnOrName): The GEOGRAPHY polygon to convert to H3 cells. + target_resolution (ColumnOrName): The H3 resolution level (0-15) for the output cells. + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: An array of H3 cell IDs as strings. Example:: >>> from snowflake.snowpark.functions import to_geography, lit @@ -597,6 +605,13 @@ def h3_string_to_int(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: """ Converts an H3 cell ID from hexadecimal string representation to its integer representation. + Args: + cell_id (ColumnOrName): The H3 cell ID as a hexadecimal string. + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: The H3 cell ID as an integer. + Example:: >>> df = session.create_dataframe([['89283087033FFFF']], schema=["cell_id"]) @@ -618,8 +633,11 @@ def h3_try_polygon_to_cells_strings( at the specified resolution. Returns NULL if the input is invalid. Args: - geography_polygon: A column or column name containing a GEOGRAPHY polygon. - target_resolution: A column or column name containing the target H3 resolution (0-15). + geography_polygon (ColumnOrName): The GEOGRAPHY polygon. + target_resolution (ColumnOrName): The target H3 resolution (0-15). + + Returns: + Column: An array of H3 cell IDs as strings, or NULL if the input is invalid. Example:: >>> from snowflake.snowpark.functions import to_geography, lit @@ -648,8 +666,12 @@ def h3_cell_to_children( Returns the children of an H3 cell at a specified target resolution. Args: - cell_id: The H3 cell ID to get children for. - target_resolution: The target resolution for the children cells. + cell_id (ColumnOrName): The H3 cell ID to get children for. + target_resolution (ColumnOrName): The target resolution for the children cells. + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: A JSON array string containing the children H3 cell IDs. Example:: >>> from snowflake.snowpark.functions import col @@ -672,8 +694,12 @@ def h3_cell_to_children_string( Returns the children of the given H3 cell at the specified target resolution as a JSON array string. Args: - cell_id: Column containing the H3 cell ID. - target_resolution: Column containing the target resolution for the children cells. + cell_id (ColumnOrName): Column containing the H3 cell ID. + target_resolution (ColumnOrName): Column containing the target resolution for the children cells. + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: A JSON array string containing the children H3 cell IDs. Example:: >>> from snowflake.snowpark.functions import col @@ -696,7 +722,11 @@ def h3_int_to_string(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: Converts an H3 cell ID from integer format to string format. Args: - cell_id: Column containing the H3 cell ID as an integer. + cell_id (ColumnOrName): The H3 cell ID as an integer. + _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. + + Returns: + Column: The H3 cell ID as a hexadecimal string. Example:: >>> df = session.create_dataframe([617700171168612351], schema=["cell_id"]) From 01718101b3ce3fdec64e2f3363de88400a59da2a Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Tue, 16 Sep 2025 15:46:42 -0600 Subject: [PATCH 4/8] Update changelog --- CHANGELOG.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dd23df761..a087c63355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,23 +42,23 @@ - Added a new function `snowflake.snowpark.functions.vectorized` that allows users to mark a function as vectorized UDF. - Added support for parameter `use_vectorized_scanner` in function `Session.write_pandas()`. - Added support for the following scalar functions in `functions.py`: - - `getdate` - - `getvariable` - - `invoker_role` - - `invoker_share` - - `is_application_role_in_session` - - `is_database_role_in_session` - - `is_granted_to_invoker_role` - - `is_role_in_session` - - `localtime` - - `systimestamp` - - `h3_polygon_to_cells` - - `h3_polygon_to_cells_strings` - - `h3_string_to_int` - - `h3_try_polygon_to_cells_strings` - - `h3_cell_to_children` - - `h3_cell_to_children_string` - - `h3_int_to_string` + - `getdate` + - `getvariable` + - `h3_cell_to_children` + - `h3_cell_to_children_string` + - `h3_int_to_string` + - `h3_polygon_to_cells` + - `h3_polygon_to_cells_strings` + - `h3_string_to_int` + - `h3_try_polygon_to_cells_strings` + - `invoker_role` + - `invoker_share` + - `is_application_role_in_session` + - `is_database_role_in_session` + - `is_granted_to_invoker_role` + - `is_role_in_session` + - `localtime` + - `systimestamp` #### Bug Fixes From f098bcfb46acdc4a0a9a18c2881087e40aee9a4e Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Tue, 16 Sep 2025 16:12:32 -0600 Subject: [PATCH 5/8] Update docstrings --- src/snowflake/snowpark/_functions/scalar_functions.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/snowflake/snowpark/_functions/scalar_functions.py b/src/snowflake/snowpark/_functions/scalar_functions.py index 99c44ff3e2..ccb659a8d4 100644 --- a/src/snowflake/snowpark/_functions/scalar_functions.py +++ b/src/snowflake/snowpark/_functions/scalar_functions.py @@ -544,7 +544,6 @@ def h3_polygon_to_cells( Args: geography_polygon (ColumnOrName): A GEOGRAPHY object representing a polygon. target_resolution (ColumnOrName): The H3 resolution (0-15). - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: An array of H3 cell IDs as integers. @@ -576,7 +575,6 @@ def h3_polygon_to_cells_strings( Args: geography_polygon (ColumnOrName): The GEOGRAPHY polygon to convert to H3 cells. target_resolution (ColumnOrName): The H3 resolution level (0-15) for the output cells. - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: An array of H3 cell IDs as strings. @@ -607,7 +605,6 @@ def h3_string_to_int(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: Args: cell_id (ColumnOrName): The H3 cell ID as a hexadecimal string. - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: The H3 cell ID as an integer. @@ -668,7 +665,6 @@ def h3_cell_to_children( Args: cell_id (ColumnOrName): The H3 cell ID to get children for. target_resolution (ColumnOrName): The target resolution for the children cells. - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: A JSON array string containing the children H3 cell IDs. @@ -696,7 +692,6 @@ def h3_cell_to_children_string( Args: cell_id (ColumnOrName): Column containing the H3 cell ID. target_resolution (ColumnOrName): Column containing the target resolution for the children cells. - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: A JSON array string containing the children H3 cell IDs. @@ -723,7 +718,6 @@ def h3_int_to_string(cell_id: ColumnOrName, _emit_ast: bool = True) -> Column: Args: cell_id (ColumnOrName): The H3 cell ID as an integer. - _emit_ast (bool, optional): Whether to emit the abstract syntax tree (AST). Defaults to True. Returns: Column: The H3 cell ID as a hexadecimal string. From e7296892d0a25e9c8e34f3ad778a69037038761b Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Thu, 18 Sep 2025 10:10:31 -0600 Subject: [PATCH 6/8] update Changelog --- CHANGELOG.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22bc76ae89..7e34b2920e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ #### New Features +- Added support for the following scalar functions in `functions.py`: + - `h3_cell_to_children` + - `h3_cell_to_children_string` + - `h3_int_to_string` + - `h3_polygon_to_cells` + - `h3_polygon_to_cells_strings` + - `h3_string_to_int` + - `h3_try_polygon_to_cells_strings` + #### Improvements - Hybrid execution mode is now enabled by default. Certain operations on smaller data will now automatically execute in native pandas in-memory. Use `from modin.config import AutoSwitchBackend; AutoSwitchBackend.disable()` to turn this off and force all execution to occur in Snowflake. - Removed an unnecessary `SHOW OBJECTS` query issued from `read_snowflake` under certain conditions. @@ -52,13 +61,6 @@ - Added support for the following scalar functions in `functions.py`: - `getdate` - `getvariable` - - `h3_cell_to_children` - - `h3_cell_to_children_string` - - `h3_int_to_string` - - `h3_polygon_to_cells` - - `h3_polygon_to_cells_strings` - - `h3_string_to_int` - - `h3_try_polygon_to_cells_strings` - `invoker_role` - `invoker_share` - `is_application_role_in_session` From 2d2ecaf84ec2e6485acab9c7ce45a66eb98d10ef Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Fri, 19 Sep 2025 08:19:05 -0600 Subject: [PATCH 7/8] Update changelog --- CHANGELOG.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1ff02b67d..4e987c2d28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ - `dp_interval_low` - `greatest_ignore_nulls` - `h3_cell_to_boundary` + - `h3_cell_to_children` + - `h3_cell_to_children_string` - `h3_cell_to_parent` - `h3_cell_to_point` - `h3_compact_cells` @@ -41,6 +43,11 @@ - `h3_get_resolution` - `h3_grid_disk` - `h3_grid_distance` + - `h3_int_to_string` + - `h3_polygon_to_cells` + - `h3_polygon_to_cells_strings` + - `h3_string_to_int` + - `h3_try_polygon_to_cells_strings` - `hex_decode_binary` - `last_query_id` - `last_transaction` @@ -54,15 +61,6 @@ #### New Features -- Added support for the following scalar functions in `functions.py`: - - `h3_cell_to_children` - - `h3_cell_to_children_string` - - `h3_int_to_string` - - `h3_polygon_to_cells` - - `h3_polygon_to_cells_strings` - - `h3_string_to_int` - - `h3_try_polygon_to_cells_strings` - #### Improvements - Hybrid execution mode is now enabled by default. Certain operations on smaller data will now automatically execute in native pandas in-memory. Use `from modin.config import AutoSwitchBackend; AutoSwitchBackend.disable()` to turn this off and force all execution to occur in Snowflake. From 9d46fb0c3c5cbd2252a2548132e5a07952f454d6 Mon Sep 17 00:00:00 2001 From: Arturo Herrera Aguilar Date: Fri, 19 Sep 2025 08:38:53 -0600 Subject: [PATCH 8/8] Update changelog --- CHANGELOG.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e987c2d28..d0faf8d22d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,16 +103,16 @@ - Added a new function `snowflake.snowpark.functions.vectorized` that allows users to mark a function as vectorized UDF. - Added support for parameter `use_vectorized_scanner` in function `Session.write_pandas()`. - Added support for the following scalar functions in `functions.py`: - - `getdate` - - `getvariable` - - `invoker_role` - - `invoker_share` - - `is_application_role_in_session` - - `is_database_role_in_session` - - `is_granted_to_invoker_role` - - `is_role_in_session` - - `localtime` - - `systimestamp` + - `getdate` + - `getvariable` + - `invoker_role` + - `invoker_share` + - `is_application_role_in_session` + - `is_database_role_in_session` + - `is_granted_to_invoker_role` + - `is_role_in_session` + - `localtime` + - `systimestamp` #### Bug Fixes