comphead commented on issue #4481:
URL:
https://github.com/apache/datafusion-comet/issues/4481#issuecomment-4614064630
DF follows DuckDb concepts which returns `NaN, NaN`, however I would suppose
this is a DuckDB bug
```
D select array_distinct(array['nan'::float, 'nan'::float]);
┌─────────────────────────────────────────────────────────────────────┐
│ array_distinct((ARRAY[CAST('nan' AS FLOAT), CAST('nan' AS FLOAT)])) │
│ float[] │
├─────────────────────────────────────────────────────────────────────┤
│ [nan, nan] │
└─────────────────────────────────────────────────────────────────────┘
```
However checking distincts without arrays give correct result, and arrays
are not consistent, which IMO is a bug in duckDB and DF should follow more
Spark semantics
```
D select 'nan'::float union select 'nan'::float;
┌──────────────────────┐
│ CAST('nan' AS FLOAT) │
│ float │
├──────────────────────┤
│ nan │
└──────────────────────┘
D
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]