Skip to content

Commit

Permalink
revert client change and update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Apr 2, 2024
1 parent b596ed8 commit b0434a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions dlt/destinations/impl/dremio/dremio.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,8 @@ def _null_to_bool(v: str) -> bool:

def _create_merge_followup_jobs(self, table_chain: Sequence[TTableSchema]) -> List[NewLoadJob]:
return [DremioMergeJob.from_table_chain(table_chain, self.sql_client)]

def _make_add_column_sql(
self, new_columns: Sequence[TColumnSchema], table_format: TTableFormat = None
) -> List[str]:
return ["ADD COLUMNS (" + ", ".join(self._get_column_def_sql(c) for c in new_columns) + ")"]
6 changes: 4 additions & 2 deletions tests/load/pipeline/test_write_disposition_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@ def source():
# doing this will result in somewhat useless behavior
destination_allows_adding_root_key = destination_config.destination == "dremio"

if destination_allows_adding_root_key and not with_root_key:
return

# without a root key this will fail, it is expected
if (
not with_root_key
and destination_config.supports_merge
and not destination_allows_adding_root_key
):
with pytest.raises(PipelineStepFailed):
pipeline.run(
Expand All @@ -157,7 +159,7 @@ def source():
"items": 100 if destination_config.supports_merge else 200,
"items__sub_items": (
100
if (destination_config.supports_merge and not destination_allows_adding_root_key)
if destination_config.supports_merge
else 200
),
},
Expand Down

0 comments on commit b0434a6

Please sign in to comment.