Commit 54dbcff
committed
fix(sea): address #411 review — fail-loud duration unit, interval test gaps
Addresses the P2 review comment on #411 (the interval/duration layer) and
cascades the #410 fixes underneath (this branch was rebased onto the
updated #410 tip). Validated against a live warehouse (interval-duration
+ interval-edge e2e) and unit tests.
- ArrowResultConverter.toNanoseconds: throw on an unrecognized Arrow
duration unit instead of silently defaulting to NANOSECOND. The four
units are exactly what SeaArrowIpcDurationFix stamps, so an unknown unit
means the two sides drifted — fail loud, matching formatArrowInterval.
- SeaIntervalParity tests: add DAY-TIME via Duration(MILLISECOND) and
Duration(SECOND) (only MICROSECOND/NANOSECOND were exercised), and a
test asserting the converter throws (HiveDriverError) on a native
non-YEAR_MONTH Arrow Interval rather than misreading it.
- interval-duration-e2e: flip the stale "raw Int64 on this layer" assertion
to expect the formatted thrift string "1 02:03:04.000000000". That test
was written on #410 (pre-formatter) and explicitly noted "#411 flips this
to the formatted string" — now that #411's formatter is wired, the value
is the byte-identical thrift DAY-TIME string.
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>1 parent 33ad9b5 commit 54dbcff
3 files changed
Lines changed: 70 additions & 7 deletions
File tree
- lib/result
- tests
- e2e/sea
- unit/sea
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | | - | |
130 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
131 | 143 | | |
132 | 144 | | |
133 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
309 | 359 | | |
310 | 360 | | |
311 | 361 | | |
| |||
0 commit comments