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

Hive QA commented on HIVE-23295:
--------------------------------



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

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

{color:green}SUCCESS:{color} +1 due to 17141 tests passed

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

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 13001073 - PreCommit-HIVE-Build

> Possible NPE when on getting predicate literal list when dynamic values are 
> not available
> -----------------------------------------------------------------------------------------
>
>                 Key: HIVE-23295
>                 URL: https://issues.apache.org/jira/browse/HIVE-23295
>             Project: Hive
>          Issue Type: Bug
>          Components: storage-api
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>             Fix For: 4.0.0
>
>         Attachments: HIVE-23295.1.patch
>
>
> getLiteralList() in SearchArgumentImpl$PredicateLeafImpl returns null if 
> dynamic values are not available.
> {code:java}
> @Override
> public List<Object> getLiteralList() {
>   if (literalList != null && literalList.size() > 0 && literalList.get(0) 
> instanceof LiteralDelegate) {
>     List<Object> newLiteraList = new ArrayList<Object>();
>     try {
>       for (Object litertalObj : literalList) {
>         Object literal = ((LiteralDelegate) litertalObj).getLiteral();
>         if (literal != null) {
>           newLiteraList.add(literal);
>         }
>       }
>     } catch (NoDynamicValuesException err) {
>       LOG.debug("Error while retrieving literalList, returning null", err);
>       return null;
>     }
>     return newLiteraList;
>   }
>   return literalList;
> } {code}
>  
> There are multiple call sites where the return value is used without a null 
> check. E.g:  leaf.getLiteralList().stream(). 
>  
> The return null was added as part of HIVE-18827 to avoid having an 
> unimportant warning message when dynamic values have not been delivered yet.
>  
> [~sershe], [~jdere], I propose return an empty list instead of null in a case 
> like this. What do you think?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to