mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Tackle the test's flakiness
This commit is contained in:
parent
11dfd35cd7
commit
5026e0f492
@ -1,4 +1,85 @@
|
||||
around_June_7 res res_sam res_auc res_null res_null_sam res_null_auc res_zero res_zero_sam res_zero_auc res_us res_us_sam res_us_auc res_us_null res_us_null_sam res_us_null_auc res_us_zero res_us_zero_sam res_us_zero_auc res64 res64_sam res64_auc res64_null res64_null_sam res64_null_auc res64_zero res64_zero_sam res64_zero_auc res64_us res64_us_sam res64_us_auc res64_us_null res64_us_null_sam res64_us_null_auc res64_us_zero res64_us_zero_sam res64_us_zero_auc
|
||||
|
||||
Jun 6 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000 2023-06-06 00:00:00.000
|
||||
Jun 8 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000 2022-06-08 00:00:00.000
|
||||
The reference time point is 2023-05-31 23:30:00
|
||||
───────────────────────────────
|
||||
Before the reference time point
|
||||
───────────────────────────────
|
||||
Row 1:
|
||||
──────
|
||||
syslog_arg: May 31 22:30:00
|
||||
res: 2023-05-31 22:30:00
|
||||
res_sam: 2022-05-31 22:30:00
|
||||
res_auc: 2023-05-31 22:30:00
|
||||
res_null: 2023-05-31 22:30:00
|
||||
res_null_sam: 2022-05-31 22:30:00
|
||||
res_null_auc: 2023-05-31 22:30:00
|
||||
res_zero: 2023-05-31 22:30:00
|
||||
res_zero_sam: 2022-05-31 22:30:00
|
||||
res_zero_auc: 2023-05-31 22:30:00
|
||||
res_us: 2023-05-31 22:30:00
|
||||
res_us_sam: 2022-05-31 22:30:00
|
||||
res_us_auc: 2023-05-31 22:30:00
|
||||
res_us_null: 2023-05-31 22:30:00
|
||||
res_us_null_sam: 2022-05-31 22:30:00
|
||||
res_us_null_auc: 2023-05-31 22:30:00
|
||||
res_us_zero: 2023-05-31 22:30:00
|
||||
res_us_zero_sam: 2022-05-31 22:30:00
|
||||
res_us_zero_auc: 2023-05-31 22:30:00
|
||||
res64: 2023-05-31 22:30:00.000
|
||||
res64_sam: 2022-05-31 22:30:00.000
|
||||
res64_auc: 2023-05-31 22:30:00.000
|
||||
res64_null: 2023-05-31 22:30:00.000
|
||||
res64_null_sam: 2022-05-31 22:30:00.000
|
||||
res64_null_auc: 2023-05-31 22:30:00.000
|
||||
res64_zero: 2023-05-31 22:30:00.000
|
||||
res64_zero_sam: 2022-05-31 22:30:00.000
|
||||
res64_zero_auc: 2023-05-31 22:30:00.000
|
||||
res64_us: 2023-05-31 22:30:00.000
|
||||
res64_us_sam: 2022-05-31 22:30:00.000
|
||||
res64_us_auc: 2023-05-31 22:30:00.000
|
||||
res64_us_null: 2023-05-31 22:30:00.000
|
||||
res64_us_null_sam: 2022-05-31 22:30:00.000
|
||||
res64_us_null_auc: 2023-05-31 22:30:00.000
|
||||
res64_us_zero: 2023-05-31 22:30:00.000
|
||||
res64_us_zero_sam: 2022-05-31 22:30:00.000
|
||||
res64_us_zero_auc: 2023-05-31 22:30:00.000
|
||||
──────────────────────────────
|
||||
After the reference time point
|
||||
──────────────────────────────
|
||||
Row 1:
|
||||
──────
|
||||
syslog_arg: Jun 1 00:30:00
|
||||
res: 2022-06-01 00:30:00
|
||||
res_sam: 2022-06-01 00:30:00
|
||||
res_auc: 2023-06-01 00:30:00
|
||||
res_null: 2022-06-01 00:30:00
|
||||
res_null_sam: 2022-06-01 00:30:00
|
||||
res_null_auc: 2023-06-01 00:30:00
|
||||
res_zero: 2022-06-01 00:30:00
|
||||
res_zero_sam: 2022-06-01 00:30:00
|
||||
res_zero_auc: 2023-06-01 00:30:00
|
||||
res_us: 2022-06-01 00:30:00
|
||||
res_us_sam: 2022-06-01 00:30:00
|
||||
res_us_auc: 2023-06-01 00:30:00
|
||||
res_us_null: 2022-06-01 00:30:00
|
||||
res_us_null_sam: 2022-06-01 00:30:00
|
||||
res_us_null_auc: 2023-06-01 00:30:00
|
||||
res_us_zero: 2022-06-01 00:30:00
|
||||
res_us_zero_sam: 2022-06-01 00:30:00
|
||||
res_us_zero_auc: 2023-06-01 00:30:00
|
||||
res64: 2022-06-01 00:30:00.000
|
||||
res64_sam: 2022-06-01 00:30:00.000
|
||||
res64_auc: 2023-06-01 00:30:00.000
|
||||
res64_null: 2022-06-01 00:30:00.000
|
||||
res64_null_sam: 2022-06-01 00:30:00.000
|
||||
res64_null_auc: 2023-06-01 00:30:00.000
|
||||
res64_zero: 2022-06-01 00:30:00.000
|
||||
res64_zero_sam: 2022-06-01 00:30:00.000
|
||||
res64_zero_auc: 2023-06-01 00:30:00.000
|
||||
res64_us: 2022-06-01 00:30:00.000
|
||||
res64_us_sam: 2022-06-01 00:30:00.000
|
||||
res64_us_auc: 2023-06-01 00:30:00.000
|
||||
res64_us_null: 2022-06-01 00:30:00.000
|
||||
res64_us_null_sam: 2022-06-01 00:30:00.000
|
||||
res64_us_null_auc: 2023-06-01 00:30:00.000
|
||||
res64_us_zero: 2022-06-01 00:30:00.000
|
||||
res64_us_zero_sam: 2022-06-01 00:30:00.000
|
||||
res64_us_zero_auc: 2023-06-01 00:30:00.000
|
||||
|
@ -1,46 +1,102 @@
|
||||
SELECT 'The reference time point is 2023-05-31 23:30:00';
|
||||
SELECT '───────────────────────────────';
|
||||
SELECT 'Before the reference time point';
|
||||
SELECT '───────────────────────────────';
|
||||
|
||||
WITH
|
||||
86400 AS secs_in_day,
|
||||
now() AS ts_now,
|
||||
'2023-06-07' AS ref_point,
|
||||
dateDiff('second', toDateTime(ref_point), ts_now) AS time_shift,
|
||||
formatDateTime(ts_around, '%b %e %T') AS dt_curr
|
||||
3600 AS delta,
|
||||
toDateTime('2023-05-31 23:30:00') AS dt_ref,
|
||||
now() AS dt_now,
|
||||
dt_now - delta as dt_before,
|
||||
dateDiff('second', dt_ref, dt_now) AS time_shift,
|
||||
formatDateTime(dt_before, '%b %e %T') AS syslog_before
|
||||
SELECT
|
||||
formatDateTime(ts_around - time_shift, '%b %e %H:%i:%s') AS around_June_7,
|
||||
parseDateTimeBestEffort(dt_curr) - time_shift AS res,
|
||||
parseDateTimeBestEffort(dt_curr, 'US/Samoa') - time_shift AS res_sam,
|
||||
parseDateTimeBestEffort(dt_curr, 'Pacific/Auckland') - time_shift AS res_auc,
|
||||
parseDateTimeBestEffortOrNull(dt_curr) - time_shift AS res_null,
|
||||
parseDateTimeBestEffortOrNull(dt_curr, 'US/Samoa') - time_shift AS res_null_sam,
|
||||
parseDateTimeBestEffortOrNull(dt_curr, 'Pacific/Auckland') - time_shift AS res_null_auc,
|
||||
parseDateTimeBestEffortOrZero(dt_curr) - time_shift AS res_zero,
|
||||
parseDateTimeBestEffortOrZero(dt_curr, 'US/Samoa') - time_shift AS res_zero_sam,
|
||||
parseDateTimeBestEffortOrZero(dt_curr, 'Pacific/Auckland') - time_shift AS res_zero_auc,
|
||||
parseDateTimeBestEffortUS(dt_curr) - time_shift AS res_us,
|
||||
parseDateTimeBestEffortUS(dt_curr, 'US/Samoa') - time_shift AS res_us_sam,
|
||||
parseDateTimeBestEffortUS(dt_curr, 'Pacific/Auckland') - time_shift AS res_us_auc,
|
||||
parseDateTimeBestEffortUSOrNull(dt_curr) - time_shift AS res_us_null,
|
||||
parseDateTimeBestEffortUSOrNull(dt_curr, 'US/Samoa') - time_shift AS res_us_null_sam,
|
||||
parseDateTimeBestEffortUSOrNull(dt_curr, 'Pacific/Auckland') - time_shift AS res_us_null_auc,
|
||||
parseDateTimeBestEffortUSOrZero(dt_curr) - time_shift AS res_us_zero,
|
||||
parseDateTimeBestEffortUSOrZero(dt_curr, 'US/Samoa') - time_shift AS res_us_zero_sam,
|
||||
parseDateTimeBestEffortUSOrZero(dt_curr, 'Pacific/Auckland') - time_shift AS res_us_zero_auc,
|
||||
parseDateTime64BestEffort(dt_curr) - time_shift AS res64,
|
||||
parseDateTime64BestEffort(dt_curr, 3, 'US/Samoa') - time_shift AS res64_sam,
|
||||
parseDateTime64BestEffort(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_auc,
|
||||
parseDateTime64BestEffortOrNull(dt_curr) - time_shift AS res64_null,
|
||||
parseDateTime64BestEffortOrNull(dt_curr, 3, 'US/Samoa') - time_shift AS res64_null_sam,
|
||||
parseDateTime64BestEffortOrNull(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_null_auc,
|
||||
parseDateTime64BestEffortOrZero(dt_curr) - time_shift AS res64_zero,
|
||||
parseDateTime64BestEffortOrZero(dt_curr, 3, 'US/Samoa') - time_shift AS res64_zero_sam,
|
||||
parseDateTime64BestEffortOrZero(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_zero_auc,
|
||||
parseDateTime64BestEffortUS(dt_curr) - time_shift AS res64_us,
|
||||
parseDateTime64BestEffortUS(dt_curr, 3, 'US/Samoa') - time_shift AS res64_us_sam,
|
||||
parseDateTime64BestEffortUS(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_us_auc,
|
||||
parseDateTime64BestEffortUSOrNull(dt_curr) - time_shift AS res64_us_null,
|
||||
parseDateTime64BestEffortUSOrNull(dt_curr, 3, 'US/Samoa') - time_shift AS res64_us_null_sam,
|
||||
parseDateTime64BestEffortUSOrNull(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_us_null_auc,
|
||||
parseDateTime64BestEffortUSOrZero(dt_curr) - time_shift AS res64_us_zero,
|
||||
parseDateTime64BestEffortUSOrZero(dt_curr, 3, 'US/Samoa') - time_shift AS res64_us_zero_sam,
|
||||
parseDateTime64BestEffortUSOrZero(dt_curr, 3, 'Pacific/Auckland') - time_shift AS res64_us_zero_auc
|
||||
FROM (SELECT arrayJoin([ts_now - secs_in_day, ts_now + secs_in_day]) AS ts_around)
|
||||
FORMAT PrettySpaceNoEscapes;
|
||||
formatDateTime(dt_before - time_shift, '%b %e %T') AS syslog_arg,
|
||||
parseDateTimeBestEffort(syslog_before) - time_shift AS res,
|
||||
parseDateTimeBestEffort(syslog_before, 'US/Samoa') - time_shift AS res_sam,
|
||||
parseDateTimeBestEffort(syslog_before, 'Pacific/Auckland') - time_shift AS res_auc,
|
||||
parseDateTimeBestEffortOrNull(syslog_before) - time_shift AS res_null,
|
||||
parseDateTimeBestEffortOrNull(syslog_before, 'US/Samoa') - time_shift AS res_null_sam,
|
||||
parseDateTimeBestEffortOrNull(syslog_before, 'Pacific/Auckland') - time_shift AS res_null_auc,
|
||||
parseDateTimeBestEffortOrZero(syslog_before) - time_shift AS res_zero,
|
||||
parseDateTimeBestEffortOrZero(syslog_before, 'US/Samoa') - time_shift AS res_zero_sam,
|
||||
parseDateTimeBestEffortOrZero(syslog_before, 'Pacific/Auckland') - time_shift AS res_zero_auc,
|
||||
parseDateTimeBestEffortUS(syslog_before) - time_shift AS res_us,
|
||||
parseDateTimeBestEffortUS(syslog_before, 'US/Samoa') - time_shift AS res_us_sam,
|
||||
parseDateTimeBestEffortUS(syslog_before, 'Pacific/Auckland') - time_shift AS res_us_auc,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_before) - time_shift AS res_us_null,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_before, 'US/Samoa') - time_shift AS res_us_null_sam,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_before, 'Pacific/Auckland') - time_shift AS res_us_null_auc,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_before) - time_shift AS res_us_zero,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_before, 'US/Samoa') - time_shift AS res_us_zero_sam,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_before, 'Pacific/Auckland') - time_shift AS res_us_zero_auc,
|
||||
parseDateTime64BestEffort(syslog_before) - time_shift AS res64,
|
||||
parseDateTime64BestEffort(syslog_before, 3, 'US/Samoa') - time_shift AS res64_sam,
|
||||
parseDateTime64BestEffort(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_auc,
|
||||
parseDateTime64BestEffortOrNull(syslog_before) - time_shift AS res64_null,
|
||||
parseDateTime64BestEffortOrNull(syslog_before, 3, 'US/Samoa') - time_shift AS res64_null_sam,
|
||||
parseDateTime64BestEffortOrNull(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_null_auc,
|
||||
parseDateTime64BestEffortOrZero(syslog_before) - time_shift AS res64_zero,
|
||||
parseDateTime64BestEffortOrZero(syslog_before, 3, 'US/Samoa') - time_shift AS res64_zero_sam,
|
||||
parseDateTime64BestEffortOrZero(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_zero_auc,
|
||||
parseDateTime64BestEffortUS(syslog_before) - time_shift AS res64_us,
|
||||
parseDateTime64BestEffortUS(syslog_before, 3, 'US/Samoa') - time_shift AS res64_us_sam,
|
||||
parseDateTime64BestEffortUS(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_us_auc,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_before) - time_shift AS res64_us_null,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_before, 3, 'US/Samoa') - time_shift AS res64_us_null_sam,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_us_null_auc,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_before) - time_shift AS res64_us_zero,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_before, 3, 'US/Samoa') - time_shift AS res64_us_zero_sam,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_before, 3, 'Pacific/Auckland') - time_shift AS res64_us_zero_auc
|
||||
FORMAT Vertical;
|
||||
|
||||
SELECT '──────────────────────────────';
|
||||
SELECT 'After the reference time point';
|
||||
SELECT '──────────────────────────────';
|
||||
|
||||
WITH
|
||||
3600 AS delta,
|
||||
toDateTime('2023-05-31 23:30:00') AS dt_ref,
|
||||
now() AS dt_now,
|
||||
dt_now + delta as dt_after,
|
||||
dateDiff('second', dt_ref, dt_now) AS time_shift,
|
||||
formatDateTime(dt_after, '%b %e %T') AS syslog_after
|
||||
SELECT
|
||||
formatDateTime(dt_after - time_shift, '%b %e %T') AS syslog_arg,
|
||||
parseDateTimeBestEffort(syslog_after) - time_shift AS res,
|
||||
parseDateTimeBestEffort(syslog_after, 'US/Samoa') - time_shift AS res_sam,
|
||||
parseDateTimeBestEffort(syslog_after, 'Pacific/Auckland') - time_shift AS res_auc,
|
||||
parseDateTimeBestEffortOrNull(syslog_after) - time_shift AS res_null,
|
||||
parseDateTimeBestEffortOrNull(syslog_after, 'US/Samoa') - time_shift AS res_null_sam,
|
||||
parseDateTimeBestEffortOrNull(syslog_after, 'Pacific/Auckland') - time_shift AS res_null_auc,
|
||||
parseDateTimeBestEffortOrZero(syslog_after) - time_shift AS res_zero,
|
||||
parseDateTimeBestEffortOrZero(syslog_after, 'US/Samoa') - time_shift AS res_zero_sam,
|
||||
parseDateTimeBestEffortOrZero(syslog_after, 'Pacific/Auckland') - time_shift AS res_zero_auc,
|
||||
parseDateTimeBestEffortUS(syslog_after) - time_shift AS res_us,
|
||||
parseDateTimeBestEffortUS(syslog_after, 'US/Samoa') - time_shift AS res_us_sam,
|
||||
parseDateTimeBestEffortUS(syslog_after, 'Pacific/Auckland') - time_shift AS res_us_auc,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_after) - time_shift AS res_us_null,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_after, 'US/Samoa') - time_shift AS res_us_null_sam,
|
||||
parseDateTimeBestEffortUSOrNull(syslog_after, 'Pacific/Auckland') - time_shift AS res_us_null_auc,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_after) - time_shift AS res_us_zero,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_after, 'US/Samoa') - time_shift AS res_us_zero_sam,
|
||||
parseDateTimeBestEffortUSOrZero(syslog_after, 'Pacific/Auckland') - time_shift AS res_us_zero_auc,
|
||||
parseDateTime64BestEffort(syslog_after) - time_shift AS res64,
|
||||
parseDateTime64BestEffort(syslog_after, 3, 'US/Samoa') - time_shift AS res64_sam,
|
||||
parseDateTime64BestEffort(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_auc,
|
||||
parseDateTime64BestEffortOrNull(syslog_after) - time_shift AS res64_null,
|
||||
parseDateTime64BestEffortOrNull(syslog_after, 3, 'US/Samoa') - time_shift AS res64_null_sam,
|
||||
parseDateTime64BestEffortOrNull(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_null_auc,
|
||||
parseDateTime64BestEffortOrZero(syslog_after) - time_shift AS res64_zero,
|
||||
parseDateTime64BestEffortOrZero(syslog_after, 3, 'US/Samoa') - time_shift AS res64_zero_sam,
|
||||
parseDateTime64BestEffortOrZero(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_zero_auc,
|
||||
parseDateTime64BestEffortUS(syslog_after) - time_shift AS res64_us,
|
||||
parseDateTime64BestEffortUS(syslog_after, 3, 'US/Samoa') - time_shift AS res64_us_sam,
|
||||
parseDateTime64BestEffortUS(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_us_auc,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_after) - time_shift AS res64_us_null,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_after, 3, 'US/Samoa') - time_shift AS res64_us_null_sam,
|
||||
parseDateTime64BestEffortUSOrNull(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_us_null_auc,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_after) - time_shift AS res64_us_zero,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_after, 3, 'US/Samoa') - time_shift AS res64_us_zero_sam,
|
||||
parseDateTime64BestEffortUSOrZero(syslog_after, 3, 'Pacific/Auckland') - time_shift AS res64_us_zero_auc
|
||||
FORMAT Vertical;
|
||||
|
Loading…
Reference in New Issue
Block a user