abhioncbr commented on issue #10686:
URL: https://github.com/apache/pinot/issues/10686#issuecomment-1524201991

   I did a bit of analysis while going over the problem itself.
   
   1. H2 database follows the exact comparison between double and float 
columns. Here are the results of queries in the H2 database
   ```
   $ CREATE TABLE float_x_double_comp_tbl (i1 double,i2 real);
   $ INSERT INTO float_x_double_comp_tbl VALUES(1.1,1.1);
   $ INSERT INTO float_x_double_comp_tbl VALUES(1.5,1.5);
   
   $ SELECT i1, i2, i1!=i2, i2!=i1 FROM FLOAT_X_DOUBLE_COMP_TBL
   
   
   I1  | I2  | I1 <> I2 | I2 <> I1
   ----|-----|----------|---------
   1.1 | 1.1 | TRUE     | TRUE
   1.5 | 1.5 | FALSE    | FALSE
   
   ```
   Actually, initially I thought it's a bug in H2 also and created an 
[issue](https://github.com/h2database/h2database/issues/3784) for this. Got 
nice explanation by the developer. 
   
   2. I have also checked the Postgress, and the results are the same as of the 
H2 database.  
   <img width="1634" alt="Screen Shot 2023-04-26 at 7 33 02 PM" 
src="https://user-images.githubusercontent.com/1076944/234724368-23df152d-cc52-4710-971e-c37314faa017.png";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to