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 2016/11/17 02:11:58 UTC

[jira] [Commented] (HIVE-15225) QueryPlan.getJSONValue should code against empty string values

    [ https://issues.apache.org/jira/browse/HIVE-15225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672413#comment-15672413 ] 

Hive QA commented on HIVE-15225:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12839260/HIVE-15225.1.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 10694 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[transform_ppr2] (batchId=133)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[join_acid_non_acid] (batchId=150)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[union_fast_stats] (batchId=145)
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainanalyze_1] (batchId=90)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/2161/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/2161/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-2161/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
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: 4 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12839260 - PreCommit-HIVE-Build

> QueryPlan.getJSONValue should code against empty string values
> --------------------------------------------------------------
>
>                 Key: HIVE-15225
>                 URL: https://issues.apache.org/jira/browse/HIVE-15225
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Yibing Shi
>            Assignee: Yibing Shi
>         Attachments: HIVE-15225.1.patch
>
>
> The current {{QueryPlan.getJSONValue}} implementation is as below:
> {code}
>   public String getJSONValue(Object value) {
>     String v = "null";
>     if (value != null) {
>       v = value.toString();
>       if (v.charAt(0) != '[' && v.charAt(0) != '{') {
>         v = "\"" + v + "\"";
>       }
>     }
>     return v;
>   }
> {code}
> When {{value.toString()}} returns an empty string, a StringIndexOutOfRangeException would be thrown out when "v.charAt(0)" is evaluated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)