Commit bf1d818
fix(scd2): preserve NULL values in historical rows
Select target values using an explicit row-existence flag carried into the SCD2 join. Choose a flag alias that does not overlap source or prefixed target columns, including case-insensitive names.
Co-authored-by: Nicholas <71755971+ionnich@users.noreply.github.com>
Signed-off-by: Arthur031221 <levi74108520963@gmail.com>1 parent 271b855 commit bf1d818
5 files changed
Lines changed: 504 additions & 49 deletions
File tree
- sqlmesh/core/engine_adapter
- tests/core/engine_adapter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
2073 | 2073 | | |
2074 | 2074 | | |
2075 | 2075 | | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
2076 | 2081 | | |
2077 | 2082 | | |
2078 | 2083 | | |
| |||
2141 | 2146 | | |
2142 | 2147 | | |
2143 | 2148 | | |
| 2149 | + | |
2144 | 2150 | | |
2145 | 2151 | | |
2146 | 2152 | | |
| |||
2164 | 2170 | | |
2165 | 2171 | | |
2166 | 2172 | | |
| 2173 | + | |
2167 | 2174 | | |
2168 | 2175 | | |
2169 | 2176 | | |
| |||
2195 | 2202 | | |
2196 | 2203 | | |
2197 | 2204 | | |
2198 | | - | |
2199 | | - | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2200 | 2210 | | |
2201 | | - | |
2202 | | - | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
2203 | 2214 | | |
2204 | 2215 | | |
2205 | 2216 | | |
| |||
0 commit comments