-
Notifications
You must be signed in to change notification settings - Fork 506
Orc 256 unmask range option #184
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
Orc 256 unmask range option #184
Conversation
7f8443c to
7ab1f6f
Compare
|
Updated the PR he changes are as follows:
|
|
I think we should change the processing for numerics (when there is unmasked ranges) to be: unmasked number -> string -> mask as string -> masked number |
Signed-off-by: Sandeep More <more@apache.org>
7ab1f6f to
4d3ed79
Compare
|
@omalley I updated the PR with your suggestions, sadly, there are two commits I could not squash the "merge from master" commit, let me know if this is an issue. thanks for the review ! |
| private final boolean maskTimestamp; | ||
|
|
||
| // index tuples that are not to be masked | ||
| private final SortedMap<Integer,Integer> unmaskIndexRanges = Collections.synchronizedSortedMap(new TreeMap()); |
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.
Any particular reason that you need a sychronized map here?
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.
Hello @xndai,
Thanks for the review, I was trying to be cautious, but I can get rid of it.
| for(int r = start; r < start + length; ++r) { | ||
| target.vector[r] = maskLong(source.vector[r]) & mask; | ||
| target.isNull[r] = source.isNull[r]; | ||
| target.vector[r] = maskLong(source.vector[r]) & mask; |
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.
Remove leading space. Same as below.
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.
I think this is fixed, it was an issue with the previous patch.
| posn = -posn -2; | ||
| } | ||
| return DIGIT_REPLACEMENT * base * DOUBLE_POWER_10[posn]; | ||
| return unmaskRangeDoubleValue(value,DIGIT_REPLACEMENT * base * DOUBLE_POWER_10[posn]); |
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.
Add space after comma.
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.
I think this is fixed, the method signature is different. I think you are seeing an older commit which is weird, let me know if you still see this.
| assertEquals(new HiveDecimalWritable("777777777777777777.7777"), | ||
| mask.maskDecimal(new HiveDecimalWritable("0123456789123456789.01230"))); | ||
| */ | ||
|
|
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.
remove empty lines. Same for other places.
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, will do.
This PR contains changes that enables unmasking range option for redact mask (ORC-256).