Repository navigation
Conversation
|
Build triggered. |
|
#560 has what I believe is a better way of handling this. |
|
Build triggered. |
|
#560 Agree, it's a more throughout way to handle this issue. In the code you have, it seems that the spark jar setting is moved to conf: SparkConf in favor of the CONF_SPARK_JAR. But it will make users difficult to set it up since the Client.scala also has to be changed. Simple question, with your change, how users can submit job with their own spark jar by passing the CONF_SPARK_JAR correctly? |
|
There's no need to change Client.scala with my change; all you need to do is set "spark.yarn.jar" somewhere - JVM system property, spark-defaults.conf, of in the app's code (modifying the SparkConf instance), and it will be picked up by the Yarn code. |
|
Build started. |
|
The app's code will only run in the application master in yarn-cluster mode, how can yarn client know which jar will be submitted to distributed cache if we set it in the app's spark conf? |
|
Ok, in cluster mode you can't use SparkConf.set(), but the other two options work fine. You can't do System.setProperty() in cluster mode to achieve that either, so even with your patch, you'd have to use -DSPARK_JAR=foo in the command line for it to work in yarn-cluster mode. |
|
Build finished. |
|
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15489/ |
|
We lunched Spark job inside our tomcat, and we directly use Client.scala API. With my patch, I can setup the spark jar using System.setProperty() before Do you mean that with your work, I can setup the jar location in the sparkConf which will be passed into the new Client? Can we have the following in sparkJar method |
|
I mean you can set system properties the same way. SparkConf initializes its configuration from system properties, so my patch covers not only your case, but also others (like using a spark-defaults.conf file for spark-submit users). |
|
Got you. Looking forward to having your patch merged. Thanks. Sent from my Google Nexus 5
|
|
#560 is merged. Close this PR. |
* [CARMEL-6055] Backport code-gen code for SortMergeJoin PR list: * Cheng Su 2021/12/30, 12:12 PM [SPARK-37726][SQL] Add spill size metrics for sort merge join * Cheng Su 2021/11/19, 12:36 PM [SPARK-37370][SQL] Add SQL configs to control newly added join code-gen in 3.3 * Cheng Su 2021/11/17, 9:48 PM [SPARK-37316][SQL] Add code-gen for existence sort merge join * Cheng Su 2021/11/17, 10:44 AM [SPARK-37341][SQL] Avoid unnecessary buffer and copy in full outer sort merge join * Cheng Su 2021/11/15, 7:34 PM [SPARK-35352][SQL] Add code-gen for full outer sort merge join * Cheng Su 2021/11/3, 11:18 AM [SPARK-32567][SQL] Add code-gen for full outer shuffled hash join * Cheng Su 2021/6/2, 2:01 PM [SPARK-35604][SQL] Fix condition check for FULL OUTER sort merge join * Cheng Su 2021/5/27, 12:59 PM [SPARK-35351][SQL][FOLLOWUP] Avoid using `loaded` variable for LEFT ANTI SMJ code-gen * Cheng Su 2021/5/18, 3:56 PM [SPARK-35351][SQL] Add code-gen for left anti sort merge join * Cheng Su 2021/5/17, 1:49 AM [SPARK-35363][SQL][FOLLOWUP] Use fresh name for findNextJoinRows instead of hardcoding it * Cheng Su 2021/5/13, 8:52 PM [SPARK-35350][SQL] Add code-gen for left semi sort merge join * Cheng Su 2021/5/12, 10:10 PM [SPARK-35349][SQL] Add code-gen for left/right outer sort merge join * Cheng Su 2021/5/11, 10:21 AM [SPARK-35363][SQL] Refactor sort merge join code-gen be agnostic to join type * [CARMEL-6055] Backport code-gen code for SortMergeJoin * Backport pr for BroadcastNestedLoopJoin * Fix UT * Fix UT * Backport [CARMEL-3719] OOM in sort merge join * Backport [CARMEL-3719] OOM in sort merge join * fix ut * Enable code-gen for full outer sort merge join by default
…pache#987) ### What changes were proposed in this pull request? `TINYINT` and `SMALLINT` columns are read and written by kernels, on a lane of their own; before, a query touching either type went to the row engine at the first node that read it. - **The lane.** `LaneType` gains `BYTE` and `SHORT` in width order, with `isNarrow()` and `isWiderThan()`; `Lane` has an entry for each (its Vector API class, species constants, one or two bytes a row, the `I2B`/`I2S` conversions); a narrow column and a narrow literal are leaves; `WidenLane` and `NarrowLane` carry the lane they convert to, so the int-to-long cast and the narrow conversions are one node kind. - **Both arms, behind `narrowLanes`.** Off, the default, a byte or short column is loaded once and widened to the int lane, and a narrow-typed result is truncated once at its store: every existing int lowering is reused and every existing kernel keeps its bytes. On, a kernel whose every value is narrow is driven at the narrow lane and computes in 8- or 16-bit species, which the committed spike (row 329 step 1) measured at 2x to 6x for bytes and 1.1x to 2.5x for shorts, tying wherever an int value is present. Which arm a host should default to is row 3.5's measurement, still open. - **Mixed trees.** A narrow condition, branch or conjunct joins an int one on the int lane, its operands widened: `rid < 0 AND (y1 < y2)` and `CASE WHEN rid < 0 THEN y1 ELSE y2 END` fuse and store narrow. A tree that would need a narrow value on the long lane declines with a name; a validity-only read (`y1 IS NOT NULL`) needs no narrow species and emits at any lane count. - **The rest of the type.** The evaluator admits `TinyIntVector` and `SmallIntVector` and allocates them; 22 coverage rows make both count as fused; the census, the width audit and the emitted-bytes oracle move only where the new rows are; the matrix's narrow-specific lines are listed with their reasons. - **128-bit vectors.** At four int lanes a byte column had no widening load - a four-lane byte species would be 32 bits - so the widened arm declined every byte-driven shape on a 128-bit host. It now reads the next species up, an eight-lane 64-bit byte load converted in two parts, one per int group: the loop computes two groups an iteration, its bound rounds down to a whole iteration with the remainder through the masked epilogue, and a store whose species is wider than a group is always masked. The decline is gone: `width_audit.json` loses its ten 128-bit cells, `emitted_bytes.json` records their hashes, and the `lanesOverride=4` skips follow because those rows pass. ### Why are the changes needed? Milestone 8 is every numeric and temporal type, and `TINYINT` and `SMALLINT` are two of the seven. They are also the only types whose representation question has two defensible answers, which is why the option and both arms exist: a narrow lane keeps four (or two) times the values per vector and needs no widening, while the widened arm reuses every int lowering and keeps existing bytes identical. The spike in row 329's step 1 measured both; the EPYC 7763's 256-bit columns are in the emitted-arm record and the Neoverse N2's 128-bit columns are still owed. ### Does this PR introduce _any_ user-facing change? Queries over `TINYINT` and `SMALLINT` now fuse where they previously fell back to the row engine, with the same answers. The `spark.sql.codegen.varka.emit.narrowLanes` option selects the native arm; its default is the widened one. ### How was this patch tested? - `VarkaEmitterNarrowSuite`: every byte value round-trips at every tail length; every ordered byte pair runs through the comparisons, a range set, `greatest`, `least` and a choice (2^16 rows in one batch); a short column's extremes and a spread of its domain; a narrow column beside an int one is widened on load; a narrow-typed value computed on the int lane is stored narrow, including out-of-range values through the truncation; both arms answer as `VarkaReference` does on the same batch. - The option matrix over the narrow and touched suites: the defaults and the configurations the change reaches (`lanesOverride=4`, `lanesOverride=16`, `validityByWidth=false`, `narrowLanes=true`) run green with no unfused test and no stale skip line; the whole matrix runs on the scheduled workflow after the merge. - `VarkaCoverageDifferentialSuite` 744 at the defaults; `VarkaExpressionCompilerSuite`, `VarkaWithChildrenSuite`, `VarkaIrFuzzSuite` (whose grammar now draws target-carrying conversions), the reproduction suite and the width audit. - The bytes oracle: `coverage.json` and `docs/sql-varka.md` change by addition only; `emitted_bytes.json` by the new rows plus the aggregate `option_arms` digests, which include every shape and therefore move when rows are added; `width_audit.json` by the new cells and the description. - The 128-bit part-form load: the six-run campaign at `-XX:MaxVectorSize=16` in `sql/varka/plans/m8/results/VARKA-329-partload.txt` (WIDENED serves every shape; NATIVE stays 4.2x to 16x faster wherever every value is narrow and the mixed shape ties), the seven named suites, and the option matrix over four configurations, no failure and no stale skip line. - `VarkaEmitterNarrowSuite` is a JUnit 5 `@VarkaSuite` class in Java, as VARKA-312 asks of new suites; its twelve tests are the same sentences as before. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (deepseek-flash) Self-review: I read the production and test diffs myself, and ran `/code-review high` over the branch. It found fifteen issues; thirteen are fixed in the last two commits (notably `withChildren` and the canonical rendering dropping a conversion's target, two missing same-lane guards that threw instead of declining, replay dispatching a narrow kernel through the long entry, a silently untruncated narrow conversion away from a store, a width-audit assertion that failed on 128-bit hosts, and a suite that skipped silently), and one is filed as a row (row 476, the warm-up's measurement; its coverage is implemented here because `VarkaWarmupReachSuite` enforced it). The first Build then found two consequences the review had not: the template warm-up did not call the narrow Vector API methods the new coverage rows emit (the reach gate named them), and four `VarkaFilterExecSuite` tests used a smallint column as their "cannot fuse" example; the warm-up now has a block for each narrow lane and the tests' residual example is a double column. The linters (Error Prone, `lint-java`, `lint-scala`, census, pre-commit, width and non-ASCII scans) were run by me on the final tree.
… red (apache#992) ### What changes were proposed in this pull request? Two maximum-effort code reviews of the recent `TINYINT`/`SMALLINT` pull requests (apache#987, the narrow lanes, and apache#989, their arithmetic) found nothing that answers a query wrongly, but several things in the test harness and the option matrix that would break or mislead. This pull request fixes the ones that change no emitted byte. - **41 stale skip lines removed.** The option matrix keeps a list of tests that are expected to fail or decline under one configuration. 41 lines said that at four int lanes (the 128-bit width) a `TINYINT` column has no widening load, so the compiler declines the row. That stopped being true when apache#987 taught the emitter to read a byte column at that width as an eight-lane 64-bit load converted in two parts. apache#987 deleted 28 of these lines, a later merge of master into apache#989's branch brought them back, and apache#989 added 13 more for its own rows. A listed test that passes fails the matrix as a stale line, so the weekly matrix run would have gone red on its next scheduled run. - **The arithmetic suite now tests the arm it names.** Its "widened arm" was built from the matrix's base options, so under the matrix's `narrowLanes=true` configuration both of its arms were the native one. Both arms are now set explicitly, and the native arm runs first. - **A declined kernel cancels the test instead of passing it.** Where a configuration cannot widen a narrow column (no baked int lane count), the suite used to skip the arm and report the test as passed with no kernel run. It now cancels the test, naming the refusal, as the narrow suite already does; the cancellation shows in the matrix report, and the 24 tests that cancel under `validityByWidth=false` (22 in the arithmetic suite, 2 in the narrow suite) have `declines` lines. Running the native arm first keeps its kernels checked in that configuration before the widened arm's refusal cancels the test. One limit stays: a test cancels at its first refusal, so under `validityByWidth=false` a native checked multiply, which is driven at the int lane on either arm, cancels the rest of its test there. - **The narrow suite's condition harness runs both kernel bodies.** A batch with no null took only the dense body, so the masked body was never compared with the reference on null-free rows, and one test's forced-mask pattern silently repeated the dense run. A null-free batch now runs a second time with the masked body forced. - **Smaller fixes.** The oracle-timing test skips an arm its filter does not name instead of cancelling, and cancels when the filter names neither; three test names get a missing space; the byte and short warm-up blocks are skipped on a host whose byte species exceeds 64 lanes, where a mask's `toLong` throws and ended the whole warm-up round; four comments that said a checked multiply never reaches the overflow mask are corrected; the narrow benchmark's javadoc no longer names a SQL conf that does not exist (`narrowLanes` is an emit option no session setting reaches). - **The record.** `VARKA-329.md` 9.8 lists every finding of both reviews with its disposition: fixed here, fixed by the bytes-neutral follow-up, fixed with the native-default change, a new row, or refuted. Two rows are filed for what needs design: one load and whole stores per iteration at four int lanes (479), and fusion where a narrow value meets another lane (480). ### Why are the changes needed? The weekly option matrix would have failed on 41 stale skip lines. Beyond that, two parts of the arithmetic suite reported tests as passed that had not run what their names said: the widened arm under `narrowLanes=true`, and every arm the compiler declined. A green report from them was not evidence. ### Does this PR introduce _any_ user-facing change? No. The only production change is the warm-up guard, which matters only on a host with vectors wider than 512 bits. ### How was this patch tested? The option matrix over the narrow and arithmetic suites and the coverage differential suite, in the configurations the change touches: | configuration | catalyst suites: ok / cancelled | `VarkaCoverageDifferentialSuite`: ok / cancelled | | :-- | --: | --: | | defaults | 62 / 20 | 786 / 0 | | `lanesOverride=4` | 62 / 20 | 786 / 0 | | `narrowLanes=true` | 62 / 20 | 786 / 0 | | `validityByWidth=false` | 32 / 50 | 716 / 70 | No failure and nothing unfused. The `lanesOverride=4` row is the evidence that removing the skip lines is safe: all 786 differential tests pass at four int lanes, including the 35 the removed lines had excused, so they hid no bug. `VarkaEmittedBytesSuite`, `VarkaWidthAuditSuite`, `VarkaCoverageSuite`, `VarkaWarmupReachSuite` and `VarkaVectorTemplateWarmupSuite` pass with their committed files unchanged. Error Prone, `lint-java`, `lint-scala`, the plan linter and the pre-commit hook pass. The diff was read by me and by one independent reviewer, whose findings are applied. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
…he narrow checks exhaustive (apache#993) Stacked on apache#992: until that merges, this diff includes its commit (`48ef48c3e79`). The changes of this pull request are `aac6aa92680`, `de8cc490d35` and `d49f1d98ed9`. ### What changes were proposed in this pull request? Two maximum-effort code reviews of the `TINYINT`/`SMALLINT` pull requests (apache#987, the narrow lanes, and apache#989, their arithmetic) found the narrow lanes' bookkeeping resting on rules nothing enforced. apache#992 fixed the findings in the test harness and the option matrix. This pull request fixes the ones in the engine that move no existing emitted byte. The ones that do move bytes come next, together with making the native narrow arm the default, so the generated files move once. - **The warm-up now covers the species widened kernels actually run at.** On the default (widened) arm, a narrow column is not loaded at the preferred byte or short species. It is loaded at the species `Lane.widenLanes` names for the int width, for example a 64-bit byte vector where the preferred one is 256 bits, and converted to int in parts. The template warm-up only exercised the preferred species, so the per-class methods of the widened ones went unwarmed until the first real query hit them. The reach gate missed it because it modelled every narrow receiver as the preferred class. The gate now also models the widened species, and the warm-up has one block per narrow type at that species: masked and unmasked loads, conversion of every part, narrowing back, stores, compare, blend and mask calls. The `neg()` and `abs()` calls no kernel makes are removed, and the narrow `VectorMask.fromLong` that a masked guard collect calls is now warmed. - **Switches over the IR are exhaustive.** `isNarrowRing`, the two walks that decide whether a kernel needs a narrow species and what refuses it, and the guard oracle's lane bounds used a `default` arm or an `instanceof` ladder over the sealed IR. A new narrow node would have fallen silently into the wrong answer in each. They are now exhaustive switches with no default, and the two walks sit side by side in `VarkaVectorIR`. - **An output's width is checked where a projection is built.** The width the emitter stores and the Spark type's width came from two sources nobody compared; a mismatch would write past a narrower Arrow vector with no error. `CompiledVarkaProjection` now rejects it. - **A false proof is removed.** `narrow_range.smt2` proved a checked byte multiply in a 16-bit lane, which the emitter never uses: a checked narrow multiply is computed in the int lane on both arms, which the file's other checks already prove. The lane width is now read from `Lane.INT`. - **`CAST(tinyint AS INT)` is a relabel.** The cast the type coercion inserts emits nothing (the narrow column's widening load already produces the int), so it no longer counts as a use of the int-arithmetic family switch, as a `TIME` precision cast doesn't. `VarkaFamily`'s text names it. Four coverage rows compare the cast with Spark, and the census marks byte and short to int as fused. - **Better fixtures.** The differential fixtures gain a narrow pair that is null on the left only. The fixture meant to have no nulls loses the narrow NULLs it had. `SMALLINT` values are adjusted so the equality rows (`s1 = 5S`, `s1 = i`) match at least one row, where before they compared false on every row. - **Small cleanups.** `runAndCompareMixedStatus` moves back to where it was, two unused Scala forwarders go, and `WALKTHROUGH.md` shows the IR and shape hash the current tree prints. Not fixed here: when a kernel at four int lanes reads a byte and a short column together, the short column is loaded at 128 bits and converted in two parts, and the warm-up converts only the first part. That matters only on 128-bit hosts (Apple Silicon, Neoverse), and only for branches inside the conversion that C2 may fold anyway. The reach gate counts methods, not branches, so it cannot see this. ### Why are the changes needed? On the default arm, every narrow kernel's first queries ran through Vector API methods the warm-up never compiled, which is the cold start the warm-up exists to prevent. The rest makes mistakes that would have been silent loud instead: a new IR node now fails to compile until each switch says what it does, a width mismatch fails when the projection is built instead of corrupting memory, the proof file proves only what the emitter does, and the fixtures can now catch a kernel that returns the wrong constant. ### Does this PR introduce _any_ user-facing change? No. Emitted kernels are byte-for-byte unchanged except for the four new coverage rows; the warm-up does more work at startup. ### How was this patch tested? - **Narrow and oracle suites:** `VarkaEmitterNarrowSuite`, `VarkaEmitterNarrowArithSuite`, `VarkaEmittedBytesSuite`, `VarkaWidthAuditSuite`, `VarkaWarmupReachSuite` and `VarkaVectorTemplateWarmupSuite` pass. - **Coverage and differential suites:** `VarkaCoverageSuite` and `VarkaCoverageDifferentialSuite` pass; all 799 differential tests pass. - **Regenerated files:** `coverage.json`, `width_audit.json`, `emitted_bytes.json` and `docs/sql-varka.md` were regenerated. In `emitted_bytes.json` only the four new rows and the aggregate option-arm digests moved. - **Option matrix:** the four new rows read a narrow column beside an int value, so they run at the int lane and widen the narrow column at its load, which needs a baked int lane count. Under `validityByWidth=false` there is none and the compiler declines them, as it declines the other narrow rows there. Their nine differential tests get `fails` skip lines; the differential suite then passes in the matrix at the defaults (799 ok) and under `validityByWidth=false` (720 ok, 79 cancelled as expected, none failed). - **Proofs:** every proof holds under z3 and cvc5. - **Linters:** Error Prone, `lint-java`, `lint-scala` and the pre-commit hook pass. - **Review:** an independent reviewer read the diff. Its finding (the `s1 = i` row matched nothing) is fixed, and its performance note is listed above. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
…on and abs as one op (apache#995) apache#992 and apache#993, which this was stacked on, have merged; master is merged in, and the diff against master is exactly the change (`03862a58f27`, plus the record of the owner's decision to keep the SMALLINT slices always on). ### What changes were proposed in this pull request? `TINYINT` and `SMALLINT` kernels can be emitted two ways. The widened arm loads a narrow column into the int lane and computes in ints; the native arm computes in `ByteVector`/`ShortVector` directly. The native arm was faster on every measured all-narrow shape, 2x to 16x depending on vector width, but the widened arm was the default. This pull request makes the native arm the default, and fixes the emission findings of the reviews of apache#987 and apache#989 that change emitted bytes, so the generated files move once. - **The lane is decided once per kernel.** The compiler, the budget check, the emitter and the compiled projection each read a kernel's lane from its first output. Under the native default that would have split `SELECT y1 + y2, i + 1`: the first entry native at the byte lane, the second at the int lane, so the second went back to Spark's row engine. `VarkaVectorIR.kernelLane` now gives one lane for all the roots: their own where they agree, the int lane where they differ and none is bigint (every narrow tree also has the widened lowering), and none where a bigint root meets another. All four consumers read it. If joining an entry would move a native kernel to the int lane at a width that cannot widen, that entry is demoted with a reason that says so. - **The native arm is the default.** `narrowLanes` ships true. The widened arm stays as an option the option matrix runs, as `narrowLanes=false`. - **Narrow negation is one `NEG`.** It was a multiply by -1, and x86 has no byte multiply, so it became an eight-instruction sequence. The int and long lanes keep the multiply until it is measured (row 482). - **Narrow `abs` is one `ABS`.** It was compiled as `IfElse(x < 0, -x, x)`: a compare, a negation and a blend, and the root lost the all-null shortcut. It is now the negation node with an `abs` flag, since the two have the same single overflowing input and the same check. At the int lane a wrapping `abs` reduces its own result, because `abs` does not commute with the narrow wrap (`abs(-128)` and `abs(128)` differ). - **A narrow `CASE` reduces once.** On the int lane, a wrapping narrow chain is reduced to its width only where a reader needs the exact value. A blend only picks lanes, so a narrow pick now passes its arms' unreduced values through and reduces once, instead of once in each arm. - **One truncation helper.** Narrowing an int value to `TINYINT`/`SMALLINT` away from a store now uses the same shift pair as the wrap, not a round trip through the narrow species. - **Grouping weights** count the shift pair a wrapping narrow node may emit. ### Why are the changes needed? The native arm is the faster one on every measured all-narrow shape, but nothing used it unless a test asked for it. Making it the default without the per-kernel lane would have sent mixed projections back to the row engine. The negation and `abs` changes remove an emulated byte multiply and a three-op composition from every narrow negation and `abs`. The narrow `CASE` and truncation changes remove duplicate reductions and a second lowering of one operation. ### Does this PR introduce _any_ user-facing change? Faster queries over `TINYINT` and `SMALLINT` columns where every value is narrow. Answers are unchanged. ### How was this patch tested? - **Emitted bytes:** `emitted_bytes.json` moved only for the 34 narrow coverage rows at each width and the aggregate option-arm digests that include them. No non-narrow row moved. - **New tests:** - A kernel of a byte sum, a short `abs` and an int sum runs on both arms against the reference. - The `kernelLane` answers are pinned. - The LEGACY chain test gains two pick shapes, a chain picked by a `CASE` and the same under `abs`. They are LEGACY only, since Spark evaluates a `CASE` branch only on the rows the condition picks. - **Tests pinned to the widened arm:** `VarkaEmitterNarrowArithSuite`'s width-rule test took the defaults to mean the widened arm, and now pins it. - **Suites:** all `Varka*` suites in `catalyst` and `sql` pass (`sql`: 1281 ok, 0 failed). - **Option matrix,** ok / cancelled, nothing failed or unfused: | configuration | catalyst (narrow, arithmetic, family, coverage, width audit, bytes) | `VarkaCoverageDifferentialSuite` | | :-- | --: | --: | | defaults (now native) | 63 / 20 | 799 / 0 | | `narrowLanes=false` | 63 / 20 | 799 / 0 | | `lanesOverride=4` | 63 / 20 | 799 / 0 | | `validityByWidth=false` | 32 / 51 | 772 / 27 | Under `validityByWidth=false` the native arm needs no baked lane count, so 52 skip lines went stale and are removed. The rows still declining there are the checked multiplies, which always run at the int lane, and rows that read a narrow column beside an int value. - **Benchmark** (`results/VARKA-329-negabs.txt`, laptop, before and after, with two new shapes in `VarkaNarrowEmitBenchmark`): - On the native arm, a byte negation and `abs` run 3.0x to 3.4x faster in L1 at 512 and 256 bits, 2.1x to 2.4x at 512 KB, and 1.15x to 1.26x at 2 MB, where the store is memory bound. - On the widened arm, `abs` gains 1.43x to 1.48x and negation 1.06x to 1.13x. - The control shape is unchanged, and no cell is slower. - **Warm-up:** the reach gate passes with `NEG` and `ABS` warmed at the native and widened species. - **Linters:** Error Prone, `lint-java`, `lint-scala`, the plan linter and the pre-commit hook pass. - **Review:** an independent reviewer found no correctness bug. It noted three things that are by design or belong to rows: - an entry demoted for joining is not retried in a kernel of its own (row 480); - an int entry moves the kernel's native narrow entries to the widened lowering, the mixed shape the two arms tie on; - the IR fuzzers draw no narrow arithmetic, narrow `CASE` or `abs` (row 352). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
…en (apache#1494) ### What changes were proposed in this pull request? This PR marks two plan rows Done in `sql/varka/plans/m8/PLAN.md`: row 329, the `TINYINT` and `SMALLINT` lanes (a widened int-lane arm and a native byte/short arm, behind the emit option `narrowLanes`), and row 330, their arithmetic (`+`, `-`, `*`, negation, `abs` and the `try_` forms) in `LEGACY`, `ANSI` and `TRY`. Both were merged in October 2026 (apache#987, apache#989 and follow-ups). It changes no code. It also adds one new plan row, 603, for a slowdown the check found (below). New section 9.11 of `sql/varka/plans/m8/VARKA-329.md` checks each row's done-when condition by condition against master, citing the merged PRs, the suites and their test lines, the committed results files and existing CI runs: - **Row 329.** Both arms are built with their coverage rows. The arms are measured per width and operator, on the laptop and on the EPYC 7763 runner at 256 and 128 bits. The widened arm, which lost, stays in the option matrix as `narrowLanes=false`. The census check passes. The EPYC benchmark covers `TINYINT` only; `SMALLINT` is measured on the laptop. Every byte and short operator-census cell reads intrinsic on the laptop, on the EPYC 7763 and on the Arm runner, or skips by design. The runner columns were only an artifact of the width-audit run 42750857065 (master `159d9b3026e`), and artifacts expire. This PR commits them unchanged as `results/VARKA-329-census-epyc-7763.json` and `results/VARKA-329-census-ubuntu-24.04-arm.json`. - **Row 330.** Every condition holds, with three qualifications: 1. The 18 exhaustive `SMALLINT` sweeps (2^32 operand pairs each) run weekly, not nightly, by the owner's decision of 6 November 2026. All 18 passed on both runner types in scheduled run 42355859989. 2. The `ANSI` sweeps, of both types, check the batch-level decline, not each pair. Per-pair overflow detection is carried by the `TRY` sweeps, which read the same overflow mask (`VarkaVectorWalk.emitNarrowOverflowMask`, then `emitOverflowMask` by mode). 3. The row asked for its sweep budget in `PLAN.md` before the next sweep landed. It never got there, and 9.4 claimed it had. This PR writes it into `PLAN.md` 10.3 item 5 and adds a dated correction to 9.4. The milestone-wide total covers the sweep manifest as of 7 November only: the float-cast and rounding sweeps are untimed, and row 332's planned sweeps are not counted. The budget comes from the printed per-sweep lines of run 42355859989, which this PR commits as `results/VARKA-330-sweep-ci.txt`. The 18 `SMALLINT` sweeps take 3544 s of x86 runner time and 4356 s on Arm, against the 5 h 32 min serial floor extrapolated on 22 October from one 1106 s laptop sweep. They run as three operator shards, so the wall clock is the longest shard, 1665 s, after a 633 s build job. The whole sweep manifest took 10506 s of x86 runner time and 61 minutes of wall clock. What stays open, outside both done-when lists, is listed in 9.11: - no benchmark on the Neoverse N2; - at 128 bits on the EPYC 7763, the narrow stores are slow: 150 to 156 M rows/s on the widened arm, and 131 to 139 M rows/s for the checked `TINYINT` multiply on both arms, the default included, against 19 to 40 G rows/s for the default arm's other byte stores; this is consistent with row 479's masked-store account but recorded by neither row 479 nor row 481; - the unexplained 128-bit bimodality; - the emitted packed-boolean column, which is row 27's; - the commits since the last sweep, which next Saturday's run covers. **New row 603.** The checked `TINYINT` multiply's slowdown above had no owner, so this PR adds a plan row for it. The numbers come from the committed EPYC 7763 results of `VarkaNarrowEmitBenchmark` (`sql/catalyst/benchmarks/VarkaNarrowEmitBenchmark-jdk25-runner-epyc7763-128bit-results.txt` and its 256-bit twin, both from apache#1176). At 128 bits, `y1 * y2` under `ANSI` and `try_multiply(y1, y2)` store 131 to 139 M rows/s on both arms. That is 138 to 308 times slower than the default arm's other byte stores in the same file, and 31 to 36 times slower than the same two shapes at 256 bits. The `SMALLINT` multiplies are not affected (about 1965 and 4530 M rows/s), and neither is the same byte multiply feeding a filter with no byte store (about 816). So the slowdown follows a byte store from a kernel that computes on four int lanes. The operator census misses it too: no cell reads a masked narrow store, so every cell those kernels rest on reads intrinsic. Row 479 rewrites the same 128-bit loop; if its fix removes this masked store, row 603 closes on that rerun. The row's done-when has three steps. First, add a census cell for the masked byte store of a kernel that computes on four int lanes. Second, establish the cause from HotSpot's own output on x86 under `-XX:UseAVX=2 -XX:MaxVectorSize=16`: `-XX:+PrintIntrinsics`, `-XX:+PrintCompilation` and the Vector API's intrinsic-failure lines show whether the byte store and its mask are compiled to vector instructions at that width, or fall back to Java and allocate. Third, either fix the store and rerun the two shapes at both widths, or decline the shape on such hosts with the measured reason. **Review points left as they are.** A high-effort review raised these. They are judgement calls for the owner, not errors in the record: - Row 329 reads Done although its benchmark condition holds in part: the EPYC 7763 files cover `TINYINT` only, `VarkaNarrowLaneBenchmark` has no committed results file (its laptop numbers are text records), and the Neoverse N2 has no benchmark. The record states each limit. - Row 330 reads Done although its full 2^32 sweeps last ran at `0b682025e09`. Eight later commits touched the narrow emission or its suite, so until next Saturday's run only the 2^24 slices on every build cover them. Two conditions are also met only in a qualified form, weekly rather than nightly and the budget totalled late. Each is stated in the row, so the owner may prefer "Done, with a waiver" or amended done-when text instead. - `VARKA-332.md` still says the budget is missing from `PLAN.md` and sizes its 38 sweeps at the 1106 s floor. This PR leaves row 332's file to row 332. - The skills notes' runner table still cites the older width-audit run 39400866095 and does not list the `F` cells the new run shows (`long.ABS` at 256 bits on the EPYC 7763; more long and decimal cells at 128 bits). Bringing that table up to date belongs to the next skills upkeep, not this close. - The 128-bit bimodality, the Neoverse N2 benchmark and a runner measurement of `SMALLINT` stay without a row of their own. This PR adds only row 603. ### Why are the changes needed? The two rows were built and merged weeks ago but still read Started, so the plan claimed work was left on them. The one real gap was the sweep budget. Planning for later sweeps (`VARKA-332.md` 0 item 14) found it missing from `PLAN.md`. Until now the only number written down was a serial floor of 5.5 hours, about five times the measured runner time. ### Does this PR introduce _any_ user-facing change? No. It changes plan text, adds one plan row, adds three results files and updates one sentence of the Vector API skills notes (`sql/varka/skills/vector-api-and-width.md`) to point at the committed runner census columns. ### How was this patch tested? - `dev/varka_plan_lint.py --check`, with the run citations checked online: no findings. - `python3 dev/varka_push_check.py`: passed, covering pre-commit, the quote check, `dev/varka_census.py --check` and the size check (111 counted lines). - Every number in 9.11 was read from the committed files or the cited CI runs' job steps, logs and artifacts. No sweep or benchmark was rerun. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
No description provided.