snuyanzin commented on code in PR #29221:
URL: https://github.com/apache/flink/pull/29221#discussion_r4115592946
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/util/collections/FloatHashSet.java:
##########
@@ -37,16 +37,16 @@ public FloatHashSet() {
this(DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR);
}
- /** See {@link Float#equals(Object)}. */
+ /** See {@link Float#equals(Object)}, except that both signs of zero are
considered equal. */
public boolean add(final float k) {
- int intKey = Float.floatToIntBits(k);
Review Comment:
nit:
can we minimize amount of changes just by adding one line in each method?
```suggestion
final int intKey = k == 0.0f ? 0 : Float.floatToIntBits(k);
```
the rest could be restored
--
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]