Commit c8a9ce5
committed
Address review comments: remove redundant casting and fix test cases
- Remove redundant TIMESTAMP_NS casting in _timediff_sql (lines 268-271)
* Previously cast to TIMESTAMP_NS before calling _handle_nanosecond_diff
* _handle_nanosecond_diff already handles casting via exp.cast (which avoids recasting)
* Now passes expressions directly, matching _date_diff_sql pattern
- Fix TIMEDIFF test case to use valid Snowflake syntax
* Changed from TIME literal '10:00:00.000000000'
* To TIMESTAMP with CAST: CAST('2023-01-01 10:00:00.000000000' AS TIMESTAMP)
* TIME literals don't work with TIMEDIFF in Snowflake
- Fix TIMEADD test case to use valid Snowflake syntax
* Changed from TIME literal '10:00:00.000000000'
* To TIMESTAMP with CAST: CAST('2023-01-01 10:00:00.000000000' AS TIMESTAMP)
* TIME literals don't work with TIMEADD in Snowflake
Addresses review comments from VaggelisD on PR #66171 parent 1fa600a commit c8a9ce5
2 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
| |||
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
269 | | - | |
270 | | - | |
271 | | - | |
| 274 | + | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
2496 | | - | |
| 2496 | + | |
2497 | 2497 | | |
2498 | | - | |
2499 | | - | |
| 2498 | + | |
| 2499 | + | |
2500 | 2500 | | |
2501 | 2501 | | |
2502 | 2502 | | |
| |||
2518 | 2518 | | |
2519 | 2519 | | |
2520 | 2520 | | |
2521 | | - | |
| 2521 | + | |
2522 | 2522 | | |
2523 | | - | |
2524 | | - | |
| 2523 | + | |
| 2524 | + | |
2525 | 2525 | | |
2526 | 2526 | | |
2527 | 2527 | | |
| |||
0 commit comments