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

Adap 821/unit tests infer wrong datatype for None values in fixtures #885

Merged
merged 11 commits into from
Jul 23, 2024

Conversation

VersusFacit
Copy link
Contributor

@VersusFacit VersusFacit commented Jul 22, 2024

resolves #821

Note this Pr depends on the base adapter PR here.

Problem

Take 2 in response to #860

Solution

Redshift provides a macro that will check for the bad row scenario and throw a more helpful error to the user than the existing type mismatch bug that caused this error in the first place.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@VersusFacit VersusFacit self-assigned this Jul 22, 2024
@VersusFacit VersusFacit requested a review from a team as a code owner July 22, 2024 23:31
@cla-bot cla-bot bot added the cla:yes label Jul 22, 2024
@VersusFacit VersusFacit changed the title Adap 821/unit test infer wrong datatype Adap 821/unit tests infer wrong datatype for None values in fixtures Jul 22, 2024
@@ -1,5 +1,5 @@
# install latest changes in dbt-core + dbt-postgres
git+https://github.com/dbt-labs/dbt-adapters.git
git+https://github.com/dbt-labs/dbt-adapters.git@ADAP-821/support_for_redshift_821
Copy link
Contributor

Choose a reason for hiding this comment

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

Friendly reminder to revert prior to merging.

tests/functional/adapter/unit_testing/test_unit_testing.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mikealfare mikealfare left a comment

Choose a reason for hiding this comment

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

Approved, conditional on reverting dev-requirements.txt post merge of dbt-labs/dbt-adapters#270.

@VersusFacit VersusFacit enabled auto-merge (squash) July 23, 2024 21:18
@VersusFacit VersusFacit merged commit a1f33db into main Jul 23, 2024
27 checks passed
@VersusFacit VersusFacit deleted the ADAP-821/unit_test_infer_wrong_datatype branch July 23, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Unit test infers the wrong data type when the first record has some NULL values
2 participants