You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2017/11/23 17:11:00 UTC

[jira] [Commented] (HIVE-18141) Fix StatsUtils.combineRange to combine intervals

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

Ashutosh Chauhan commented on HIVE-18141:
-----------------------------------------

+1

> Fix StatsUtils.combineRange to combine intervals
> ------------------------------------------------
>
>                 Key: HIVE-18141
>                 URL: https://issues.apache.org/jira/browse/HIVE-18141
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Statistics
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>         Attachments: HIVE-18141.01.patch
>
>
> the current [combinedRange implementation|https://github.com/apache/hive/blob/d9924ab3e285536f7e2cc15ecbea36a78c59c66d/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java#L1984] in its current form "combines" only ranges which contain eachother
> but the comments suggests that the intention was to capture the case when the 2 intervals are overlap; can be checked with the following testcase:
> {code}
>   @Test
>   public void test11() {
>     Range r1 = new Range(0, 1);
>     Range r2 = new Range(1, 11);
>     Range r3 = StatsUtils.combineRange(r1, r2);
>     assertNotNull(r3);
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)