Skip to content

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

Open
xtern wants to merge 2 commits intoapache:mainfrom
gridgain:ignite-26613
Open

IGNITE-26613 Use compare() in binary comparisons for floating point types#7948
xtern wants to merge 2 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
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.

2 participants