-
Notifications
You must be signed in to change notification settings - Fork 19
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
Backport string hist encoding to main #234
Merged
osopardo1
merged 20 commits into
Qbeast-io:main
from
alexeiakimov:backport-string-hist-encoding-to-main
Nov 27, 2023
Merged
Backport string hist encoding to main #234
osopardo1
merged 20 commits into
Qbeast-io:main
from
alexeiakimov:backport-string-hist-encoding-to-main
Nov 27, 2023
Conversation
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
…orrect-implementation-of-equals-and-hashcode Qbeast-io#228 Implementation of equals/hashCode of CubeId is fixed
String hist encoding
osopardo1
approved these changes
Nov 24, 2023
All good! |
5 tasks
cugni
approved these changes
Nov 27, 2023
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces a new String
Transformation
that uses String histograms for value mapping.(Backport the feature from
main-1.0.0
)How does it work?
A sorted sequence of distinct string values should be provided to map String values to the space.
The sequence is treated as an equal-width histogram for the column to index.
To transforma a given String value, we look for its insertion position within the sequence using binary search:
Values that are not contained within the limits of the histogram are mapped to their corresponding extremes, i.e.
0.0
or1.0
.How to use?
To use the feature, we build the histogram and provide it as part of
columnStats
when writing.:histogram
should also be specified for the String column to index.If no histogram is provided in
columnStats
during the first write, a default histogram("a" to "z") will be used. Subsequentappends
will reuse the same histogram.A new revision will be created when a different custom histogram is provided as "columnStats".
Note: It also fixes the bug where the first write has to have
overwrite
write mode.Checklist: