hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikram Dixit K (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8576) Guaranteed NPE in StatsRulesProcFactory
Date Thu, 23 Oct 2014 23:03:37 GMT

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

Vikram Dixit K commented on HIVE-8576:
--------------------------------------

+1 for 0.14

> Guaranteed NPE in StatsRulesProcFactory
> ---------------------------------------
>
>                 Key: HIVE-8576
>                 URL: https://issues.apache.org/jira/browse/HIVE-8576
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Lars Francke
>            Assignee: Lars Francke
>         Attachments: HIVE-8576.1.patch
>
>
> Code looks like this:
> {code}
>     private List<Integer> getPrimaryKeyCandidates(List<Operator<? extends
OperatorDesc>> ops) {
>       List<Integer> result = Lists.newArrayList();
>       if (ops != null || !ops.isEmpty()) {
>         for (int i = 0; i < ops.size(); i++) {
> {code}
> The {{||}} should be {{&&}} as the current {{if}} statement can be rewritten
as {{!(ops == null && ops.isEmpty())}} which doesn't make sense.
> Or am I missing something?



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

Mime
View raw message