>From <[email protected]>: Attention is currently required from: Peeyush Gupta, Ali Alsuliman, Vijay Sarathy. [email protected] has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383 )
Change subject: [ASTERIXDB-3555][COMP] Use Join Samples to get Join Selectivity ...................................................................... Patch Set 6: (9 comments) File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/319883a3_8749ea4f PS5, Line 192: (idxDetails1.getSourceCardinality() < idxDetails1.getSampleCardinalityTarget() > Given the numbers we saw that show the new way is mostly better, it feels > like we should relax this […] Definitely future work. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/95af5a2a_93b6c3dc PS5, Line 201: if (!(joinExpr.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.EQ))) > This is not needed since it's already checked above. Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/a5288f8b_d1449da9 PS5, Line 204: double sel = naiveJoinSelectivity(joinExpr, card1, card2, idx1, idx2); > This can be just return naiveJoinSelectivity(joinExpr, card1, card2, idx1, > idx2); I need to look at the value in the debugger. more convenient for me this way. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/d628b889_9b242a66 PS5, Line 213: if (!(joinExpr.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.EQ))) { > This is not needed since it's already checked above. Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/ddd30250_cb8afd91 PS5, Line 216: List<LogicalVariable> exprUsedVars = new ArrayList<>(); : joinExpr.getUsedVariables(exprUsedVars); > This is already computed at the beginning of 'findJoinSelectivity()'. […] Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/48fc42d9_2f0b24f8 PS5, Line 262: joinEnum.allJoinOps.get(0); > I didn't follow why we always pick the first Join operator. Any join op node is fine. I just need a join operator here. So I am using the first one rather than create my own which is problematic. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/d5d229a6_30b399c7 PS5, Line 265: abjoin.getInputs().get(0) > Where do we switch back the input to the original? or am I missing something? we dont need to switch back because we are making the change in a copy which we do not need later on, https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/623ccf6c_569709db PS5, Line 279: List<ILogicalExpression> ignore = > This part can be removed: List<ILogicalExpression> ignore Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383/comment/6df3c26f_7ff4e244 PS5, Line 289: OperatorManipulationUtil.bottomUpCopyOperators > I don't think we need re-copy the scanOp. […] Done -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19383 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: I863dc378d5ead9f8b48f09f7bc400f5bdaba4839 Gerrit-Change-Number: 19383 Gerrit-PatchSet: 6 Gerrit-Owner: [email protected] Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Peeyush Gupta <[email protected]> Gerrit-Reviewer: Vijay Sarathy <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Attention: Peeyush Gupta <[email protected]> Gerrit-Attention: Ali Alsuliman <[email protected]> Gerrit-Attention: Vijay Sarathy <[email protected]> Gerrit-Comment-Date: Fri, 07 Feb 2025 02:24:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Ali Alsuliman <[email protected]> Gerrit-MessageType: comment
