Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
1.20.0, 1.19.1
-
None
Description
1.19 AdaptiveScheduler / Test (module: table) https://github.com/apache/flink/actions/runs/8864296211/job/24339523745#step:10:10757
SortCodeGeneratorTest can fail if one of the generated random row values is -0.0f.
Apr 28 02:38:03 expect: +I(,SqlRawValue{?},0.0,false); actual: +I(,SqlRawValue{?},-0.0,false) Apr 28 02:38:03 expect: +I(,SqlRawValue{?},-0.0,false); actual: +I(,SqlRawValue{?},0.0,false) ... <snip> ... Apr 28 02:38:04 expect: +I(,null,4.9695407E17,false); actual: +I(,null,4.9695407E17,false) Apr 28 02:38:04 expect: +I(,null,-3.84924672E18,false); actual: +I(,null,-3.84924672E18,false) Apr 28 02:38:04 types: [[RAW('java.lang.Integer', ?), FLOAT, BOOLEAN]] Apr 28 02:38:04 keys: [0, 1]] Apr 28 02:38:04 expected: 0.0f Apr 28 02:38:04 but was: -0.0f Apr 28 02:38:04 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) Apr 28 02:38:04 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) Apr 28 02:38:04 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) Apr 28 02:38:04 at org.apache.flink.table.planner.codegen.SortCodeGeneratorTest.testInner(SortCodeGeneratorTest.java:632) Apr 28 02:38:04 at org.apache.flink.table.planner.codegen.SortCodeGeneratorTest.testMultiKeys(SortCodeGeneratorTest.java:143) Apr 28 02:38:04 at java.lang.reflect.Method.invoke(Method.java:498)
In the test code, this is extremely unlikely to occur (one in 2²⁴?) but has happened at this line (when the rnd.nextFloat() is 0.0f and rnd.nextLong() is negative:
We can reproduce the failure by changing how likely 0.0f is to be generated at that line.