hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-15445) Subquery failing with ClassCastException
Date Fri, 16 Dec 2016 16:57:58 GMT

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

Jesus Camacho Rodriguez updated HIVE-15445:
-------------------------------------------
    Description: 
To reproduce:

{code:sql}
CREATE TABLE table_7 (int_col INT);

SELECT
(t1.int_col) * (t1.int_col) AS int_col
FROM (
SELECT
MIN(NULL) OVER () AS int_col
FROM table_7
) t1
WHERE
(False) NOT IN (SELECT
False AS boolean_col
FROM (
SELECT
MIN(NULL) OVER () AS int_col
FROM table_7
) tt1
WHERE
(t1.int_col) = (tt1.int_col));
{code}

The problem seems to be in the method that tries to resolve the subquery column _MIN(NULL)_.
It checks the column inspector and ends up returning a constant expression instead of a column
expression for _min(null)_.

  was:
To reproduce:

{code:sql}
CREATE TABLE table_7 (int_col INT);

SELECT
(t1.int_col) * (t1.int_col) AS int_col
FROM (
SELECT
MIN(NULL) OVER () AS int_col
FROM table_7
) t1
WHERE
(False) NOT IN (SELECT
False AS boolean_col
FROM (
SELECT
MIN(NULL) OVER () AS int_col
FROM table_7
) tt1
WHERE
(t1.int_col) = (tt1.int_col));
{code}

The problem seems to be in the method that tries to resolve the subquery column _MIN(NULL)_.
It checks the column inspector and ends up returning a constant descriptor instead of a column
descriptor for _min(null)_.


> Subquery failing with ClassCastException
> ----------------------------------------
>
>                 Key: HIVE-15445
>                 URL: https://issues.apache.org/jira/browse/HIVE-15445
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-15445.patch
>
>
> To reproduce:
> {code:sql}
> CREATE TABLE table_7 (int_col INT);
> SELECT
> (t1.int_col) * (t1.int_col) AS int_col
> FROM (
> SELECT
> MIN(NULL) OVER () AS int_col
> FROM table_7
> ) t1
> WHERE
> (False) NOT IN (SELECT
> False AS boolean_col
> FROM (
> SELECT
> MIN(NULL) OVER () AS int_col
> FROM table_7
> ) tt1
> WHERE
> (t1.int_col) = (tt1.int_col));
> {code}
> The problem seems to be in the method that tries to resolve the subquery column _MIN(NULL)_.
It checks the column inspector and ends up returning a constant expression instead of a column
expression for _min(null)_.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message