[ 
https://issues.apache.org/jira/browse/HIVE-26779?focusedWorklogId=859374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-859374
 ]

ASF GitHub Bot logged work on HIVE-26779:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Apr/23 10:14
            Start Date: 27/Apr/23 10:14
    Worklog Time Spent: 10m 
      Work Description: TuroczyX commented on PR #4272:
URL: https://github.com/apache/hive/pull/4272#issuecomment-1525375405

   I'm ok with this change and make sense. But the GenTezUtils is insanely big 
a complex. The cyclomatic complexity is too high to have a proper unit test for 
this class. Is there any intention to  refactor this class, because this class 
is hurting closely all SOLID principals. 
   Otherwise the change and the tests are OK to me. 




Issue Time Tracking
-------------------

    Worklog Id:     (was: 859374)
    Time Spent: 0.5h  (was: 20m)

> UNION ALL throws SemanticException when trying to remove partition 
> predicates: fail to find child from parent
> -------------------------------------------------------------------------------------------------------------
>
>                 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
>            Assignee: Zhizhen Hou
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {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)

Reply via email to