This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 7829c21b20 [Bug](lateral-view) fix some conjunct not work on lateral view #12105 7829c21b20 is described below commit 7829c21b20c5c396f722abd57ea1063123fa586b Author: Pxl <pxl...@qq.com> AuthorDate: Mon Aug 29 12:08:20 2022 +0800 [Bug](lateral-view) fix some conjunct not work on lateral view #12105 --- .../main/java/org/apache/doris/analysis/Analyzer.java | 16 ---------------- .../java/org/apache/doris/planner/TableFunctionNode.java | 1 + .../data/query_p0/lateral_view/test_issue_11986.out | 5 +++++ .../suites/query_p0/lateral_view/test_issue_11986.sql | 5 +++++ 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java index 624a108ff6..5babfc90c4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java @@ -1318,22 +1318,6 @@ public class Analyzer { return result; } - /** - * Return all unassigned registered conjuncts that are fully bound by given - * list of tuple ids - */ - public List<Expr> getAllUnassignedConjuncts(List<TupleId> tupleIds) { - List<Expr> result = Lists.newArrayList(); - for (Expr e : globalState.conjuncts.values()) { - if (!e.isAuxExpr() && e.isBoundByTupleIds(tupleIds) - && !globalState.assignedConjuncts.contains(e.getId()) - && !globalState.ojClauseByConjunct.containsKey(e.getId())) { - result.add(e); - } - } - return result; - } - /** * Return all unassigned conjuncts of the outer join referenced by * right-hand side table ref. diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/TableFunctionNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/TableFunctionNode.java index 58f1092d55..9b0373f4cf 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/TableFunctionNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/TableFunctionNode.java @@ -54,6 +54,7 @@ public class TableFunctionNode extends PlanNode { super(id, "TABLE FUNCTION NODE", StatisticalType.TABLE_FUNCTION_NODE); tupleIds.addAll(inputNode.getTupleIds()); tblRefIds.addAll(inputNode.getTupleIds()); + tblRefIds.addAll(inputNode.getTblRefIds()); lateralViewTupleIds = lateralViewRefs.stream().map(e -> e.getDesc().getId()) .collect(Collectors.toList()); tupleIds.addAll(lateralViewTupleIds); diff --git a/regression-test/data/query_p0/lateral_view/test_issue_11986.out b/regression-test/data/query_p0/lateral_view/test_issue_11986.out new file mode 100644 index 0000000000..cea80c53ca --- /dev/null +++ b/regression-test/data/query_p0/lateral_view/test_issue_11986.out @@ -0,0 +1,5 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !test_issue_11986 -- +1 a u1 10 1 +3 a u1 10 3 + diff --git a/regression-test/suites/query_p0/lateral_view/test_issue_11986.sql b/regression-test/suites/query_p0/lateral_view/test_issue_11986.sql new file mode 100644 index 0000000000..9fa7bc6427 --- /dev/null +++ b/regression-test/suites/query_p0/lateral_view/test_issue_11986.sql @@ -0,0 +1,5 @@ +select * from ( + select 1 hour,'a' pid_code ,'u1' uid, 10 money + union all + select 3 hourr,'a' pid_code ,'u1' uid, 10 money +) example1 lateral view explode_bitmap(bitmap_from_string("1,2,3,4")) tmp1 as e1 where hour=e1; \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org