Repository navigation
fix: error a unit test when its tested output query fails - #1208
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 21, 2026 23:20
Storing a unit test's actual output once and comparing against it fell back to the inline comparison on any storage error. On a warehouse that prunes unread columns, the inline comparison of the expected columns can pass when computing the full output fails, for example when a fixture value cannot be converted in a column the expected rows leave out, so the test reported PASS over a warehouse error. When storing fails, the output query now runs on its own; if it fails too, the test errors with the warehouse's message, and only a failure to store a computable output compares inline.
When a later chain step's output could not be stored, the probe ran that step's query reading the earlier steps' stored outputs, which had just been dropped, so it reported a missing table instead of comparing inline. The probe now renders the failing step fully inline, runs only when storing itself failed rather than rendering, and keeps the storage error in the debug log when the step's query fails on its own.
DuckDB 1.5.0 to 1.5.4 raise an internal binder error for two identical window functions over a GROUP BY of a constant input, which is the shape of a unit test's fixture CTE. Storing the output and running it on its own both hit it, so the output check reported the engine bug as the model's error while the inline comparison computes every column correctly. An internal engine error while storing an output now compares inline.
kvlonge
force-pushed
the
fix/unit-test-assert-errors
branch
from
October 22, 2026 00:16
18d62a5 to
46460a9
Compare
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.
Why
A unit test could report PASS while its tested model failed in the warehouse. SQLBuild stores a test's actual output once and compares against it. If storing failed for any reason, it silently fell back to the inline comparison. On a warehouse that prunes unread columns, that comparison of the expected columns alone can succeed while the full output fails, for example when a fixture value cannot be converted in a column the expected rows leave out.
Changes
Verification
--json, exit 1); a session that cannot store outputs still passes inline. Both error cases failed before the fix.make check-ci.