You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2017/02/01 00:54:51 UTC

[jira] [Updated] (HIVE-15753) subquery failing with org.apache.hadoop.hive.ql.parse.SemanticException

     [ https://issues.apache.org/jira/browse/HIVE-15753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated HIVE-15753:
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0
           Status: Resolved  (was: Patch Available)

Pushed to master. Thanks, Vineet!

> subquery failing with  org.apache.hadoop.hive.ql.parse.SemanticException
> ------------------------------------------------------------------------
>
>                 Key: HIVE-15753
>                 URL: https://issues.apache.org/jira/browse/HIVE-15753
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Aswathy Chellammal Sreekumar
>            Assignee: Vineet Garg
>              Labels: sub-query
>             Fix For: 2.2.0
>
>         Attachments: HIVE-15753.1.patch, HIVE-15753.2.patch
>
>
> Simple reproducer
> -------------------------------------------------------------------------------------
> * Create table {{part}} using {{q_test_init.sql}}
> * Run the following query
> {code}
> explain SELECT p1.p_name FROM part p1 LEFT JOIN (select p_type as p_col from part ) p2 WHERE NOT EXISTS
> +                (select pp1.p_type as p_col from part pp1 where pp1.p_partkey = p2.p_col);
> {code}
> -------------------------------------------------------------------------------------
> Following query is failing with SemanticException
> Query:
> SELECT DISTINCT     t1.smallint_col_11     FROM table_21 t1     LEFT JOIN (     SELECT     smallint_col_45,     (-224) - (COALESCE(MIN(665) OVER (ORDER BY smallint_col_45 DESC, varchar0170_col_23 DESC), NULL, -631)) AS int_col,     AVG((GREATEST(CAST(806 AS int), CAST(-606 AS int))) * (39)) OVER (PARTITION BY smallint_col_45 ORDER BY smallint_col_45 DESC, varchar0170_col_23 ASC ROWS BETWEEN 24 FOLLOWING AND UNBOUNDED FOLLOWING) AS float_col,     COALESCE(338, (965) + (-335), MAX(544) OVER (PARTITION BY varchar0170_col_23)) AS int_col_1,     varchar0170_col_23     FROM table_20     ) t2 ON (((t2.int_col_1) = (t1.smallint_col_3)) AND ((t2.smallint_col_45) = (t1.smallint_col_11))) AND ((t2.smallint_col_45) = (t1.smallint_col_11))     WHERE     NOT EXISTS (SELECT     COALESCE(tt1.smallint_col_11, tt2.smallint_col_3, tt1.smallint_col_11) AS int_col     FROM table_21 tt1     INNER JOIN table_21 tt2 ON (tt2.smallint_col_11) = (tt1.smallint_col_3)     WHERE         ((tt2.smallint_col_11) >= (tt1.smallint_col_3)) AND ((t2.int_col) = (tt2.smallint_col_3)))



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)