Skip to content

Commit a57f721

Browse files
jaogoyjukiewiczm-marketer
authored andcommitted
modify test about materialized_properteis
Signed-off-by: jaogoy <jaogoy@gmail.com> Signed-off-by: Mateusz Jukiewicz <mateusz@marketer.tech>
1 parent 63135e7 commit a57f721

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

sqlmesh/core/snapshot/evaluator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,11 +2743,13 @@ def insert(
27432743

27442744
logger.info("Replacing view '%s'", table_name)
27452745
materialized_properties = None
2746-
if is_materialized_view:
2746+
if is_materialized_view and (
2747+
model.partitioned_by or model.partition_interval_unit or model.clustered_by
2748+
):
27472749
materialized_properties = {
27482750
"partitioned_by": model.partitioned_by,
2749-
"clustered_by": model.clustered_by,
27502751
"partition_interval_unit": model.partition_interval_unit,
2752+
"clustered_by": model.clustered_by,
27512753
}
27522754
self.adapter.create_view(
27532755
table_name,

tests/core/test_snapshot_evaluator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ def test_evaluate_materialized_view_with_execution_time_macro(
782782
view_properties={},
783783
table_description=None,
784784
column_descriptions={},
785+
materialized_properties=None,
785786
)
786787

787788

0 commit comments

Comments
 (0)