-
Hi there! Sometimes Wouldn't that always evaluate to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Those are some very sharp eagle eyes @RobbertDM ! 🦅 Caveat: all the commentary that follows is my best guess from reading the relevant code -- I didn't actually test any of this out to be certain. TL;DRIn the initial snapshot,
|
Beta Was this translation helpful? Give feedback.
Those are some very sharp eagle eyes @RobbertDM ! 🦅
Caveat: all the commentary that follows is my best guess from reading the relevant code -- I didn't actually test any of this out to be certain.
TL;DR
In the initial snapshot,
dbt_valid_to
will benull
for all rows. Thisnullif
trick forces the cast to the same data type asdbt_valid_from
rather than the database choosing some other unintended/incompatible data type.null
sounds about rightI think the answer is "yes!" it will always evaluate to
null
. But I suspect that it isn't just anynull
, it's anull
with the same data type as thestrategy.updated_at
column/expression.So if
strategy.updated_at
has a datatype oftimestamp
, then I'm …