>From Till Westmann <[email protected]>: Attention is currently required from: Vijay Sarathy, [email protected]. Till Westmann has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765 )
Change subject: [ASTERIXDB-3246][COMP]: CBO costing of all physical operators in a query plan. ...................................................................... Patch Set 16: (6 comments) File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/cost/CostMethods.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/57501e62_56573a80 PS16, Line 90: / Keep width under 120 characters File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/EnumerateJoinsRule.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/0d17017b_0cb8a71e PS16, Line 92: ILogicalOperator Keep width under 120 characters File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/JoinEnum.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/b3a2ea97_7e3c8eb4 PS16, Line 110: protected ILogicalOperator rootGroupByDistinctOp; // The Distinct/GroupBy operator at root of the query tree (if exists) Keep width under 120 characters File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/JoinNode.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/d750bf38_6c8dfd1a PS16, Line 1063: // Other heuristic formulas considered for computing distinct cardinality estimates of joins. : // These are commented out for now, but can be experimented with if needed. : : // 1. The mid of upper and lower bounds : // D_est_jn = (max(D_est_l, D_est_r) + D_est_l * D_est_r)/ 2 : /* this.distinctCardinality = (Math.max(leftJn.distinctCardinality, rightJn.distinctCardinality) : + leftJn.distinctCardinality * rightJn.distinctCardinality) / 2.0; : */ : : // 2. Compute heuristically D_est_jn (either lower bound or mid of upper and lower bounds) : /* : double minVal = Math.min(leftJn.distinctCardinality, rightJn.distinctCardinality); : double maxVal = Math.max(leftJn.distinctCardinality, rightJn.distinctCardinality); : double ratio = (double) Math.round(minVal / maxVal * 1000) / 1000; : this.distinctCardinality = (ratio > 0.001) ? maxVal : : ((maxVal + leftJn.distinctCardinality * rightJn.distinctCardinality) / 2.0); : */ : : // 3. Heuristic used currently : // D_est_jn = (D_est_l > D_est_r) ? (D_est_l * join productivity of leftJn) : (D_est_r * join productivity of rightJn) Do we need to keep the commented code? If so, please keep width under 120 characters File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/OperatorUtils.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/67de8627_10cd8e4c PS16, Line 116: /*if (containsAllGroupByDistinctVarsInScanOp(scanOp, grpByDistinctOp)) { : // contains all PK attribute(s), so estimated distinct cardinality is same as original dataset cardinality : scanOp = null; : } else { // at least one PK attribute is not in GroupByOp or DistinctOp variables */ Can we remove the commented code? https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765/comment/15e5e855_e4cf90b2 PS16, Line 228: all Keep width under 120 characters -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17765 To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I3196f664d716bb5b3806ec9a5a0dd5c1ea51ff62 Gerrit-Change-Number: 17765 Gerrit-PatchSet: 16 Gerrit-Owner: Vijay Sarathy <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Vijay Sarathy <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Attention: Vijay Sarathy <[email protected]> Gerrit-Attention: [email protected] Gerrit-Comment-Date: Mon, 23 Oct 2023 23:15:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
