dbt-labs / dbt-adapters

Apache License 2.0
25 stars 35 forks source link

[Bug] Test for `date_spine` can give a false positives #210

Open dbeatty10 opened 4 months ago

dbeatty10 commented 4 months ago

Housekeeping

Short description

The test case can pass even if the expected and actual data sets are not perfectly equal.

Context

History: this test was migrated effectively as-is from dbt-utils to dbt-core to dbt-adapters.

This issue was discovered while working on https://github.com/dbt-labs/dbt-core/issues/10075.

Acceptance criteria

- [ ] Replace the `left join` with a `full outer join`

Testing

Manually alter the implementation of date_spine in order to check that the test case fails as expected in the following scenarios.

- [ ] Manually check that the test fails when the actual range returned by `date_spine` has too few days
- [ ] Manually check that the test fails when the actual range returned by `date_spine` has too many days

Security

No security concerns.

Docs

No doc updates needed.

Consequences

This change impacts any adapter that imports this test.

We'd hope that no adapters are currently getting a false positive, and this change is a no-op for them.

For any adapters that were getting a false positive, this test would start failing for them, and they need to make updates accordingly.