hive-dev mailing list archives

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

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

Prasanth J commented on HIVE-8576:
----------------------------------

My bad. Thats my mistake. There are q file tests for stats annotation but even with that its
hard to exactly reproduce many cases. This recently happened with HIVE-8549 as well. These
issues crops up when running TPCDS queries and with higher scale factors (200,1000, 3000).
Since operator tree will be different when stats are different (ex: mapjoin vs shuffle join)
its hard to replicate these test cases with small datasets we have. I have a TPCDS scale 1
factor on my localbox but even with that many issues weren't reproducible. But yeah this if
condition is my mistake.

+1

> 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