You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Oleg Danilov (JIRA)" <ji...@apache.org> on 2018/01/21 22:33:00 UTC
[jira] [Updated] (HIVE-18506) LlapBaseInputFormat - negative array
index
[ https://issues.apache.org/jira/browse/HIVE-18506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Danilov updated HIVE-18506:
--------------------------------
Attachment: HIVE-18506.patch
> LlapBaseInputFormat - negative array index
> ------------------------------------------
>
> Key: HIVE-18506
> URL: https://issues.apache.org/jira/browse/HIVE-18506
> Project: Hive
> Issue Type: Bug
> Reporter: Oleg Danilov
> Priority: Minor
> Attachments: HIVE-18506.patch
>
>
>
> "nextInt % value" may generate negative values:
> {code:java}
> int randIdx = rand.nextInt() % allInstances.size();
> serviceInstance = allInstances.toArray(serviceInstanceArray)[randIdx];
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)