-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Decode functions for range field binary encoded doc values #41206
Merged
not-napoleon
merged 16 commits into
elastic:feature-range-aggregations
from
not-napoleon:feature/binary-range-decoder
May 7, 2019
Merged
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ee1648b
Double range decoder
not-napoleon a302f01
refactoring the decode function
not-napoleon 591d26b
decode float ranges
not-napoleon db2b576
decode long ranges
not-napoleon 8b9c50a
Make lengthType a property of RangeType
not-napoleon 48e8b55
wire decode logic into the RangeType enum
not-napoleon 9988171
IP range decoder & tests
not-napoleon fd1f5d9
Some test randomization
not-napoleon fd39453
fixed checkstyle issue
not-napoleon 9c9fcc2
Merge branch 'master' into feature/binary-range-decoder
not-napoleon 9492559
refactored LengthType into BinaryRangeUtil
not-napoleon 6ab6652
Merge branch 'master' into feature/binary-range-decoder
not-napoleon bce5737
Update tests based on PR feedback
not-napoleon 08305d5
Refactor RangeType to a top level class
not-napoleon fa8ff70
Fix checkstyle issues
not-napoleon 9f5720f
Merge branch 'master' into feature/binary-range-decoder
not-napoleon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract LengthType in his own file and leave this class package protected ? The encoding should remain internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I feel really bad about making
LengthType
a top level enum; it's very much an implementation detail of the range encoding. The more I thought about it, the more I came to feel it really should be part ofRangeType
, and my only objection to putting it there in the first place was thatRangeFieldMapper
is already 1000 lines and defines half a dozen classes. So I madeRangeType
a top level enum and putLengthType
under that.RangeType
needs to be public anyway, so there's no increased API surface with this arrangement.This seems like the most natural refactoring to me, since
LengthType
is a direct function ofRangeType
, but I'm open to rolling that back and just makingLengthType
a top level if you feel strongly that's the right way to do this. Thanks for the feedback!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fine with me, thanks for explaining