signum function incompatible with Postgres and Apache Spark #11557
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Describe the bug
In Postgres and Apache Spark,
signum
returns -1 for negative integers, 0 for zero, and 1 for positive integers.DataFusion uses Rust's signum function, which has different behavior.
For floating-point inputs, Apache Spark returns -1 for -0.0 and 1 for +0.0. I have not researched what Postgres does in this case.
The text was updated successfully, but these errors were encountered: