Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/14135 )
Change subject: IMPALA-8718: project out collection slots in analytic's sort tuple ...................................................................... Patch Set 2: (1 comment) Thank for looking into this, Tim! Update and publish the patch for review. http://gerrit.cloudera.org:8080/#/c/14135/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java File fe/src/main/java/org/apache/impala/analysis/SortInfo.java: http://gerrit.cloudera.org:8080/#/c/14135/1/fe/src/main/java/org/apache/impala/analysis/SortInfo.java@161 PS1, Line 161: return e instanceof SlotRef && !e.isBound(sortTid_); > I think it may be better to fix this in AnalyticPlanner.createSortInfo() in Thanks for the excellent explanation! Add it in the comment and commit message. Yes, we can move this into AnalyticPlanner.createSortInfo() so we can limit the impact of this change. The bug occurs when the planner creates a Sort node on top of the Subplan node, and the output of the Sort node is passed to the nullable side of an outer join. Looks like Analytic evaluation is the only way to hit these conditions. Without analytic, manually adding a sort clause for the collection Join in the inline view won't hit the bug since the sort will be ignored. Manually adding a sort-limit clause won't hit the bug too since the sort node becomes a top-n node and it already has projection. -- To view, visit http://gerrit.cloudera.org:8080/14135 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7edf74ff0f603dfd33ff546e61545bc724990655 Gerrit-Change-Number: 14135 Gerrit-PatchSet: 2 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Mon, 09 Sep 2019 09:35:17 +0000 Gerrit-HasComments: Yes
