Uh oh!
There was an error while loading. Please reload this page.
ORC-1384: Fix ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary - #1431
ORC-1384: Fix ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary#1431zratkai wants to merge 2 commits into
ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary#1431Conversation
Uh oh!
There was an error while loading. Please reload this page.
Thank you for making the PR. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
deshanxiao
commented
Mar 8, 2023
Actually, the issue blocked the upgrade of ORC in Hive: |
zratkai
commented
Mar 8, 2023
@deshanxiao thanks for adding this info. Yes, exactly, this was the original issue I started with. To finish it this fix is needed. |
…tream bigger then dictionary ### What changes were proposed in this pull request? Avoid ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary. Check the size of the dictionary and input and read only the min of those. ### Why are the changes needed? In Hive when reading with LLAP data is read in 4kB blocks which leads to ArrayIndexOutOfBoundsException when the dictionary is smaller. ### How was this patch tested? It is tested with HIVE's qtest, since here we do not have the necessary subclasses. This closesapache#1384
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Thank you for making a PR, @zratkai .
- Do you happen to know what caused this regression?
- Do you think you can add a small unit test which you described in the commets?
dongjoon-hyun
commented
Mar 8, 2023
Also cc @williamhyun |
zratkai
commented
Mar 9, 2023
|
ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM.
Merged to main/1.8 for Apache ORC 1.8.3
…y stream bigger then dictionary ### What changes were proposed in this pull request? Avoid ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary. Check the size of the dictionary and input and read only the min of those. ### Why are the changes needed? In Hive when reading with LLAP data is read in 4kB blocks which leads to ArrayIndexOutOfBoundsException when the dictionary is smaller. ### How was this patch tested? It is tested with HIVE's qtest, since here we do not have the necessary subclasses. Closes#1431 from zratkai/ORC-1384. Lead-authored-by: Zoltan Ratkai <zratkai@cloudera.com> Co-authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 8cf9057) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun
commented
Mar 9, 2023
Thank you, @zratkai and @guiyanakuang . Also, cc @williamhyun |
dongjoon-hyun
commented
Mar 9, 2023
…y stream bigger then dictionary ### What changes were proposed in this pull request? Avoid ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary. Check the size of the dictionary and input and read only the min of those. ### Why are the changes needed? In Hive when reading with LLAP data is read in 4kB blocks which leads to ArrayIndexOutOfBoundsException when the dictionary is smaller. ### How was this patch tested? It is tested with HIVE's qtest, since here we do not have the necessary subclasses. Closesapache#1431 from zratkai/ORC-1384. Lead-authored-by: Zoltan Ratkai <zratkai@cloudera.com> Co-authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
Avoid ArrayIndexOutOfBoundsException when reading dictionary stream bigger then dictionary. Check the size of the dictionary and input and read only the min of those.
Why are the changes needed?
In Hive when reading with LLAP data is read in 4kB blocks which leads to ArrayIndexOutOfBoundsException when the dictionary is smaller.
How was this patch tested?
It is tested with HIVE's qtest, since here we do not have the necessary subclasses.