Skip to content

Commit 491c523

Browse files
rename flag
1 parent 6ab4cc7 commit 491c523

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

sqlmesh/core/engine_adapter/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ def _build_schema_exp(
811811
column_descriptions: t.Optional[t.Dict[str, str]] = None,
812812
expressions: t.Optional[t.List[exp.PrimaryKey]] = None,
813813
is_view: bool = False,
814-
is_materialized_view: bool = False,
814+
materialized: bool = False,
815815
) -> exp.Schema:
816816
"""
817817
Build a schema expression for a table, columns, column comments, and additional schema properties.
@@ -824,7 +824,7 @@ def _build_schema_exp(
824824
target_columns_to_types=target_columns_to_types,
825825
column_descriptions=column_descriptions,
826826
is_view=is_view,
827-
is_materialized_view=is_materialized_view,
827+
materialized=materialized,
828828
)
829829
+ expressions,
830830
)
@@ -834,7 +834,7 @@ def _build_column_defs(
834834
target_columns_to_types: t.Dict[str, exp.DataType],
835835
column_descriptions: t.Optional[t.Dict[str, str]] = None,
836836
is_view: bool = False,
837-
is_materialized_view: bool = False,
837+
materialized: bool = False,
838838
) -> t.List[exp.ColumnDef]:
839839
engine_supports_schema_comments = (
840840
self.COMMENT_CREATION_VIEW.supports_schema_def
@@ -1267,7 +1267,7 @@ def create_view(
12671267
target_columns_to_types,
12681268
column_descriptions,
12691269
is_view=True,
1270-
is_materialized_view=materialized,
1270+
materialized=materialized,
12711271
)
12721272

12731273
properties = create_kwargs.pop("properties", None)

sqlmesh/core/engine_adapter/databricks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,14 @@ def _build_column_defs(
400400
target_columns_to_types: t.Dict[str, exp.DataType],
401401
column_descriptions: t.Optional[t.Dict[str, str]] = None,
402402
is_view: bool = False,
403-
is_materialized_view: bool = False,
403+
materialized: bool = False,
404404
) -> t.List[exp.ColumnDef]:
405405
# Databricks requires column types to be specified when adding column comments
406406
# in CREATE MATERIALIZED VIEW statements. Override is_view to False to force
407407
# column types to be included when comments are present.
408-
if is_materialized_view and column_descriptions:
408+
if is_view and materialized and column_descriptions:
409409
is_view = False
410410

411411
return super()._build_column_defs(
412-
target_columns_to_types, column_descriptions, is_view, is_materialized_view
412+
target_columns_to_types, column_descriptions, is_view, materialized
413413
)

sqlmesh/core/engine_adapter/trino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def _build_schema_exp(
284284
column_descriptions: t.Optional[t.Dict[str, str]] = None,
285285
expressions: t.Optional[t.List[exp.PrimaryKey]] = None,
286286
is_view: bool = False,
287-
is_materialized_view: bool = False,
287+
materialized: bool = False,
288288
) -> exp.Schema:
289289
if "delta_lake" in self.get_catalog_type_from_table(table):
290290
target_columns_to_types = self._to_delta_ts(target_columns_to_types)

0 commit comments

Comments
 (0)