Zoltán Borók-Nagy created IMPALA-15865:
------------------------------------------

             Summary: CPC: HDFS scan cost charges every predicate the same and 
ignores processing_cost_use_equal_expr_weight
                 Key: IMPALA-15865
                 URL: https://issues.apache.org/jira/browse/IMPALA-15865
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
            Reporter: Zoltán Borók-Nagy


With COMPUTE_PROCESSING_COST=true, master's 
HdfsScanNode.computeProcessingCost() charges the predicate term as input rows x 
number of conjuncts x a per-format coefficient (0.0281 for columnar formats, 
0.0549 for the others). Every conjunct costs the same, so a LIKE with inner 
wildcards costs as much as an integer '='. The hidden flag 
processing_cost_use_equal_expr_weight, which switches the other operators to 
the expression costs of IMPALA-2805 through ExprUtil.computeExprsTotalCost(), 
has no effect on HDFS scans. The Kudu, HBase and Paimon scans already cost 
their conjuncts with ExprUtil.computeExprsTotalCost() through 
ScanNode.computeScanProcessingCost().

Proposal: compute the HDFS scan predicate term from 
ExprUtil.computeExprsTotalCost() of the scan's conjuncts. With the default flag 
value (true) that is the number of conjuncts, so plans do not change, and 
setting the flag to false weights HDFS scan predicates by their expression cost 
like the other operators. The scan coefficients were benchmarked with one unit 
per predicate, so they need recalibration before the flag default can change.

A prototype of this change plans TPC-H SF1000 and TPC-DS SF10000 the same as 
master with the default flag value, at 4 cluster shapes from 12 to 3 executors. 
Its effect with the flag set to false is not measured.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to