Skip to content

Commit cdf1f2e

Browse files
committed
Fix flaky test: remove tied NaN values in Float64 test data
The NaN test had two groups (b and d) both with nan, causing non-deterministic ordering under random settings. Changed d from nan to 150 so all aggregate values are distinct. Made-with: Cursor
1 parent fe1a83d commit cdf1f2e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/queries/0_stateless/03467_topn_aggregation.reference

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,51 +201,51 @@ g195 9995
201201
-- NaN DESC: optimized
202202
c 300
203203
f 200
204-
a 100
204+
d 150
205205
-- NaN DESC: reference
206206
c 300
207207
f 200
208-
a 100
208+
d 150
209209
-- NaN ASC: optimized
210210
e 50
211211
a 100
212-
f 200
212+
d 150
213213
-- NaN ASC: reference
214214
e 50
215215
a 100
216-
f 200
216+
d 150
217217
-- NaN DESC NULLS LAST: optimized
218218
c 300
219219
f 200
220-
a 100
220+
d 150
221221
-- NaN DESC NULLS LAST: reference
222222
c 300
223223
f 200
224-
a 100
224+
d 150
225225
-- NaN ASC NULLS FIRST: optimized
226226
b nan
227-
d nan
228227
e 50
228+
a 100
229229
-- NaN ASC NULLS FIRST: reference
230230
b nan
231-
d nan
232231
e 50
232+
a 100
233233
-- NaN DESC level 2: optimized
234234
c 300
235235
f 200
236-
a 100
236+
d 150
237237
-- NaN DESC level 2: reference
238238
c 300
239239
f 200
240-
a 100
240+
d 150
241241
-- NaN ASC level 2: optimized
242242
e 50
243243
a 100
244-
f 200
244+
d 150
245245
-- NaN ASC level 2: reference
246246
e 50
247247
a 100
248-
f 200
248+
d 150
249249
-- nullable key DESC NULLS LAST: optimized
250250
a 2024-01-05 00:00:00
251251
f 2024-01-04 00:00:00

tests/queries/0_stateless/03467_topn_aggregation.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ ENGINE = MergeTree ORDER BY grp;
420420

421421
INSERT INTO t_topn_nan SELECT
422422
arrayJoin(['a','b','c','d','e','f']) AS grp,
423-
multiIf(grp='a', 100, grp='b', 0.0/0.0, grp='c', 300, grp='d', 0.0/0.0, grp='e', 50, 200) AS val;
423+
multiIf(grp='a', 100, grp='b', 0.0/0.0, grp='c', 300, grp='d', 150, grp='e', 50, 200) AS val;
424424

425425
SELECT '-- NaN DESC: optimized';
426426
SELECT grp, max(val) AS m

0 commit comments

Comments
 (0)