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

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

Commit 753ee9b8a80d8e4c0db966a3132446a5aceb05cd in impala's branch 
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=753ee9b8a ]

IMPALA-13119: Fix cost_ initialization at CostingSegment.java

This patch fix cost_ initialization of CostingSegment. The public
constructor should initialize cost_ with ProcessingCost directly taken
from PlanNode or DataSink parameter. The private constructor still
initialize cost_ with ProcessingCost.zero().

Testing:
- Add TpcdsCpuCostPlannerTest#testQ43Verbose
  Verify that "#cons:#prod" is correct in verbose profile.
- Pass FE tests TpcdsCpuCostPlannerTest, PlannerTest#testProcessingCost,
  and PlannerTest#testProcessingCostPlanAdmissionSlots
- Pass test_executor_groups.py

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


> CostingSegment.java is initialized with wrong cost
> --------------------------------------------------
>
>                 Key: IMPALA-13119
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13119
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.4.0
>            Reporter: Riza Suminto
>            Assignee: Riza Suminto
>            Priority: Major
>
> CostingSegment.java has two public constructor: one accept PlanNode, while 
> the other accept DataSink as parameter. Both call appendCost method, which 
> sum the additionalCost with the segment's current cost_.
> However, if cost_ were ProcessingCost.zero(), it can mistakenly 
> setNumRowToConsume to 0.
> [https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/planner/CostingSegment.java#L114]
>  
> The public constructor should just initialize cost_ with ProcessingCost from 
> PlanNode or DataSink from constructor.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to