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

Avoid false positives in date_spine macro #211

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dbeatty10
Copy link
Contributor

resolves #210
resolves #208

Problem

While working on dbt-labs/dbt-core#10075, I noticed a few things about this test case:

  1. The date range is larger than needed
  2. The test can give a false positives
  3. There are hard-coded adapter types

The second one is the most impactful. This PR solves the first two.

Solution

  1. Reduce the date range from 9 down to 3 (which gets rid of 36 lines of code)
  2. Use a full outer join rather than a left join to eliminate possibility of a false positive

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
  • New 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant