-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix encrypt large value #15199
Fix encrypt large value #15199
Conversation
a7fe457
to
ccca045
Compare
|
||
Random rnd = new Random(0); | ||
String val = rnd.doubles(50_000).mapToObj(Double::toString).collect(Collectors.joining(",")); | ||
tester.assertRoundTrip( |
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.
this test doesn't use testRoundTrip() because there is some bug with the hive reader reading the list value test (unrelated to encryption)
length = chunk.length; | ||
offset = 0; | ||
// size after encryption should not exceed what the 3 byte header can hold (2^23) | ||
if (length > 8388608) { | ||
throw new OrcEncryptionException("Encrypted data size %s exceeds limit of 2^23 %s", length); |
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.
The message has two %s placeholders, it should either have two length
arguments or not have the last %s.
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.
good catch, thank you!
f83e4b6
to
3022887
Compare
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.
typos in the commit message:
- "valuess" -> "values"
- "datat" -> "data"
We were using the incorrect offsets for the data we were encrypting and for the output buffer
3022887
to
217e24b
Compare
Test plan - new unit test in AbstractTestOrcReader