Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkg/ottl] Add Murmur3Hash converter #37027

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kaisecheng
Copy link
Contributor

Description

Add four murmur3 hash functions to convert the target to signed integer or hexadecimal string format

Murmur3Hash returns a signed integer of the Murmur3 32-bit hash
Murmur3Hash128 returns two signed integers of Murmur3 128-bit hash
Murmur3Hex returns a hexadecimal string in little-endian of the 32-bit Murmur3 hash
Murmur3Hex128 returns a hexadecimal string in little-endian of the 128-bit Murmur3 hash

Example: Murmur3Hash("20250106")

Link to tracking issue

issue: #34077

supersedes: #34155

Testing

  • Unit tests
  • E2E tests

Documentation

readme

- Murmur3Hash: Murmur3 32-bit hash represented as a signed integer
- Murmur3Hash128: Murmur3 128-bit hash represented as two signed integers
- Murmur3Hex: hexadecimal string in little-endian of the 32-bit Murmur3 hash
- Murmur3Hex128: hexadecimal string in little-endian of the 128-bit Murmur3 hash
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 86.20690% with 8 lines in your changes missing coverage. Please review.

Project coverage is 79.64%. Comparing base (f05adc6) to head (c3a81ba).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ottl/ottlfuncs/func_murmur3.go 85.18% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #37027   +/-   ##
=======================================
  Coverage   79.63%   79.64%           
=======================================
  Files        2223     2224    +1     
  Lines      210283   210341   +58     
=======================================
+ Hits       167456   167517   +61     
- Misses      37211    37214    +3     
+ Partials     5616     5610    -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants