Skip to content

IGNITE-26613 Use compare() in binary comparisons for floating point types#7948

Merged
xtern merged 5 commits intoapache:mainfrom
gridgain:ignite-26613
Apr 17, 2026
Merged

IGNITE-26613 Use compare() in binary comparisons for floating point types#7948
xtern merged 5 commits intoapache:mainfrom
gridgain:ignite-26613

Conversation

@xtern
Copy link
Copy Markdown
Contributor

@xtern xtern commented Apr 7, 2026

https://issues.apache.org/jira/browse/IGNITE-26613

  • The behavior of binary floating-point comparison has been reworked to use Float.compare / Double.compare (instead of primitive comparison operators) to align the behavior of handling special values NaN and -0.0 with the behavior of aggregate functions (for example, MAX/MIN).
  • Fixed RelJson serialization to preserve negative zero (-0.0) value across (de)serialization.

Examples:

Table x

id int val float
0 -0.0
1 0.0
2 -0.0
select val, count(val) from x group by val;

PostgreSql

-0.0 | 3

MariaDb

-0 | 2
0 | 1

Ignite

-0.0 | 2
0.0 | 1

select val from x where val < 0

PostgreSql

<empty>

MariaDb

<empty>

Ignite

-0.0
-0.0

This comment was marked as resolved.

@xtern xtern marked this pull request as ready for review April 7, 2026 16:37
@xtern xtern merged commit c0a5d0a into apache:main Apr 17, 2026
5 checks passed
@xtern xtern deleted the ignite-26613 branch April 17, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants