Skip to content

Commit

Permalink
remove list comprehension to handle None in source_map.get() to preve…
Browse files Browse the repository at this point in the history
…nt mypy error
  • Loading branch information
BentsiLeviav committed Aug 21, 2024
1 parent dac0d69 commit 05e43f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dbt/adapters/clickhouse/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ def check_incremental_schema_changes(
source_not_in_target = [column for column in source if column.name not in target_map.keys()]
target_not_in_source = [column for column in target if column.name not in source_map.keys()]
target_in_source = [column for column in target if column.name in source_map.keys()]
changed_data_types = [
column
for column in target_in_source
if column.dtype != source_map.get(column.name).dtype
]
changed_data_types = []
for column in target_in_source:
source_column = source_map.get(column.name)
if source_column is not None and column.dtype != source_column.dtype:
changed_data_types.append(column)

clickhouse_column_changes = ClickHouseColumnChanges(
columns_to_add=target_not_in_source,
Expand Down

0 comments on commit 05e43f0

Please sign in to comment.