Skip to content

Commit 9e9d48b

Browse files
fix integration tests
1 parent 27cf031 commit 9e9d48b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sqlmesh/core/engine_adapter/base.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,17 @@ def remove_managed_columns(
17561756
"static",
17571757
existing_rows_query.where(valid_to_col.is_(exp.Null()).not_())
17581758
if truncate
1759-
else existing_rows_query.where(
1759+
else exp.select(
1760+
*(
1761+
exp.cast(valid_to_col, time_data_type).as_(col)
1762+
if col == valid_to_col.name
1763+
else exp.column(col)
1764+
for col in columns_to_types
1765+
),
1766+
exp.true().as_("_exists"),
1767+
)
1768+
.from_(target_table)
1769+
.where(
17601770
exp.and_(
17611771
valid_from_col <= cleanup_ts,
17621772
exp.and_(

0 commit comments

Comments
 (0)