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.
Any particular reason that you need a sychronized map here?
There was a problem hiding this comment.
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.
Remove leading space. Same as below.
There was a problem hiding this comment.
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.
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.
remove empty lines. Same for other places.
This PR contains changes that enables unmasking range option for redact mask (ORC-256).