morningman commented on a change in pull request #3188: fix join hints not work when need table reorder URL: https://github.com/apache/incubator-doris/pull/3188#discussion_r400255969
########## File path: fe/src/main/java/org/apache/doris/planner/CrossJoinNode.java ########## @@ -59,16 +59,16 @@ public TableRef getInnerRef() { @Override public void computeStats(Analyzer analyzer) { - // super.computeStats(analyzer); - // if (getChild(0).cardinality_ == -1 || getChild(1).cardinality_ == -1) { - // cardinality_ = -1; - // } else { - // cardinality_ = getChild(0).cardinality_ * getChild(1).cardinality_; - // if (computeSelectivity() != -1) { - // cardinality_ = Math.round(((double) cardinality_) * computeSelectivity()); - // } - // } - // LOG.debug("stats CrossJoin: cardinality=" + Long.toString(cardinality_)); + super.computeStats(analyzer); + if (getChild(0).cardinality == -1 || getChild(1).cardinality == -1) { + cardinality = -1; + } else { + cardinality = getChild(0).cardinality * getChild(1).cardinality; + if (computeSelectivity() != -1) { + cardinality = Math.round(((double) cardinality) * computeSelectivity()); + } + } + LOG.debug("stats CrossJoin: cardinality=" + Long.toString(cardinality)); Review comment: ```suggestion LOG.debug("stats CrossJoin: cardinality= {}", Long.toString(cardinality)); ``` ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org