Commit 23db0bf
Fix ClickHouse freshness SLA: rename string-cast alias to avoid shadowing
ClickHouse resolves column references against output aliases regardless
of SELECT clause order. The cast(sla_deadline_utc as string) with the
same alias name caused the is_failure comparison to use the string
version instead of the timestamp, producing DateTime vs String type
mismatch. Renamed to sla_deadline_utc_str internally and re-aliased
in the final SELECT.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 33d17f7 commit 23db0bf
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | 284 | | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | 288 | | |
291 | 289 | | |
292 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
293 | 295 | | |
294 | 296 | | |
295 | | - | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| |||
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
366 | | - | |
| 368 | + | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| |||
0 commit comments