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

Revert "Support for redshift 821" #10446

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

ChenyuLInx
Copy link
Contributor

@ChenyuLInx ChenyuLInx commented Jul 15, 2024

Reverts #10366
Since this will introduce parsing failure to projects that currently do not fail.

@ChenyuLInx ChenyuLInx requested a review from a team as a code owner July 15, 2024 15:56
@cla-bot cla-bot bot added the cla:yes label Jul 15, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@ChenyuLInx ChenyuLInx added the Skip Changelog Skips GHA to check for changelog file label Jul 15, 2024
Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.81%. Comparing base (6e4564a) to head (8fc522c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10446      +/-   ##
==========================================
- Coverage   88.81%   88.81%   -0.01%     
==========================================
  Files         180      180              
  Lines       22573    22562      -11     
==========================================
- Hits        20049    20038      -11     
  Misses       2524     2524              
Flag Coverage Δ
integration 86.17% <ø> (-0.02%) ⬇️
unit 62.10% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.10% <ø> (-0.09%) ⬇️
Integration Tests 86.17% <ø> (-0.02%) ⬇️

@aranke aranke merged commit a7af3b3 into main Jul 15, 2024
76 of 78 checks passed
@aranke aranke deleted the revert-10366-support_for_redshift_821 branch July 15, 2024 16:21
Comment on lines -419 to -421
raise ParsingError(
"Unit Test fixtures require at least one row free of Nones to ensure consistent column types."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest isolating this exception only to adapters that will actually fail to execute if this is the case to make this backward-compatible in terms of expected behaviour.

For example, we could introduce a validate_row(row, row_idx) macro and call it here in the base implementation: https://github.com/dbt-labs/dbt-adapters/blob/782a32b530e25afe34af6896392d9fb081dce9d1/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql#L26-L27

By default, the macro would simply pass but adapters could implement the macro to raise an exception (or warning if they wouldn't fail 100% of the time) if the row.

Just proposing a high-level approach here, don't meant to be overly-prescriptive about the suggested interfaces (e.g. maybe validate_rows (plural) makes more sense instead of passing an index along).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants