You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Chao Sun (JIRA)" <ji...@apache.org> on 2016/10/31 18:01:04 UTC
[jira] [Created] (HIVE-15098) SELECT DISTINCT w/o CBO produces
incorrect results
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)