Skip to content

Use GeoHash instead of &GeoHash - #8443

Merged
xzfc merged 1 commit into
devfrom
geohash-copy
Mar 18, 2026
Merged

xzfc merged 1 commit into
devfrom
geohash-copy

Conversation

@xzfc

@xzfc xzfc commented Mar 18, 2026

Copy link
Copy Markdown
Member

First commit in the stack #8433.

@xzfc xzfc mentioned this pull request Mar 18, 2026
@xzfc
xzfc marked this pull request as ready for review March 18, 2026 09:52
@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 41eb462f-4fcb-46da-b8e7-885e5bef4017

📥 Commits

Reviewing files that changed from the base of the PR and between 0f2cd47 and df152e6.

📒 Files selected for processing (4)
  • lib/segment/src/index/field_index/geo_index/immutable_geo_index.rs
  • lib/segment/src/index/field_index/geo_index/mmap_geo_index.rs
  • lib/segment/src/index/field_index/geo_index/mod.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index.rs

📝 Walkthrough

Walkthrough

This pull request refactors the GeoHash API in the geo_index module to use value-based ownership instead of references. Changes span four files: immutable_geo_index.rs, mmap_geo_index.rs, mod.rs, and mutable_geo_index.rs. Method signatures for points_per_hash, points_of_hash, values_of_hash, and hash value counting functions are updated to accept and return GeoHash by value. Call sites, closure mappings, and iteration patterns are adjusted accordingly. Additionally, mmap_geo_index.rs introduces IO read cost accounting for operations on Counts slices.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • timvisee
  • coszio
  • agourlay
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately and concisely describes the main change: converting GeoHash API from reference-based (&GeoHash) to value-based (GeoHash) across multiple files in the geo_index module.
Description check ✅ Passed The description identifies this as the first commit in a referenced stack (#8433) and relates to the title's change of using GeoHash instead of &GeoHash, though minimal detail is provided.
Docstring Coverage ✅ Passed Docstring coverage is 96.67% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch geohash-copy
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

@generall generall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand why we should care about it, but sure, LGTM

@xzfc
xzfc merged commit 6e12a94 into dev Mar 18, 2026
15 checks passed
@xzfc
xzfc deleted the geohash-copy branch March 18, 2026 10:23
@xzfc

xzfc commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

I don't understand why we should care about it

My private branch that integrates UIO into geo_index depends on it. I extracted this change for easier review because it's self-contained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants