refactor(reconcile): consolidate data compare (join, mismatch, output) — #745#2380
Open
refactor(reconcile): consolidate data compare (join, mismatch, output) — #745#2380
Conversation
…cile output assembly; route capture mismatch through _inner_join_for_capture_mismatch; add module docstring for hash vs aggregate vs capture flows.
1 task
|
❌ 120/122 passed, 2 failed, 3 skipped, 54m11s total ❌ test_recon_databricks_job_succeeds: databricks.sdk.errors.sdk.OperationFailed: failed to reach TERMINATED or SKIPPED, got RunLifeCycleState.INTERNAL_ERROR: Task run_reconciliation failed with message: Workload failed, see run output for details. (7m45.705s)❌ test_recon_sql_server_job_succeeds: databricks.sdk.errors.sdk.OperationFailed: failed to reach TERMINATED or SKIPPED, got RunLifeCycleState.INTERNAL_ERROR: Task run_reconciliation failed with message: Workload failed, see run output for details. (4m13.579s)Running from acceptance #4235 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors
compare.pyso hash reconciliation, aggregate reconciliation, and the capture (inner-join) path share the same building blocks where appropriate: aliased joins, join → prepare → persist, and value-mismatch filtering.Related: #745
What changed
_aliased_join,_join_prepare_persist; hash flow uses prefixedselectExpr; aggregate flow usesprepare_persisted_aggregate_join(replacesjoin_aggregate_data)._filter_to_value_mismatches; hash path uses_value_mismatch_where_both_presentand_mismatch_rows_for_prefixed_compare_column; aggregate path uses_mismatch_rows_for_aggregate_mappings(replaces_get_mismatch_agg_data)._data_reconcile_outputforreconcile_dataandreconcile_agg_data_per_rule._mismatch_projection_for_prefixed_columns,_joined_rows_missing_on_side(optionalcompare_basename), generic prefixed compare +_get_mismatch_datawrapper.capture_mismatch_data_and_columns/_get_mismatch_dfuse_inner_join_for_capture_mismatch(same_aliased_joinprimitive); projections split into small helpers.API / migration
prepare_persisted_aggregate_joininstead ofjoin_aggregate_data._get_mismatch_agg_dataremoved; aggregate mismatch logic lives in_mismatch_rows_for_aggregate_mappings(module-private).Testing
Checklist for reviewers
join_aggregate_data/_get_mismatch_agg_dataand update any remaining imports or references