You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Dayakar M (Jira)" <ji...@apache.org> on 2023/01/12 07:02:00 UTC

[jira] [Updated] (HIVE-26936) A predicate that compares 0 with -0 yields an incorrect result

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

Dayakar M updated HIVE-26936:
-----------------------------
    Description: 
Steps to reproduce:
{quote}
CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 DOUBLE);
INSERT INTO t0 VALUES(0);
INSERT INTO t1 VALUES('-0');

SELECT * FROM t0, t1 WHERE t0.c0 = t1.c0; 
{quote}
*Expected Result:* 0.0   -0.0
*Actual:* No Rows selected

That the predicate should evaluate to TRUE can be verified with the following statement:
{quote}
SELECT t0.c0 = t1.c0 FROM t0, t1;  
-------
_c0
-------
true
-------
{quote}

Similar issue fixed earlier as a part of link HIVE-11174  for where clause condition, now join condition is having issue.

 

  was:
Steps to reproduce:
CREATE TABLE t0(c0 INT);CREATE TABLE t1(c0 DOUBLE);INSERT INTO t0 VALUES(0);INSERT INTO t1 VALUES('-0');
SELECT * FROM t0, t1 WHERE t0.c0 = t1.c0; -- expected: \{0.0, -0.0}, actual: {}+--------+--------+
| t0.c0  | t1.c0  |
+--------+--------+
+--------+--------+
That the predicate should evaluate to TRUE can be verified with the following statement:
SELECT t0.c0 = t1.c0 FROM t0, t1; -- 1+-------+
|  _c0  |
+-------+
| true  |
+-------+
Similar issue fixed earlier as a part of [link HIVE-11174|https://issues.apache.org/jira/browse/HIVE-11174]  for where clause condition, now join condition is having issue.

 


> A predicate that compares 0 with -0 yields an incorrect result
> --------------------------------------------------------------
>
>                 Key: HIVE-26936
>                 URL: https://issues.apache.org/jira/browse/HIVE-26936
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Dayakar M
>            Assignee: Dayakar M
>            Priority: Major
>
> Steps to reproduce:
> {quote}
> CREATE TABLE t0(c0 INT);
> CREATE TABLE t1(c0 DOUBLE);
> INSERT INTO t0 VALUES(0);
> INSERT INTO t1 VALUES('-0');
> SELECT * FROM t0, t1 WHERE t0.c0 = t1.c0; 
> {quote}
> *Expected Result:* 0.0   -0.0
> *Actual:* No Rows selected
> That the predicate should evaluate to TRUE can be verified with the following statement:
> {quote}
> SELECT t0.c0 = t1.c0 FROM t0, t1;  
> -------
> _c0
> -------
> true
> -------
> {quote}
> Similar issue fixed earlier as a part of link HIVE-11174  for where clause condition, now join condition is having issue.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)