Repository navigation
Conversation
VAR_POP runs on Databricks as Spark's CentralMomentAgg: a running count, mean and second central moment updated row by row in DOUBLE. The converted SQL repeats that update exactly in the order DuckDB collects the rows, so its result is one Databricks itself returns for some order of the same rows. It relies on the central_moment_order divergence, bounded by the spread Databricks's own results showed over forced row orders. VAR_SAMP, STDDEV_SAMP, STDDEV_POP and their aliases stay refused: alone in an aggregation Databricks computes them otherwise, and its recordings of the same rows differ from the update.
… Databricks's own spread VAR_SAMP, STDDEV_SAMP, STDDEV_POP and the aliases VARIANCE, STDDEV and STD convert in two passes over the rows DuckDB collects: the mean, then the sum of squared deviations from it. Databricks's own result for the same rows moves with row order, partitioning, file layout and the other aggregates beside it, so the conversion relies on the moment_spread divergence. A divergence can now give a 64-bit float limit per family of data, and a case names its family. Verify holds each case to its own family's limit only, compares a case of no family exactly, and fails when a declared family has no passed case relying on it. Each limit is the largest spread between Databricks's recorded results for the same rows of that family, plus one unit for three small integers, where Databricks fuses the multiply and add of each squared deviation. The evidence pin moves to the commit holding those recordings.
A query nested in an expression, such as an IN subquery in WHERE, named its own column positions for the divergences it relied on, and verify read them as the outer result's columns. A function only in a WHERE subquery then widened the comparison of an unrelated result column. A subquery's divergences now name only the column whose expression holds it.
…ern matching Each of the six declared-refusal groups (collect-list-order, first-last-order, float-sum-order, regex-column-pattern, to-binary-odd-hex and url-decode-invalid-utf8) has a reason matching its loud divergence in the Databricks policy, and every one of its 27 statements raises on DuckDB rather than return another value, so all six are signed off. MATCH_RECOGNIZE's NEXT and PREV navigate rows within a row-pattern match, which DuckDB cannot evaluate either, so they join the row-pattern-matching group, which is signed off with them. In the baseline, the 13 forms the declared statements exercise move from refused to unmet obligations, since the obligations citing those statements stay unmet, and the eight row-pattern forms become not translatable.
kvlonge
enabled auto-merge
November 30, 2026 17:53
kvlonge
added this pull request to the merge queue
Nov 30, 2026
Any commits made after this event will not be merged.
This branch has not been deployed
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
Databricks VAR_POP, VAR_SAMP, STDDEV_SAMP, STDDEV_POP and aliases VARIANCE, STDDEV and STD were refused. Databricks's own results move with row order and partitioning, so none matches exactly.
Changes
central_moment_order, exact per recorded order).moment_spread). DISTINCT and OVER stay refused.Verification
+ - * / %, RANGE, GROUP BY, hints, TVF) count within ulps through them. MATCH_RECOGNIZE FIRST and LAST have no obligations, so with their statements under the signed group they read no_obligations.make check-ci.