fix bugs of lateral view with CTE or where clause. The error case can be found in newly added tests in `TableFunctionPlanTest.java` But there are still some bugs not being fixed, so the unit test is annotated with @Ignore This PR contains the change is #7824 : > Issue Number: close #7823 > > After the subquery is rewritten, the rewritten stmt needs to be reset > (that is, the content of the first analyze semantic analysis is cleared), > and then the rewritten stmt can be reAnalyzed. > > The lateral view ref in the previous implementation forgot to implement the reset function. > This caused him to keep the first error message in the second analyze. > Eventually, two duplicate tupleIds appear in the new stmt and are marked with different tuple. > From the explain string, the following syntax will have an additional wrong join predicate. > ``` > Query: explain select k1 from test_explode lateral view explode_split(k2, ",") tmp as e1 where k1 in (select k3 from tbl1); > Error equal join conjunct: `k3` = `k3` > ``` > > This pr mainly adds the reset function of the lateral view > to avoid possible errors in the second analyze > when the lateral view and subquery rewrite occur at the same time.
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # fe-common This module is used to store some common classes of other modules. # spark-dpp This module is Spark DPP program, used for Spark Load function. Depends: fe-common # fe-core This module is the main process module of FE. Depends: fe-common, spark-dpp