Skip to content

Cherry pick #97821 to 26.2: Add compatibility setting functions_h3_default_if_invalid - #99334

Merged
robot-ch-test-poll3 merged 10 commits into
backport/26.2/97821from
cherrypick/26.2/97821
Mar 12, 2026
Merged

robot-ch-test-poll3 merged 10 commits into
backport/26.2/97821from
cherrypick/26.2/97821

Conversation

@robot-ch-test-poll4

@robot-ch-test-poll4 robot-ch-test-poll4 commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

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-pick locally.
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:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The 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: throw INCORRECT_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 new H3Validator that 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.

@robot-ch-test-poll4 robot-ch-test-poll4 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Mar 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}.

Fix in Cursor Fix in Web

@robot-ch-test-poll3
robot-ch-test-poll3 merged this pull request into backport/26.2/97821 Mar 12, 2026
1 check passed
@robot-ch-test-poll3
robot-ch-test-poll3 deleted the cherrypick/26.2/97821 branch March 12, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants