Zhizhen Hou created HIVE-26779: ---------------------------------- Summary: UNION ALL Key: HIVE-26779 URL: https://issues.apache.org/jira/browse/HIVE-26779 Project: Hive Issue Type: Bug Components: Query Processor Affects Versions: 4.0.0-alpha-2 Reporter: Zhizhen Hou
{quote}Reproduce sql: drop table if exists tez_test_t1; create table tez_test_t1(md_exper string); insert into tez_test_t1 values('tez_test_t1-md_expr'); drop table if exists tez_test_t5; create table tez_test_t5(md_exper string, did string); insert into tez_test_t5 values('tez_test_t5-md_expr','tez_test_t5-did'); drop table if exists tez_test_t2; create table tez_test_t2(did string); insert into tez_test_t2 values('tez_test_t2-did'); SELECT md_exper,null as ads_h5_gap , null as first_login_did, null as inclick_did FROM tez_test_t1 UNION ALL SELECT md_exper, ads_h5_gap , NULL AS first_login_did,did AS inclick_did FROM tez_test_t5 LATERAL VIEW explode(split('0,6', ',')) gaps AS ads_h5_gap UNION ALL SELECT '' AS md_exper,'0,6' as ads_h5_gap , did AS first_login_did, NULL AS inclick_did FROM tez_test_t2 GROUP BY did; {quote} StackTrace 2022-11-27T09:31:06,801 ERROR [21d35a7f-9625-46ae-9c3d-13ca925f55cb main]: ql.Driver (:()) - FAILED: SemanticException Exception when trying to remove partition predicates: fail to find child from parent org.apache.hadoop.hive.ql.parse.SemanticException: Exception when trying to remove partition predicates: fail to find child from parent at org.apache.hadoop.hive.ql.exec.Operator.removeChildAndAdoptItsChildren(Operator.java:859) at org.apache.hadoop.hive.ql.parse.GenTezUtils.removeUnionOperators(GenTezUtils.java:348) at org.apache.hadoop.hive.ql.parse.TezCompiler.generateTaskTree(TezCompiler.java:573) at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:241) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12333) at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:330) at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:286) -- This message was sent by Atlassian Jira (v8.20.10#820010)