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

Fix string hash and add more hash tests #3473

Merged
merged 1 commit into from May 13, 2024
Merged

Fix string hash and add more hash tests #3473

merged 1 commit into from May 13, 2024

Conversation

benjaminwinger
Copy link
Collaborator

@benjaminwinger benjaminwinger commented May 10, 2024

Should fix kuzudb/explorer#129. Not only was the type of the value being used for the bit shift not wide enough (the characters are chars, but the result of a bitshift seems to always be at least int), but it was signed, and signed bit shifts may add new bits as 0 or 1 depending on the implementation, which I think is causing the difference among the platforms.

The existing string tests were fairly limited so I added some more which better cover the corner cases.

This will break storage since is changes the behaviour of the hash function used in the hash index.

@benjaminwinger benjaminwinger force-pushed the hash-test branch 3 times, most recently from aee2f0e to 98edf6a Compare May 10, 2024 20:57
@benjaminwinger benjaminwinger changed the title Test hashes in CI Test more hashes in CI May 10, 2024
@benjaminwinger benjaminwinger force-pushed the hash-test branch 2 times, most recently from 9fd5cbb to 6f9f387 Compare May 10, 2024 22:16
@benjaminwinger benjaminwinger changed the title Test more hashes in CI Fix string hash and add more hash tests May 10, 2024
@benjaminwinger benjaminwinger marked this pull request as ready for review May 10, 2024 22:25
@ray6080
Copy link
Contributor

ray6080 commented May 12, 2024

This will break storage since is changes the behaviour of the hash function used in the hash index.

We should bump cmake version then?

This change will break storage compatibility
@benjaminwinger
Copy link
Collaborator Author

We should bump cmake version then?

Done

@benjaminwinger benjaminwinger merged commit 44f09ee into master May 13, 2024
18 checks passed
@benjaminwinger benjaminwinger deleted the hash-test branch May 13, 2024 20:43
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.

Inconsistent behaviour between CLI and Explorer when specifying equality predicate on WHERE clause
2 participants