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

Ayush Anubhava updated SPARK-25452:
-----------------------------------
    Description: 
*Description* : Query with clause is giving unexpected result in case of float 
column 

 

{color:#d04437}*Query with filter less than equal to is giving in appropriate 
result{code}*{color}

0: jdbc:hive2://10.18.18.214:23040/default> create table k2 ( a int, b float);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values (0,0.0);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values (1,1.1);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b >=0.0;
+----+--------------------+--+
| a | b |
+----+--------------------+--+
| 0 | 0.0 |
| 1 | 1.100000023841858 |
+----+--------------------+--+

Query with filter less than equal to is giving in appropriate result

0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b <=1.1;
+----+------+--+
| a | b |
+----+------+--+
| 0 | 0.0 |
+----+------+--+
1 row selected (0.299 seconds)

{code}
 

  was:
*Description* : Query with clause is giving unexpected result in case of float 
column 

 

Query with filter less than equal to is giving in appropriate result{code}

0: jdbc:hive2://10.18.18.214:23040/default> create table k2 ( a int, b float);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values (0,0.0);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values (1,1.1);
+---------+--+
| Result |
+---------+--+
+---------+--+
0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b >=0.0;
+----+--------------------+--+
| a | b |
+----+--------------------+--+
| 0 | 0.0 |
| 1 | 1.100000023841858 |
+----+--------------------+--+

Query with filter less than equal to is giving in appropriate result

0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b <=1.1;
+----+------+--+
| a | b |
+----+------+--+
| 0 | 0.0 |
+----+------+--+
1 row selected (0.299 seconds)

{code}
 


> Query with clause is giving unexpected result in case of float coloumn
> ----------------------------------------------------------------------
>
>                 Key: SPARK-25452
>                 URL: https://issues.apache.org/jira/browse/SPARK-25452
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1
>         Environment: *Spark 2.3.1*
> *Hadoop 2.7.2*
>            Reporter: Ayush Anubhava
>            Priority: Major
>
> *Description* : Query with clause is giving unexpected result in case of 
> float column 
>  
> {color:#d04437}*Query with filter less than equal to is giving in appropriate 
> result{code}*{color}
> 0: jdbc:hive2://10.18.18.214:23040/default> create table k2 ( a int, b float);
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> 0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values 
> (0,0.0);
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> 0: jdbc:hive2://10.18.18.214:23040/default> insert into table k2 values 
> (1,1.1);
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> 0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b >=0.0;
> +----+--------------------+--+
> | a | b |
> +----+--------------------+--+
> | 0 | 0.0 |
> | 1 | 1.100000023841858 |
> +----+--------------------+--+
> Query with filter less than equal to is giving in appropriate result
> 0: jdbc:hive2://10.18.18.214:23040/default> select * from k2 where b <=1.1;
> +----+------+--+
> | a | b |
> +----+------+--+
> | 0 | 0.0 |
> +----+------+--+
> 1 row selected (0.299 seconds)
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to