alamb commented on PR #10627:
URL: https://github.com/apache/datafusion/pull/10627#issuecomment-2126788799

   > I had to change the `describe` test because the float / double columns 
have nans (or maybe -inf?). This means that the `min`, which used to be a 
value, is now nan (which doesn't seem to display).
   > 
   > I wonder if describe should filter out nan values when calculating min/max?
   
   FWI I checed what postgres does:
   
   ```sql
   
   postgres=# create table foo(x float);
   CREATE TABLE
   
   postgres=# insert into foo values (1), (2), ('NaN');
   INSERT 0 3
   postgres=# select * from foo;
     x
   -----
      1
      2
    NaN
   (3 rows)
   
   postgres=# select min(x) from foo;
    min
   -----
      1
   (1 row)
   
   postgres=# select max(x) from foo;
    max
   -----
    NaN
   (1 row)
   ```
   
   So that suggests to me it treats `NaN` as the largest floating point value


-- 
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: github-unsubscr...@datafusion.apache.org

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


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

Reply via email to