hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao Sun (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-15098) SELECT DISTINCT w/o CBO produces incorrect results
Date Mon, 31 Oct 2016 18:01:04 GMT
Chao Sun created HIVE-15098:
-------------------------------

             Summary: SELECT DISTINCT w/o CBO produces incorrect results
                 Key: HIVE-15098
                 URL: https://issues.apache.org/jira/browse/HIVE-15098
             Project: Hive
          Issue Type: Bug
          Components: Query Planning
            Reporter: Chao Sun


For the following simple query:
{code}
SELECT  DISTINCT 
    UNIX_TIMESTAMP('2016-10-02','yyyy-mm-dd') AS col1,
    UNIX_TIMESTAMP('2016-10-02','yyyy-MM-dd') AS col2
FROM 
    default.dummy;
{code}

With CBO, this generate correct results:
{code}
+-------------+-------------+
|    col1     |    col2     |
+-------------+-------------+
| 1451722200  | 1475391600  |
+-------------+-------------+
{code}

However, if CBO is turned off, the result no longer make sense:
{code}
+-------+-------+
| col1  | col2  |
+-------+-------+
| NULL  | NULL  |
+-------+-------+
{code}



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

Mime
View raw message