Repository navigation
Conversation
github-actions Bot
pushed a commit
to MaxGekk/spark
that referenced
this pull request
Nov 24, 2026
…e#1644 made stale (apache#1694) ### What changes were proposed in this pull request? This deletes one line of the option matrix's skip list, `sql/varka/matrix/skips.tsv`, and records the event in row 644 of the plan. The line says that the `VarkaGroupingBoundSuite` test "under the exact grouping no shape declines, and none falls back to the greedy grouping" fails under `driverOutputTable=false`. Since apache#1644 the test passes there, so the matrix fails the line as stale. ### Why are the changes needed? The option matrix fails on master. The skip list must name only tests that do fail: a listed test that passes fails its bin, so that the list does not hide a test. Every pull request's matrix that runs on master since apache#1644 fails this bin, as apache#1693's bin b135 did, and so does the next scheduled matrix of master. The local runs of the suite under `driverOutputTable=false` (`dev/varka_matrix.sh --module catalyst --config driverOutputTable=false --suites VarkaGroupingBoundSuite`): | Commit | Result | |---|---| | `a55f82c2427` (apache#1643) | the test passes; apache#1643 had deleted the line | | `26b24c75b1b` (apache#1644) | the test passes: stale line | | `6ec492b53cf` (master, apache#1692) | the test passes: stale line | | master with the line deleted | passes | apache#1643 deleted the line, because its coverage rows made the test pass. apache#1644 added the line back, because the test failed on its own base, which did not have apache#1643. Its refresh onto master merged without a conflict, and no matrix ran on the result. This is a stopgap. Row 644 of `sql/varka/plans/m8/PLAN.md` tracks this line: the test draws 60 compositions from the coverage table with a fixed seed, so each new coverage row draws them again, and the verdict under `driverOutputTable=false` follows whichever draw falls back. The next pull request that adds a coverage row can make the test fail again under this option. Row 644's fix makes the verdict not depend on the draw. This pull request adds the day's data point to the row. `skips.tsv` merges with git's union driver (`sql/varka/.gitattributes`). A branch that appends a line after this one in the `driverOutputTable=false` block can bring the deleted line back in a local merge with master, so check the block after such a merge. ### Does this PR introduce _any_ user-facing change? No. It changes only the test configuration of the option matrix. ### How was this patch tested? - The suite under `driverOutputTable=false`, with the line deleted, on the laptop: passes. - The local gate (`pre-pr.sh`): the regeneration of generated files, lint-java, Error Prone, lint-scala, the invariant and proof suites, and the push check. - `/code-review high` of the change: no bugs, 3 findings. Fixed: the pull request cites row 644 and adds the data point to it. Recorded here: the line can flip again (row 644), and the union merge driver can bring it back. - The option matrix of this pull request. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Nov 25, 2026
…pache#1710) ### What changes were proposed in this pull request? This pull request is parts b and c of row 359, "The 128-bit decimal lane pair" (`sql/varka/plans/m8/VARKA-359.md`, sections 10.7 and 10.8). Part a (on master) loads a `DECIMAL(19..38)` column as two long words per row, a low word and a high word, and fuses the comparisons, null tests and `IN` over them. Until now a wide decimal could be read but not written, so every expression whose result is a wide decimal declined. This part adds the store, so these outputs fuse: `-d`, `abs(d)`, `IF`, `CASE`, `coalesce`, `nullif`, `greatest` and `least` over wide decimals. - **One new IR node, `InterleaveDecimal(lo, hi)`.** It is an output root and nothing else, rendered `(idec <lo> <hi>)`. Its two children are the value's low and high words, both long-lane values. The walk parks the high words in a local and leaves the low words on the stack. The store then interleaves the two into Arrow's sixteen-byte slot: row `r` takes lane `r` of `lo` and then lane `r` of `hi`. This is the store `WidenDecimal` already makes for a decimal of 18 digits or fewer (`VarkaBodyEmitter.emitInterleavedStore`), with a high word of its own in place of the sign extension. - **Its properties are one `props()`.** Since row 489 (apache#1692, apache#1693, apache#1696), each IR record states in a `VarkaNodeProps` descriptor what the passes ask of it, in place of an arm in each pass's switch. This node states ring `NEVER`, validity `Operand(0)`, weight 3 (the two interleaves and the second store), its record name as the cost kind, no restricted operand position, and `LongNarrowReader.NONE`. The two words of one value are valid on the same rows, so the output's validity word is the low word's. - **The validity write with the bitmap pass off.** With `validityByBitmap=false` every own word is computed. A choice over a pair (for example `IF(c, x, y)`) then computes a blended word for each of its two words. The per-group validity write reads both words and ANDs them where they differ, so the high word's blend is not computed for nothing. With the pass on, the high word is not demanded, and the write reads the low word alone. - **The admission.** `VarkaTypes.decimalOutputDeclineReason` now refuses only a negative scale. `VarkaDecimalCompiler.output` builds a wide output as its word pair under the new root. `outputRoot`, which widens a long, refuses a wide type as a caller error. `CompiledVarkaProjection` and the evaluator's allocator (`VarkaLaneArrow`) give the output sixteen bytes a row. - **The `decimalStore` option** (how the store interleaves the words) now reaches the pair's store too. `VarkaEmitOption.readOnlyBy` can name one class, `WidenDecimal`, so the option matrix's reach does not count the pair's stores. - **Two long lanes on x86.** A pair output is refused there (`VarkaKernelPlan.TWO_LANE_DECIMAL_PAIR_OUTPUT_REASON`). Its store uses two two-vector rearranges. C2 does not lower these at two lanes, and row 596 measured the same fallback in the load as slower than the row path. - **Tests and records.** `VarkaDecimalPairSuite` gets three tests (below). The test registries that list every node know the new node: the grammar, the reference (which refuses it, as it has no single long value), the guard specs, the SMT nodes, the lane-type, reproduction, budget, cost, range-analysis, IR-fuzz and with-children suites. The coverage table gets the family "DECIMAL lane pair values" (seven rows). The census notes for `if`, `coalesce` and `greatest` say that they fuse past 18 digits over the lane pair, as an output too. The pair's conformance suite counts a form whose output is a pair store as unverified, neither fused nor declined, and cancels with their list after its other cancellations, because its reference and oracle read only long values; `VARKA-359.md` lists those forms, and `VarkaDecimalPairSuite` holds the same shapes to Spark. - The generated files are regenerated: `emitted_bytes.json`, `coverage.json`, `width_audit.json`, `casts_suites.tsv`, the docs' support table and `VARKA-612-refused.txt` (seven more rows refused at two lanes). ### Why are the changes needed? Without a store, a wide decimal that Varka reads could only feed a filter. Any projection of a wide decimal value, even `CASE WHEN x < y THEN x ELSE y END`, left the whole expression to Spark's row path, which builds a `java.math.BigDecimal` per row. Row 359 is milestone 8's DECIMAL work up to precision 38, and the store is the step between the wide comparisons (part a) and the wide arithmetic (rows 360 to 363), which needs a place to write its results. ### Does this PR introduce _any_ user-facing change? No change in answers. With Varka on, more expressions over `DECIMAL(19..38)` fuse: the negation, `abs`, the choices and the picks listed above. They give the same answers as Spark's row path. ### How was this patch tested? - `VarkaDecimalPairSuite.storedValues`: eleven outputs over a narrow-and-wide and a wide-and-wide pair of columns, plus four with a wide literal beside a column (`coalesce(a, 18446744073709551621.00)`, `IF(a IS NULL, -0.01, a)`, and `greatest` and `least` with the 38-digit bound), `abs` at 19 digits and a choice with a 64-bit side. Each is compiled as a projection and run at 1, 2, 4 and 8 lanes over the word edges and every null pattern. The slots are read back as two words and compared with Spark's own evaluation of the expression. - `VarkaDecimalPairSuite.storedValuesWithoutTheBitmapPass`: nine shapes, one per producer of a pair, emitted with `validityByBitmap=false` and `validityOrFirst` on and off, compared with Spark. Since the merged review its kernels are emitted under these options, not only compiled under them: with the liveness-off AND removed by hand it fails with "word slot 71 is stored but never loaded", and with it, passes. With `storedValues` passing too (the low word's validity alone), it also shows that the high word is valid wherever the low word is. This is the regression test for the dead high-word blend that `VarkaEmittedBytesSuite` found ("word slot 51 is stored but never loaded in a LOOP body"). - `VarkaDecimalPairSuite.storeAdmission`: every precision is admitted, and the rendering. `VarkaTwoLaneConditionSuite.decimalPairOutput`: refused on the two-lane host and admitted elsewhere. - On the merged head, under JDK 25, in one sbt JVM per batch: the registry and descriptor suites (`VarkaNodePropsSuite`, `VarkaLaneTypeSuite`, `VarkaEmitterBudgetSuite`, `VarkaEmitCostSuite`, `VarkaKernelPlanSuite`, `VarkaRangeAnalysisSuite`, `VarkaWithChildrenSuite`, `VarkaReproductionSuite`, `VarkaSmtNodesSuite`, `VarkaVectorIRSharingSuite`, `VarkaTwoLaneConditionSuite`) pass, 150 tests. The decimal and byte suites (`VarkaDecimalPairSuite` 13, `VarkaDecimalOutputSuite` 6, `VarkaDecimalConformanceSuite` 2 and 5 cancelled as above, `VarkaDecimalLongConformanceSuite` 5 and 2 cancelled, `VarkaDecimalWordSuite` 7, `VarkaDecimalArithmeticSuite`, `VarkaTypesSuite`, `VarkaEmittedBytesSuite` and `VarkaEmitterValiditySuite`) pass, 91 tests and 9 cancelled (the other cancellations are opt-in audits). `VarkaIrFuzzSuite` passes, 47 tests (2 opt-in cancelled), in 2 minutes 50 seconds. In sql/core, `VarkaLaneArrowSuite` and `VarkaDecimalBaselineQueriesSuite` pass, 16 tests. Where master's newer decimal code meets this change: `VarkaExpressionCompilerSuite`, `VarkaSameAnswerContractSuite`, `VarkaDecimalRemainderAllocationSuite` and `VarkaCoverageCompositionFuzzSuite` pass, 214 tests, and `VarkaDecimalCastQuerySuite` (sql/core), 8 tests. - `dev/varka_regen_generated.sh --all` on the merged tree (after master's row 489), under JDK 25: 435 cast tests, and the coverage, width-audit and emitted-bytes suites pass; it left the committed files unchanged. - After the review's fixes, at the head: `catalyst/Test/compile` and `sql/Test/compile` pass; `VarkaDecimalPairSuite` 13, `VarkaDecimalConformanceSuite` 2 and 5 cancelled, `VarkaDecimalLongConformanceSuite` 5 and 2 cancelled, `VarkaDecimalOutputSuite` 6, `VarkaNodePropsSuite` and `VarkaEmittedBytesSuite` pass (no generated file moved). - `dev/varka_push_check.py --no-jvm` passes. Size: 867 counted lines against master. **Review.** One `/code-review high` round found 10 items, 3 important: the bitmap-off test emitted under the default options (fixed), the conformance suite hid its pair-store forms behind one cancellation (they now count as unverified, are named last, and the plan lists them as owed by row 359, since a two-word harness would not fit this pull request), and no stored case had a wide literal (added); of the 7 nits, 6 are fixed (the producer test, the two-lane refusal's reason against `WidenDecimal`'s store, the `decimalStore` reach, the compiler's javadoc, the unverified count, the high word's lookup), and the validity rule is kept as `Operand(0)` with the AND only with the liveness pass off, held by the producer test. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
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.
Exit the application if receiver job crashed