-
Notifications
You must be signed in to change notification settings - Fork 36
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
Deep sort hashes #52
Deep sort hashes #52
Conversation
Added new dependency 'deepsort' gem from 'https://github.com/mcrossen/deepsort'.
The code looks good. Any ETA on this being merged? This functionality is needed for multiple other PRs. |
Hi @ypid-geberit, sorry for for the confusion. I needed this feature with combination of #50 and this change and even though #41 fixes the deep sort problem, I tried to be the least invasive to the current code. Although your solution is independent of external libraries, which is better in the long term, it presents possible duplicate to the tested and existent library mcrossen/deepsort. To compare, both solutions deepsorts the event objects, #41 still proposes breaking changes with the |
Thanks very much! I guess when external dependencies are ok, your solution is cleaner, has no breaking changes by default (which was also my intention with #41, which was still waiting on further info) and should thus be preferred. |
Thanks for the PR, I've looked into deepsort gem and I am not sure I like bringing it in as a dependency. So before doing a review here it would be worth re-thinking the "deep-sort" method in house. |
Fingerprinting is done by either fetching the .to_hash representation or by fetching fields with .get(field) The content of these often contain hashes, which we don't guarantee order during insertion, so this commit recursively sorts hashes. This change affects all modes: * concatenate_all_sources => true * concatenate_fields => true * normal single field fingerprint (that may contain a nested Hash) Fixes #39 Replaces #41, #52
Nice to see this bug finally got fixed by #55. This alternative PR can probably be closed. |
Closing this PR as per the above comment. |
Added new dependency 'deepsort' gem from 'https://github.com/mcrossen/deepsort'.
This PR is a prerequisite for #50. If it's merged, I will rebase #50 to master and make the necessary changes.