Skip to content

Conversation

@Fengzdadi
Copy link
Contributor

@Fengzdadi Fengzdadi commented May 25, 2025

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

  • Add a new murmur_hash function (MurmurHash2 64-bit variant) under nebula3/utils/hash.py
  • Remove ctypes dependency and use int.from_bytes for better performance and readability
  • Support both str (UTF-8) and bytes inputs, with appropriate type checking
  • Add comprehensive unit tests (tests/test_hash.py) covering:
    • Empty input, single byte, exactly 8 bytes, >8 bytes, Unicode strings
    • Seed variation, idempotency, invalid types, large inputs
  • Add integration tests (tests/test_hash_integration.py) to verify client hash() against server YIELD hash(...)

@CLAassistant
Copy link

CLAassistant commented May 25, 2025

CLA assistant check
All committers have signed the CLA.

@Fengzdadi Fengzdadi marked this pull request as draft May 25, 2025 10:33
@Fengzdadi Fengzdadi marked this pull request as ready for review May 25, 2025 10:46
@wey-gu
Copy link
Contributor

wey-gu commented Jun 9, 2025

looks like our runner's pdm env is dirty, trying to run py310's pdm code on py37, where there are walrus symbol := that's foreign to py37.

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.

feat: hash gen

3 participants