You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vineet Garg (Jira)" <ji...@apache.org> on 2020/01/29 17:38:00 UTC

[jira] [Commented] (HIVE-22787) NPE when compiling query contains intersect all

    [ https://issues.apache.org/jira/browse/HIVE-22787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17026067#comment-17026067 ] 

Vineet Garg commented on HIVE-22787:
------------------------------------

[~kkasa] This will be repro only with cbo turned off right?

> NPE when compiling query contains intersect all
> -----------------------------------------------
>
>                 Key: HIVE-22787
>                 URL: https://issues.apache.org/jira/browse/HIVE-22787
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>
> The query contains INTERSECT ALL operator and one of its operands has an OUTER JOIN like:
> {code}
> SELECT ... FROM t1 RIGHT OUTER JOIN t2 ON ...
> INTERSECT ALL
> SELECT ...
> {code}
> In this case both AST trees (before and after calcite) has a TOK_INTERSECTALL node and it is not handled
> when generating the plan in
> {code}
> org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
> private Operator genPlan(QB parent, QBExpr qbexpr) throws SemanticException {
>     if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) {
>       boolean skipAmbiguityCheck = viewSelect == null && parent.isTopLevelSelectStarQuery();
>       return genPlan(qbexpr.getQB(), skipAmbiguityCheck);
>     }
>     if (qbexpr.getOpcode() == QBExpr.Opcode.UNION) {
>       Operator qbexpr1Ops = genPlan(parent, qbexpr.getQBExpr1());
>       Operator qbexpr2Ops = genPlan(parent, qbexpr.getQBExpr2());
>       return genUnionPlan(qbexpr.getAlias(), qbexpr.getQBExpr1().getAlias(),
>           qbexpr1Ops, qbexpr.getQBExpr2().getAlias(), qbexpr2Ops);
>     }
>     return null;
>   }{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)