Wenhai Li has posted comments on this change. Change subject: ASTERIXDB-1487: fix the wrong plan for inverted fuzzyjoin. ......................................................................
Patch Set 11: (4 comments) https://asterix-gerrit.ics.uci.edu/#/c/1119/11/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/RemoveUnusedOneToOneEquiJoinRule.java File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/RemoveUnusedOneToOneEquiJoinRule.java: Line 188: // The pre-plan is (broadcast B and index search on A on each A.a ~= B.b) join B on A.a = B.b > I couldn't figure out what this comment mean too. Can you rephrase it if po for $d in dataset A for $t in dataset B (inverted index on B.b) where contains($B, "keywords") and word-tokens($d.a) ~= word-tokens($t.b) return $A Here, all the "contains" will be pruned even we have a selection condition in this branch, where we should select on the inverted index and then join with the broadcasted A's records. Note here that the project "return $A" only covers the fields of A. https://asterix-gerrit.ics.uci.edu/#/c/1119/11/asterixdb/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-aqlplus_5/dblp-csx-aqlplus_5.3.query.aql File asterixdb/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-aqlplus_5/dblp-csx-aqlplus_5.3.query.aql: Line 24: for $t in dataset('CSX') The second branch will be pruned in the current master. Line 26: where contains($o.title, "System") and This condition will be ignored after we applying RemoveUnusedOneToOneEquiJoinRule, which results in the inconsistency when we switch the two branch "for $t ... " and "for $o ...". Line 28: return $t) Since we return only $t. -- To view, visit https://asterix-gerrit.ics.uci.edu/1119 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1aef69a2278853fd9f8020da6639331b367ed5ad Gerrit-PatchSet: 11 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Wenhai Li <[email protected]> Gerrit-Reviewer: Chen Li <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Jianfeng Jia <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Wenhai Li <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-HasComments: Yes
