[CT-707] Expose check_relations_equal + consolidate with dbt-utils generic tests #5318
Labels
Team:Adapters
Issues designated for the adapter area of the code
tech_debt
Behind-the-scenes changes, with little direct impact on end-user functionality
utils
Cross-database building blocks
To assert that two relations are identical, we have similar logic expressed in a few places today:
dbt-utils
: theequality
,cardinality_equality
, and (to a lesser extent)equal_rowcount
COLUMNS_EQUAL_SQL
+get_rows_different_sql
, which are used extensively (but exclusively) in our functional testing framework today:dbt-core/core/dbt/adapters/base/impl.py
Lines 1093 to 1149 in 3996a69
Straightforward change
Could we consolidate the logic in both those places, so that we're not duplicating the same SQL (and requiring adapter maintainers to do the same)?
Related improvements
Some good feedback on the latter, in #4455 (reply in thread) — trying to answer the question, "Could/should the functional testing framework also enable unit testing models/macros for end users?" — that the output of
check_relations_equal
assertion statements could be more useful:The text was updated successfully, but these errors were encountered: