Repository navigation
Cherry pick #97821 to 26.2: Add compatibility setting functions_h3_default_if_invalid - #99334
Conversation
Add compatibility setting functions_h3_default_if_invalid
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| {"opentelemetry_start_keeper_trace_probability", "auto", "auto", "New setting"}, | ||
| {"delta_lake_reload_schema_for_consistency", false, false, "New setting to control whether DeltaLake reloads schema before each query for consistency."}, | ||
| {"allow_nullable_tuple_in_extracted_subcolumns", false, false, "New setting controlling whether extracted Tuple subcolumns can be nullable."}, | ||
| {"functions_h3_default_if_invalid", true, false, "A new setting for legacy behaviour to allow invalid inputs to h3 functions"}, |
There was a problem hiding this comment.
Settings history has inverted previous_value for new setting
High Severity
The functions_h3_default_if_invalid entry uses true as the previous value, but the old behavior (before this setting existed) was to always throw on invalid input, which corresponds to false. With {true, false}, users setting compatibility to any version before 26.2 will get functions_h3_default_if_invalid = true, silently returning defaults instead of throwing — the exact opposite of the actual pre-26.2 behavior. The entry needs to be {false, false}.


Original pull-request #97821
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job
Note
Medium Risk
Changes runtime behavior of multiple H3 functions based on a new setting, potentially altering query results (default values vs exceptions) when enabled. Default behavior remains unchanged, but broad surface area across geo functions increases regression risk.
Overview
Adds a new setting,
functions_h3_default_if_invalid, to control how H3 functions handle invalid cell indexes: throwINCORRECT_DATA(default) or return default values (0 / empty arrays).Refactors affected H3 functions (e.g.
h3ToGeo,h3kRing,h3Line,h3Distance, area/neighbor/edge helpers) to use a newH3Validatorthat consults the setting and skips H3 library calls when inputs are invalid, plus adds a stateless test covering both modes.Written by Cursor Bugbot for commit 0e3d58e. This will update automatically on new commits. Configure here.