Skip to content

Backport #97821 to 26.2: Add compatibility setting functions_h3_default_if_invalid - #99338

Merged
clickhouse-gh[bot] merged 1 commit into
26.2from
backport/26.2/97821
Mar 12, 2026
Merged

clickhouse-gh[bot] merged 1 commit into
26.2from
backport/26.2/97821

Conversation

@robot-ch-test-poll3

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

Copy link
Copy Markdown
Contributor

Original pull-request #97821
Cherry-pick pull-request #99334

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job


Note

Medium Risk
Changes runtime behavior of multiple H3 SQL functions by optionally suppressing errors and returning default values on invalid indexes, which can mask bad data and alter query results. Broad touch surface across several functions but gated behind a new setting (default remains throwing).

Overview
Adds a new setting, functions_h3_default_if_invalid, to control whether H3 functions throw on invalid H3 cell indexes or return default values (0 / empty arrays / (0,0) coordinates).

Introduces H3Validator in h3Common and threads it through many H3 functions (e.g. h3ToGeo, h3kRing, h3Line, area/neighbor/edge helpers) so invalid inputs short-circuit instead of calling into the H3 library when the setting is enabled. Includes a new stateless test (04034) covering both error-throwing and default-return behaviors.

Written by Cursor Bugbot for commit 38dbae9. This will update automatically on new commits. Configure here.

Version info

  • Merged into: 26.2.5.21

@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Mar 12, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [38dbae9]

Summary: ✅

@clickhouse-gh
clickhouse-gh Bot merged commit 3c6b843 into 26.2 Mar 12, 2026
33 of 34 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.2/97821 branch March 12, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants