kangkaisen commented on a change in pull request #256: Improve cardinality, 
avgRowSize, numNodes stat info in OlapScanNode
URL: https://github.com/apache/incubator-doris/pull/256#discussion_r231367378
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/planner/OlapScanNode.java
 ##########
 @@ -447,6 +465,13 @@ private void addScanRangeLocations(Partition partition,
                 scanRangeLocations.addToLocations(scanRangeLocation);
                 paloRange.addToHosts(new TNetworkAddress(ip, port));
                 tabletIsNull = false;
+
+                //for CBO
+                if (replica.getRowCount() != -1) {
+                    cardinality += replica.getRowCount();
+                    totalBytes += replica.getDataSize();
+                }
+                scanBackendIds.add(backend.getId());
 
 Review comment:
   I agree with you. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to