hqx871 opened a new pull request #2363:
URL: https://github.com/apache/calcite/pull/2363


   The old method to compute the cost of sort has some problem.
   1. when there is no need to sort, it still to compute the cpu cost of sort.
   2. use n * log(n) * rowBytes to estimate the cpu cost may be inaccurate, 
where n means the output row count of the sort operator, and rowBytes means the 
average bytes of one row .
   
   Instead, I give follow suggestion.
   1. the cpu cost is zero if there is no need to sort.
   2. use m * log(n)* rowBytes to compute the cpu cost, where m is the sum of 
offset + limit and n means input row count.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to