ORC tz split 6/6: GpuTimeZoneDB tests for DST and ORC conversion#4550
ORC tz split 6/6: GpuTimeZoneDB tests for DST and ORC conversion#4550res-life wants to merge 1 commit into
Conversation
Final part of the split of #4432. Adds GpuTimeZoneDBTest coverage for: - DST rule extraction across DST and non-DST zones, validating startMonth / startDay / startDayOfWeek / endMonth / time-mode / rule-mode values. - Probe-based extraction fallback for fixed-offset zones. - Historical transition handling for America/Los_Angeles, America/New_York, Europe/London, Asia/Tokyo, etc. - buildHistoricalTransitions edge cases. - End-to-end convertOrcTimezones across cross-tz and same-tz cases using OrcTimezoneContext lifecycle. After this PR the working tree matches PR #4432 head; the cumulative diff against main is identical to #4432. Signed-off-by: Chong Gao <chongg@nvidia.com>
bb754db to
2579702
Compare
| assertFalse(gazaSamples.length == 0, "precondition: expected future transitions for Asia/Gaza"); | ||
| assertFalse(santiagoSamples.length == 0, | ||
| "precondition: expected future transitions for America/Santiago"); |
There was a problem hiding this comment.
Inverted assertion polarity — confusing failure messages
assertFalse(x == 0, msg) reads as "assert that 'x equals zero' is false", which is harder to parse than the positive form and produces a less informative failure message. The same pattern appears at line 462 (assertFalse(batchSize <= 0, ...)). Prefer assertTrue(gazaSamples.length > 0, ...) and assertTrue(batchSize > 0, ...) so both the source and the failure output are immediately clear.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| }; | ||
|
|
||
| long stepMicros = TimeUnit.MINUTES.toMicros(30); | ||
| long startMicros = microsUtc(LocalDateTime.of(0, 1, 1, 0, 0)); |
There was a problem hiding this comment.
Exhaustive test starts from year 0 (1 BCE) while the documented GPU range begins at year 1 CE
LocalDateTime.of(0, 1, 1, 0, 0) is ISO year 0, which is 1 BCE in the proleptic Gregorian calendar. The Javadoc for this test says "year 0000 through 9999", but the main testConvertOrcTimezones comment explicitly bounds the supported range to (0001-01-01, 9999-12-31). Timestamps before year 1 may be outside the GPU implementation's tested boundary; if the GPU path does not handle them, only opt-in runs will surface the discrepancy. Consider aligning this start with LocalDateTime.of(1, 1, 1, 0, 0) or adding a comment documenting why year 0 is intentional.
|
useless now. |
Final part of the split of #4432.
Companion: NVIDIA/cudf-spark#14544
Previous: #4549
Adds GpuTimeZoneDBTest coverage for:
After this PR the working tree matches #4432 head; the cumulative diff against
mainis identical to #4432 (7 files, +1755/-416).Signed-off-by: Chong Gao chongg@nvidia.com