Repository navigation
SPARK-2056 Set RDD name to input path - #992
Closed
nevillelyh wants to merge 1 commit into
Closed
nevillelyh wants to merge 1 commit into
nevillelyh wants to merge 1 commit into
Conversation
|
Can one of the admins verify this patch? |
Contributor
|
Do you mind creating a JIRA ticket for this change and update the title to include the JIRA ticket number, like other pull requests do? Thanks! |
Contributor
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
Contributor
|
Thanks. I've merged this in master. |
Contributor
|
Actually I wasn't able to merge this - there was some error in my merge script. @pwendell can you try merge this? |
Contributor
|
The error I'm getting is |
Contributor
|
I went ahead and merged this to test the new script. Thanks! |
pdeyhim
pushed a commit
to pdeyhim/spark-1
that referenced
this pull request
Jun 25, 2014
Discovered in apache#992 Author: Patrick Wendell <pwendell@gmail.com> Closes apache#1007 from pwendell/hotfix and squashes the following commits: af90aa0 [Patrick Wendell] HOTFIX: Support empty body in merge script
pdeyhim
pushed a commit
to pdeyhim/spark-1
that referenced
this pull request
Jun 25, 2014
Author: Neville Li <neville@spotify.com> Closes apache#992 from nevillelyh/master and squashes the following commits: 3011739 [Neville Li] [SPARK-2056] Set RDD name to input path
nevillelyh
added a commit
to nevillelyh/spark
that referenced
this pull request
Jul 7, 2014
Author: Neville Li <neville@spotify.com> Closes apache#992 from nevillelyh/master and squashes the following commits: 3011739 [Neville Li] [SPARK-2056] Set RDD name to input path
xiliu82
pushed a commit
to xiliu82/spark
that referenced
this pull request
Sep 4, 2014
Discovered in apache#992 Author: Patrick Wendell <pwendell@gmail.com> Closes apache#1007 from pwendell/hotfix and squashes the following commits: af90aa0 [Patrick Wendell] HOTFIX: Support empty body in merge script
xiliu82
pushed a commit
to xiliu82/spark
that referenced
this pull request
Sep 4, 2014
Author: Neville Li <neville@spotify.com> Closes apache#992 from nevillelyh/master and squashes the following commits: 3011739 [Neville Li] [SPARK-2056] Set RDD name to input path
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Oct 23, 2026
… 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)
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Oct 23, 2026
… types taught (apache#994) Stacked on apache#992 (the plan cites its review record, `VARKA-329.md` 9.8): until that merges, this diff includes its commit. The change of this pull request is `4070af62bd7`, two plan files. ### What changes were proposed in this pull request? The plan for Varka's type architecture (`VARKA-475.md`) was written before the `TINYINT`/`SMALLINT` lanes and their arithmetic merged and were reviewed. Those reviews showed where adding a type actually goes wrong, and the plan is revised to match: - **The conformance contract comes first.** Most defects the reviews found were in hand-written test fixtures: no row with a narrow pair null on one side only, a "no nulls" fixture that held nulls, equality rows that no fixture row could make true. The contract now generates each type's fixtures from its values (extremes, every null pattern of a pair, equal pairs, a null-free batch), and three types that have already landed must pass it before a new type depends on it. - **The register checks come second.** `casts.tsv` and `census.tsv` already drift from the compiler: the census's fused-cast list missed byte and short to int until the pre-commit hook caught it. - **A new piece: a kernel plan.** Today the compiler's admission, the budget mirror, the emitter and the compiled projection each work out a kernel's lane, and in three review findings they disagreed. A `VarkaKernelPlan`, built once per kernel, would hold the drive lane, each input's load, each node's emitted lane, the reduction sites and the refusals, and all four would read it. It is scheduled before `TIMESTAMP_NTZ`, the first type whose semantics cross a lane boundary. - **The registry is narrowed** to the fields that have a reader today: the admission answer whose decline names the type, the census name, and the species a type reaches, which the warm-up reach model would read instead of restating. - **`ValueShape` stays `ONE` and `PAIR`** until a row builds another shape. The shape switches are exhaustive, so adding a member later costs only the compile errors it raises. - **Rules for a new type's diff:** operators rather than new IR nodes (a node costs about twenty files), lane facts rather than `isNarrow()` branches, alternative representations kept as option arms, and the warm-up following the registry. The row's text in `PLAN.md` is updated to match. ### Why are the changes needed? Four of the milestone's seven types are still ahead. The plan scheduled the registry first, but the narrow types' defects came mostly from fixtures and from the lane being decided in four places. Fixing those first keeps the same mistakes out of `TIMESTAMP_NTZ`, `DOUBLE`, `FLOAT` and `DECIMAL`. ### Does this PR introduce _any_ user-facing change? No. Plan documents only. ### How was this patch tested? The plan linter (`dev/varka_plan_lint.py`) and the pre-commit hook report no findings. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Oct 23, 2026
…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)
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Oct 23, 2026
…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)
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.
No description provided.