You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hive QA (JIRA)" <ji...@apache.org> on 2015/09/14 11:17:45 UTC
[jira] [Commented] (HIVE-5623) ORC accessing array column that's
empty will fail with java out of bound exception
[ https://issues.apache.org/jira/browse/HIVE-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14743210#comment-14743210 ]
Hive QA commented on HIVE-5623:
-------------------------------
{color:red}Overall{color}: -1 at least one tests failed
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12755670/HIVE-5623.patch
{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 9439 tests executed
*Failed tests:*
{noformat}
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation
org.apache.hive.hcatalog.streaming.TestStreaming.testInterleavedTransactionBatchCommits
org.apache.hive.hcatalog.streaming.TestStreaming.testTransactionBatchEmptyCommit
{noformat}
Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5270/testReport
Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5270/console
Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-5270/
Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}
This message is automatically generated.
ATTACHMENT ID: 12755670 - PreCommit-HIVE-TRUNK-Build
> ORC accessing array column that's empty will fail with java out of bound exception
> ----------------------------------------------------------------------------------
>
> Key: HIVE-5623
> URL: https://issues.apache.org/jira/browse/HIVE-5623
> Project: Hive
> Issue Type: Bug
> Components: File Formats
> Affects Versions: 0.11.0
> Reporter: Eric Chu
> Assignee: Prasanth Jayachandran
> Priority: Critical
> Labels: orcfile
> Attachments: HIVE-5623.patch
>
>
> In our ORC tests we saw that queries that work on RCFile failed on the corresponding ORC version with Java IndexOutOfBoundsException in OrcStruct.java. The queries failed b/c the table has an array type column and there are rows with an empty array. We noticed that the getList(Object list, int i) method in OrcStruct.java simply returns the i-th element from list without checking if list is not null or if i is within valid range. After fixing that the queries run fine. The fix is really simple, but maybe there are other similar cases that need to be handled.
> The fix is to check if listObj is null and if i falls within range:
> public Object getListElement(Object listObj, int i) {
> if (listObj == null) {
> return null;
> }
> List list = ((List) listObj);
> if (i < 0 || i >= list.size()) {
> return null;
> }
> return list.get(i);
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)