Skip to content

Run the weekly comparator with deep error comparison in shadow (PR 7/8)#1532

Merged
sreekanth-db merged 1 commit into
comparator-v2from
comparator-baseline-authoritative
Jul 3, 2026
Merged

Run the weekly comparator with deep error comparison in shadow (PR 7/8)#1532
sreekanth-db merged 1 commit into
comparator-v2from
comparator-baseline-authoritative

Conversation

@sreekanth-db

Copy link
Copy Markdown
Collaborator

What

Turns deep error comparison on for the weekly CI run, in shadow mode: every Thrift-vs-SEA error divergence (class / SQLState / code / message / one-sided) is recorded in the report/CSV, but the run stays green. Final PR of the negative-cases series (builds on #1524#1530).

  • run-comparator.sh and runJdbcComparator.yml default ERROR_COMPARISON_MODE to shadow (previously the deep comparison only ran when a caller set the flag).
  • ErrorPolicy is simplified to two modes: off and shadow.
  • README documents the two modes.

Why no authoritative (fail-the-build) mode

An enforcement mode was prototyped and deliberately removed before this PR. Reason: enforcement over the DatabaseMetaData matrix can't be done cleanly at the diff-string level — CombinationExecutor collapses one-sided throws and infra failures into the same "Execution error: …" string, so a gate would either false-fail on an infra flake or silently miss a real one-sided metadata divergence. Rather than ship a gate with that known hole (dormant and unused, since we're not enforcing yet), enforcement is left as a clean future change, driven by the divergence data these shadow runs will accumulate.

Behavior

Shadow produces the same report/CSV as before and never fails on a diff — nothing else changes. Exception-class comparison stays strict (exact match); message text is compared raw (no normalization).

Testing

ErrorComparatorTest — 20/20; compiles clean; dead-code check clean after removing the prototype gate; Isaac Review (/review --uncommitted) — 0 findings.

NO_CHANGELOG=true (test-only comparator tooling, no driver behavior change).

This pull request and its description were written by Isaac.

Turns deep error comparison on for the weekly CI run, in shadow mode: every
Thrift-vs-SEA error divergence (class / SQLState / code / message / one-sided)
is recorded in the report/CSV, but the run stays green.

- run-comparator.sh and runJdbcComparator.yml default ERROR_COMPARISON_MODE to
  shadow (previously the deep comparison ran only when a caller set the flag).
- ErrorPolicy is simplified to two modes, off and shadow. The authoritative
  (fail-the-build) mode is intentionally NOT included: enforcement over the
  DatabaseMetaData matrix can't be done cleanly at the diff-string level
  (CombinationExecutor collapses one-sided throws and infra failures into the
  same "Execution error: …" string), so a gate would either false-fail on infra
  flakes or silently miss real one-sided metadata divergences. Enforcement is
  better added later as its own change, driven by observed shadow-run data.
- README documents the off/shadow modes and notes enforcement is deferred.

Behavior: shadow produces the same report/CSV as before and never fails on a
diff; nothing else changes. Exception-class comparison stays strict; message
text is compared raw (no normalization).

ErrorComparatorTest: 20/20. Isaac Review: 0 findings.

NO_CHANGELOG=true (test-only comparator tooling).

Co-authored-by: Isaac
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
@sreekanth-db sreekanth-db requested a review from a team as a code owner July 3, 2026 19:03
@sreekanth-db sreekanth-db merged commit c9e7f2a into comparator-v2 Jul 3, 2026
1 check failed
@sreekanth-db sreekanth-db deleted the comparator-baseline-authoritative branch July 3, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant