You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "englefly (via GitHub)" <gi...@apache.org> on 2023/04/06 01:25:18 UTC

[GitHub] [doris] englefly commented on a diff in pull request #18272: [tpch](nereids) trustable join condition

englefly commented on code in PR #18272:
URL: https://github.com/apache/doris/pull/18272#discussion_r1159197684


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/JoinEstimation.java:
##########
@@ -37,30 +40,75 @@
  */
 public class JoinEstimation {
 
+    private static EqualTo normalizeHashJoinCondition(EqualTo equalTo, Statistics leftStats, Statistics rightStats) {
+        boolean changeOrder = equalTo.left().getInputSlots().stream().anyMatch(
+                slot -> rightStats.findColumnStatistics(slot) != null
+        );
+        if (changeOrder) {
+            return new EqualTo(equalTo.right(), equalTo.left());
+        } else {
+            return equalTo;
+        }
+    }
+
     private static Statistics estimateInnerJoin(Statistics leftStats, Statistics rightStats, Join join) {
+        List<Double> unTrustEqualRatio = Lists.newArrayList();

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org