You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2016/12/16 16:55:58 UTC

[jira] [Commented] (HIVE-15445) Subquery failing with ClassCastException

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

Jesus Camacho Rodriguez commented on HIVE-15445:
------------------------------------------------

It seems it was introduced in HIVE-9195. I think the method used to create a ColumnExprDesc from a ColumnInfo should not check the object inspectors for constants; there are other methods in Hive that take care of that.

I am submitting a patch that disables the check of the object inspectors when we are creating the ColumnExprDesc from the ColumnInfo. If other methods take care of that indeed, then we should not see ptest failures...

> 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
>
> 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)_.



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