Skip to content

docs: missing documentation for hilbert_range_index function #3302

@sundy-li

Description

@sundy-li

Missing Feature Documentation

The hilbert_range_index scalar function is implemented in Databend source but has no documentation page.

Function Signature

hilbert_range_index(val1, boundaries1, val2, boundaries2 [, val3, boundaries3 [, val4, boundaries4]])
  • Accepts 2–4 dimensions (4, 6, 8, or 10 arguments total)
  • Each dimension takes a value and an array of boundary values for partitioning
  • Returns BINARY — the Hilbert curve index for the given multi-dimensional point
  • Used for locality-preserving data clustering (e.g., as a cluster key)

Source References

  • src/query/functions/src/scalars/hilbert.rs — full implementation with registration
  • Registered as "hilbert_range_index" in the function factory
  • Related: CLUSTER BY hilbert_range_index(...) usage in recluster planner (src/query/sql/src/planner/plans/recluster.rs)

What's Missing

  • No function reference page under docs/en/sql-reference/20-sql-functions/
  • No guide showing how to use hilbert_range_index as a cluster key for multi-dimensional data

Suggested Location

  • New page: docs/en/sql-reference/20-sql-functions/20-other-functions/hilbert-range-index.md
  • Or a dedicated section in the clustering/table optimization guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-fixIssue can be automatically fixeddocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions