Truthound · Query correctness · 2/3
Compare aggregates, joins and filters against independent expectations.
49 articles
Check NaN constants before treating negated DuckDB comparisons as algebra
Reconcile row-selection flags for the original negated comparison and its optimized path when NaN is present. Quarantining every non-finite value does not establish that the original predicate was preserved.
Distinguish a NULL aggregate row from no row in DuckDB
Check a NULL aggregate value separately from the absence of its result row on empty input. Retain controls for correlation and DISTINCT so missing-value handling cannot hide a cardinality error.
Compare DuckDB DESCRIBE aliases with actual output headers
For a quoted alias, compare DESCRIBE names with execution headers while preserving case. Lowercasing during extraction can erase a schema discrepancy that changes the consumer contract.
Choose the survivor before relying on DuckDB INSERT OR IGNORE
For a batch with intersecting UNIQUE constraints, successful insertion leaves the winner question open. Define the survivor policy first, then approve INSERT OR IGNORE against the selected key set.
Cross platform and list-length boundaries for DuckDB BIGNUM lambdas
A scalar control is insufficient to approve lambda comparisons involving a large negative number. Check result Booleans across list lengths and element positions on the operating system that will run the query.
Keep net-zero rewrites from erasing a Doris offset snapshot key
A same-value rewrite can still require the earlier row in an offset-based snapshot. Test the effect of net-delta elimination against keys fixed at that offset while preserving the report's unexecuted-scenario scope.
Preserve OFFSET semantics through a wrapped Doris correlated subquery
Reconcile parent keys for the correlated OFFSET case using the reachable wrapper and exact build. An analyzer rejection of the top-level query is not a reproduction of an incorrect result.
Keep Delta partition-filter casts consistent with scan values under ANSI
Apply the same parsing policy to malformed partition strings in full-scan and filtered paths. Preserve raw values and ANSI settings so a cast error stays distinct from a valid empty result.
Check UTC rendering separately from ClickHouse view timestamp identity
Check the text contract of a UTC view separately from epoch preservation. Recording the actual session timezone with output text tests the consumer requirement without mistaking a display difference for a shifted instant.
Preserve session temporary-table binding when ClickHouse restores a view
Recheck the actual namespace binding of a view referencing a temporary table in a new session after restart. Prior-session success cannot approve the restored reference; value and isolation checks remain subsequent steps.
Test ClickHouse result limits against queries without FROM
Compare actual result rows with the approved cap even when a query omits FROM. This delivery check detects oversized results but cannot undo resources already consumed or replace server-side enforcement.
Preserve JSON object boundaries when checking ClickHouse distinct results
Use structural controls to check whether distinct merges JSON documents with different object boundaries. If comparison tokens stand in for documents, define key ordering and NULL semantics before accepting the count.
Trino decimal-bucket join omissions: compare parallel runs on one snapshot
When fixed inputs produce unstable results, inspect key-level task assignment and match presence rather than only value ranges.
Polars literal-comparison length errors: verify the row-mask contract
Equivalent comparisons can take different scalar and row-wise paths. Check the boundary where the mask must be materialized.
Polars projection after left join_where: a correct column name can hide the wrong source
Distinct field markers and a complete schema check distinguish a wrong column value under a plausible name.
Polars group extrema after reverse: compare membership as well as the maximum
Separate reordering from selecting fewer elements before deriving an independent expected extreme.
Polars argmax ties: the maximum can be correct while the selected row is wrong
A positional tie-breaking contract exposes selection errors that a value-only check cannot detect.
Iceberg–Spark exchange reuse: equal hashes do not establish equal scans
A plausible aggregate still needs evidence that the requested partition actually contributed to it.
Checking inconsistent DuckDB NULL counts with a conservation rule
Before trusting a NULL ratio, verify that total, non-null and null counts partition the same input.
Checking DuckDB LEFT JOINs: equal row counts can hide missing keys
Verify which left-side identities receive NULL-extended rows, not just the total number of rows.
