Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Remove leftover merge_operation constant for reshift adapter #3897

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sqlmesh/core/engine_adapter/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RedshiftEngineAdapter(
# Redshift doesn't support comments for VIEWs WITH NO SCHEMA BINDING (which we always use)
COMMENT_CREATION_VIEW = CommentCreationView.UNSUPPORTED
SUPPORTS_REPLACE_TABLE = False
MERGE_OPERATION = False

SCHEMA_DIFFER = SchemaDiffer(
parameterized_type_defaults={
exp.DataType.build("VARBYTE", dialect=DIALECT).this: [(64000,)],
Expand Down Expand Up @@ -126,7 +126,7 @@ def build_var_length_col(
def enable_merge(self) -> bool:
# Redshift supports the MERGE operation but we use the logical merge
# unless the user has opted in by setting enable_merge in the connection.
return self._extra_config.get("enable_merge") or self.MERGE_OPERATION
return bool(self._extra_config.get("enable_merge"))

@property
def cursor(self) -> t.Any:
Expand Down