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

ASF subversion and git services commented on IMPALA-9722:
---------------------------------------------------------

Commit f0e4b611734064e984bc3a208c76bcbf53a08d6c in impala's branch 
refs/heads/master from Tamas Mate
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f0e4b61 ]

IMPALA-9722: Consolidate avg_size calculation in PerColumnStats

This change refactors the 'avg_size' calculation, 'total_width' will be
storing the sum of row widths till a Finalize call calculates the
average column size.

Testing:
 - Added unit test to verify the aggregation result

Change-Id: Iae1efb1c568c67dff6f25887c2ea2b8b249eea4b
Reviewed-on: http://gerrit.cloudera.org:8080/15878
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Csaba Ringhofer <[email protected]>


> Consolidate unused total_width and the way avg_width is computed in 
> PerColumnStats
> ----------------------------------------------------------------------------------
>
>                 Key: IMPALA-9722
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9722
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Tamas Mate
>            Assignee: Tamas Mate
>            Priority: Major
>              Labels: statistics
>             Fix For: Impala 4.0
>
>
> PerColumnStats.total_width is an unused field in 
> [incr-stats-util.cc|https://github.com/apache/impala/blob/master/be/src/exec/incr-stats-util.cc#L134]
>  while the comment says that it is the result of {{(avg_width * num_rows)}}. 
> Later [similar 
> multiplication|https://github.com/apache/impala/blob/master/be/src/exec/incr-stats-util.cc#L159]
>  can be found in the Update method, however the result is stored in 
> {{avg_width}}.
> {code:cpp}
> avg_width += (new_avg_width * num_new_rows);
> {code}
> We should consolidate these fields and the calculations.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to