Repository navigation
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Please catch NonFatal(e) instead. I think we should catch StackOverflowError here (as that is a possible error during serialization), but we should not catch OOMs and other such throwables except to re-throw them.
NB: Despite what the documentation says, NonFatal does indeed seem to catch StackOverflowError:
scala> NonFatal(new StackOverflowError())
res1: Boolean = true
scala> NonFatal(new OutOfMemoryError())
res2: Boolean = falseThere was a problem hiding this comment.
I suspect you are testing this on 2.10. Looks like a change in 2.11:
scala/scala@6460365#diff-ff42321ce198f97308744271b7e17c76
I think their argument applies to Spark too. Sounds like it is not safe to try and recover from StackOverflowError.
Thanks for the comments! I'll update the pull request in a moment.
|
Jenkins, ok to test. |
|
Merged build triggered. |
|
Merged build started. |
|
Thanks! I've added the suggested changes. |
|
Merged build triggered. |
|
Merged build started. |
|
LGTM. Regarding the initial problem you observed, did you see the actual exception via the DAGScheduler's OneForOneStrategy failure? Or were there no log messages containing the error? |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
Yes, the exception was logged from OneForOneStrategy. See the stack trace in https://issues.apache.org/jira/browse/SPARK-2403. (Well, except I omitted the first line which names OneForOneStrategy. Sorry about that.) But after logging that, the system stalled. |
|
Great, thanks! I just wanted to make sure it was actually printed somewhere, although I understand the behavior was not ideal. |
|
Merged into master and branch-1.0. Thanks! |
https://issues.apache.org/jira/browse/SPARK-2403 Spark hangs for us whenever we forget to register a class with Kryo. This should be a simple fix for that. But let me know if you have a better suggestion. I did not write a new test for this. It would be pretty complicated and I'm not sure it's worthwhile for such a simple change. Let me know if you disagree. Author: Daniel Darabos <darabos.daniel@gmail.com> Closes #1329 from darabos/spark-2403 and squashes the following commits: 3aceaad [Daniel Darabos] Print full stack trace for miscellaneous exceptions during serialization. 52c22ba [Daniel Darabos] Only catch NonFatal exceptions. 361e962 [Daniel Darabos] Catch all errors during serialization in DAGScheduler. (cherry picked from commit c8a2313) Signed-off-by: Aaron Davidson <aaron@databricks.com>
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
https://issues.apache.org/jira/browse/SPARK-2403 Spark hangs for us whenever we forget to register a class with Kryo. This should be a simple fix for that. But let me know if you have a better suggestion. I did not write a new test for this. It would be pretty complicated and I'm not sure it's worthwhile for such a simple change. Let me know if you disagree. Author: Daniel Darabos <darabos.daniel@gmail.com> Closes apache#1329 from darabos/spark-2403 and squashes the following commits: 3aceaad [Daniel Darabos] Print full stack trace for miscellaneous exceptions during serialization. 52c22ba [Daniel Darabos] Only catch NonFatal exceptions. 361e962 [Daniel Darabos] Catch all errors during serialization in DAGScheduler.
https://issues.apache.org/jira/browse/SPARK-2403 Spark hangs for us whenever we forget to register a class with Kryo. This should be a simple fix for that. But let me know if you have a better suggestion. I did not write a new test for this. It would be pretty complicated and I'm not sure it's worthwhile for such a simple change. Let me know if you disagree. Author: Daniel Darabos <darabos.daniel@gmail.com> Closes apache#1329 from darabos/spark-2403 and squashes the following commits: 3aceaad [Daniel Darabos] Print full stack trace for miscellaneous exceptions during serialization. 52c22ba [Daniel Darabos] Only catch NonFatal exceptions. 361e962 [Daniel Darabos] Catch all errors during serialization in DAGScheduler.
…espect to aliases to avoid unneeded exchange/sort nodes
### What changes were proposed in this pull request?
This pull request tries to remove unneeded exchanges/sorts by normalizing the output partitioning and sortorder information correctly with respect to aliases.
Example: consider this join of three tables:
|SELECT t2id, t3.id as t3id
|FROM (
| SELECT t1.id as t1id, t2.id as t2id
| FROM t1, t2
| WHERE t1.id = t2.id
|) t12, t3
|WHERE t1id = t3.id
The plan for this looks like:
*(9) Project [t2id#1034L, id#1004L AS t3id#1035L]
+- *(9) SortMergeJoin [t1id#1033L], [id#1004L], Inner
:- *(6) Sort [t1id#1033L ASC NULLS FIRST], false, 0
: +- Exchange hashpartitioning(t1id#1033L, 5), true, [id=#1343] <------------------------------
: +- *(5) Project [id#996L AS t1id#1033L, id#1000L AS t2id#1034L]
: +- *(5) SortMergeJoin [id#996L], [id#1000L], Inner
: :- *(2) Sort [id#996L ASC NULLS FIRST], false, 0
: : +- Exchange hashpartitioning(id#996L, 5), true, [id=#1329]
: : +- *(1) Range (0, 10, step=1, splits=2)
: +- *(4) Sort [id#1000L ASC NULLS FIRST], false, 0
: +- Exchange hashpartitioning(id#1000L, 5), true, [id=#1335]
: +- *(3) Range (0, 20, step=1, splits=2)
+- *(8) Sort [id#1004L ASC NULLS FIRST], false, 0
+- Exchange hashpartitioning(id#1004L, 5), true, [id=#1349]
+- *(7) Range (0, 30, step=1, splits=2)
In this plan, the marked exchange could have been avoided as the data is already partitioned on "t1.id". This happens because AliasAwareOutputPartitioning class handles aliases only related to HashPartitioning. This change normalizes all output partitioning based on aliasing happening in Project.
### Why are the changes needed?
To remove unneeded exchanges.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
New UT added.
On TPCDS 1000 scale, this change improves the performance of query 95 from 330 seconds to 170 seconds by removing the extra Exchange.
Closes #30300 from prakharjain09/SPARK-33399-outputpartitioning.
Authored-by: Prakhar Jain <prakharjain09@gmail.com>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
…rtitioning and sortorder with respect to aliases to avoid unneeded exchange/sort nodes (#1092) * [SPARK-31078][SQL] Respect aliases in output ordering Currently, in the following scenario, an unnecessary `Sort` node is introduced: ```scala withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "0") { val df = (0 until 20).toDF("i").as("df") df.repartition(8, df("i")).write.format("parquet") .bucketBy(8, "i").sortBy("i").saveAsTable("t") val t1 = spark.table("t") val t2 = t1.selectExpr("i as ii") t1.join(t2, t1("i") === t2("ii")).explain } ``` ``` == Physical Plan == *(3) SortMergeJoin [i#8], [ii#10], Inner :- *(1) Project [i#8] : +- *(1) Filter isnotnull(i#8) : +- *(1) ColumnarToRow : +- FileScan parquet default.t[i#8] Batched: true, DataFilters: [isnotnull(i#8)], Format: Parquet, Location: InMemoryFileIndex[file:/..., PartitionFilters: [], PushedFilters: [IsNotNull(i)], ReadSchema: struct<i:int>, SelectedBucketsCount: 8 out of 8 +- *(2) Sort [ii#10 ASC NULLS FIRST], false, 0 <==== UNNECESSARY +- *(2) Project [i#8 AS ii#10] +- *(2) Filter isnotnull(i#8) +- *(2) ColumnarToRow +- FileScan parquet default.t[i#8] Batched: true, DataFilters: [isnotnull(i#8)], Format: Parquet, Location: InMemoryFileIndex[file:/..., PartitionFilters: [], PushedFilters: [IsNotNull(i)], ReadSchema: struct<i:int>, SelectedBucketsCount: 8 out of 8 ``` Notice that `Sort [ii#10 ASC NULLS FIRST], false, 0` is introduced even though the underlying data is already sorted. This is because `outputOrdering` doesn't handle aliases correctly. This PR proposes to fix this issue. To better handle aliases in `outputOrdering`. Yes, now with the fix, the `explain` prints out the following: ``` == Physical Plan == *(3) SortMergeJoin [i#8], [ii#10], Inner :- *(1) Project [i#8] : +- *(1) Filter isnotnull(i#8) : +- *(1) ColumnarToRow : +- FileScan parquet default.t[i#8] Batched: true, DataFilters: [isnotnull(i#8)], Format: Parquet, Location: InMemoryFileIndex[file:/..., PartitionFilters: [], PushedFilters: [IsNotNull(i)], ReadSchema: struct<i:int>, SelectedBucketsCount: 8 out of 8 +- *(2) Project [i#8 AS ii#10] +- *(2) Filter isnotnull(i#8) +- *(2) ColumnarToRow +- FileScan parquet default.t[i#8] Batched: true, DataFilters: [isnotnull(i#8)], Format: Parquet, Location: InMemoryFileIndex[file:/..., PartitionFilters: [], PushedFilters: [IsNotNull(i)], ReadSchema: struct<i:int>, SelectedBucketsCount: 8 out of 8 ``` Tests added. Closes #27842 from imback82/alias_aware_sort_order. Authored-by: Terry Kim <yuminkim@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> * [SPARK-33399][SQL] Normalize output partitioning and sortorder with respect to aliases to avoid unneeded exchange/sort nodes This pull request tries to remove unneeded exchanges/sorts by normalizing the output partitioning and sortorder information correctly with respect to aliases. Example: consider this join of three tables: |SELECT t2id, t3.id as t3id |FROM ( | SELECT t1.id as t1id, t2.id as t2id | FROM t1, t2 | WHERE t1.id = t2.id |) t12, t3 |WHERE t1id = t3.id The plan for this looks like: *(9) Project [t2id#1034L, id#1004L AS t3id#1035L] +- *(9) SortMergeJoin [t1id#1033L], [id#1004L], Inner :- *(6) Sort [t1id#1033L ASC NULLS FIRST], false, 0 : +- Exchange hashpartitioning(t1id#1033L, 5), true, [id=#1343] <------------------------------ : +- *(5) Project [id#996L AS t1id#1033L, id#1000L AS t2id#1034L] : +- *(5) SortMergeJoin [id#996L], [id#1000L], Inner : :- *(2) Sort [id#996L ASC NULLS FIRST], false, 0 : : +- Exchange hashpartitioning(id#996L, 5), true, [id=#1329] : : +- *(1) Range (0, 10, step=1, splits=2) : +- *(4) Sort [id#1000L ASC NULLS FIRST], false, 0 : +- Exchange hashpartitioning(id#1000L, 5), true, [id=#1335] : +- *(3) Range (0, 20, step=1, splits=2) +- *(8) Sort [id#1004L ASC NULLS FIRST], false, 0 +- Exchange hashpartitioning(id#1004L, 5), true, [id=#1349] +- *(7) Range (0, 30, step=1, splits=2) In this plan, the marked exchange could have been avoided as the data is already partitioned on "t1.id". This happens because AliasAwareOutputPartitioning class handles aliases only related to HashPartitioning. This change normalizes all output partitioning based on aliasing happening in Project. To remove unneeded exchanges. No New UT added. On TPCDS 1000 scale, this change improves the performance of query 95 from 330 seconds to 170 seconds by removing the extra Exchange. Closes #30300 from prakharjain09/SPARK-33399-outputpartitioning. Authored-by: Prakhar Jain <prakharjain09@gmail.com> Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org> * [CARMEL-6306] Fix ut * [CARMEL-6306] Fix alias not compatible with ebay skew implementation Co-authored-by: Terry Kim <yuminkim@gmail.com> Co-authored-by: Prakhar Jain <prakharjain09@gmail.com>
…time (apache#1329) ### What changes were proposed in this pull request? Each node of Varka's vector IR now stores its structural hash, computed once when the node is built. Before this change a node's `hashCode` walked its whole subtree on every call, so planning a tree that shares a node between several parents took time in proportion to the number of paths through it, not the number of nodes. Every level that reads a shared operand twice or more doubles the paths. **The cost on master.** Three lowerings read their operand several times: a year-month interval's `abs` (three paths per level), an interval divided by a literal (seven: the quotient, the remainder under both arms of its rounding, and the sign test) and a `DOUBLE` `signum` (four). Nesting them makes planning exponential, and the planner pays it before the emitter's budget declines the shape: | expression, nested | depth | before | after | |---|---:|---:|---:| | year-month interval `abs(X)` | 16 | 25544.44 ms | 0.48 ms | | year-month interval `(X) / 3` | 8 | 10017.80 ms | 0.55 ms | | `signum(X)` over `DOUBLE` | 12 | 17585.49 ms | 0.84 ms | The table is from `sql/varka/plans/m8/results/VARKA-559-planning-cost.txt`, measured on the laptop. Every chain gets the same verdict at every depth before and after: fused, or the same decline reason. The pending decimal `coalesce` (apache#1324) shares its condition the same way; with this change, its depth-20 chain plans in 1.77 ms instead of 4576.85 ms. **The design.** Each of the 47 IR records with a child gets a last component, `int hash`, computed in the compact constructor from the other components. `hashCode` returns it. The value is exactly what the record's generated `hashCode` gives (`31 * h + hashCode(component)` from zero, in declaration order), so every hash set and map holds what it held before. A second constructor without `hash` keeps every call site unchanged, and the canonical one ignores the value it is given. The records stay records. Since `hash` is the last component, the generated `equals` compares it first, so two unequal nodes differ after one comparison. The only other code change is a trailing `_` in the 31 record patterns in the test-only reference evaluator. Two alternatives were set aside (plan section 3). Interning nodes at construction would add a second notion of node identity, which an earlier task (VARKA-222) judged too complex. A memo per walker can't replace the structural sets the budget walk and the kernel plan rely on, and would rebuild this cache in each of eleven walkers. **What is deliberately unchanged** (plan 2.3): `canonical()`, which renders the pinned shape keys and runs only on shapes the budget admits; the lane lifts, which rebuild a shared node once per path but only for predicates with conjuncts on two lanes; and `equals` between two equal copies that share no object. **This reopens VARKA-222**, closed on 10 October 2026 on the measurement that IR hashing is at most 5% of emission because the fused budget caps every output's subtree. That premise did not hold, because the hashing is paid before and inside the budget check. Its reopen trigger (3.1) is met; PLAN.md row 559 and a note in VARKA-222's 3.1 record it. ### Why are the changes needed? A query that nests one of these expressions a dozen levels deep spent seconds to tens of seconds in planning on the driver, and every further level multiplied that. It also blocked the decimal choices (apache#1324), whose nested `coalesce` met the same cost at about four seconds for 20 levels. ### Does this PR introduce _any_ user-facing change? Yes, for users who enable Varka: planning these nested expressions takes milliseconds instead of seconds. Answers, decline reasons and generated kernels are unchanged. ### How was this patch tested? - A new `VarkaVectorIRSharingSuite`: - a coalesce-shaped DAG 60 levels deep (2^60 paths) on the long, int and short lanes goes through every planning step that hashes nodes, within 20 s; - nested `signum`, interval `abs` and interval division explain at depth 20 and are not fused; - structurally equal nodes still collapse in a set; - one node of every record type with a child, built by reflection, caches the hash the record formula gives; - the canonical constructor recomputes the hash it is passed. Two known limits of the reflective check, each failing loudly rather than passing silently: it tries at most six constants per enum, the IR's largest enum today, and it builds nodes with equal values in components of one type, so it would not notice two same-type components swapped in a hash (which would still agree with `equals`). - `dev/varka_regen_generated.sh --all` changed no file: no emitted byte and no coverage row moves. - The catalyst Varka suites that build or walk the IR (410 tests, including the emitter, shape-cache, fuzz, coverage and emitted-bytes suites) and the sql coverage-differential and filter suites pass. - An independent high review found no correctness defect: the cached hash agrees with `equals` for every record (no array, mutable, float or double component; the one list is copied), and nothing persisted or pinned changes. Its findings on test robustness and plan text were fixed and had a medium review. - Error Prone, scalastyle, lint-java and the plan, quote and pre-commit checks pass. The change counts 999 hand-written lines. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
…#1324) ### What changes were proposed in this pull request? Varka now fuses the choices and the null tests over `DECIMAL` values of precision 18 or less: `IF`, `CASE WHEN` with an `ELSE`, `coalesce`, `greatest` and `least`, and `IS NULL` / `IS NOT NULL` over any decimal value, not only over a column. Before this change each of them sent its filter or projection to Spark's row path. **The choices.** - **`IF` and `CASE WHEN ... ELSE`** fold to the long lane's `IfElse`, with each condition lifted to the long lane. A choice whose branches have different scales is compared at the common type, each branch rescaled up as the comparisons already are. - **`coalesce`** folds to `IfElse(valid(head), head, rest)`. - **`greatest` and `least`** are the existing null-skipping picks. - Each of them runs under the family switch that already claims its int form, so turning a family off turns off its decimal form too. **The null tests.** An IR null test reads only a column's validity word, so a null test over any other decimal value derives its validity from the leaves (`VarkaDecimalCompiler.valid`): a negation or `abs` is null where its operand is, a `coalesce` where every operand is, a pick where every operand is, a choice where the chosen branch is. The value is first compiled as a probe so it declines with the same reasons as when it is read. A null test also reads through a cast that keeps the scale and only widens the precision, such as `CAST(d18 AS DECIMAL(20, 0)) IS NULL`, since that cast can never null or fail. **What still declines, by name.** A null decimal literal in a branch names row 333, whose typed null value it needs. A wide choice or pick whose branch is rescaled up names row 360 beside 359, on either side of a comparison. A cast that lowers the scale or the integral digits over a wide rescale names row 350 beside them. **Proofs.** `refinement.smt2` gains three sections for the choices and the null tests, 276 checks in all, which hold under Z3 and cvc5 (`dev/varka_prove.sh`). The `coalesce` and `CASE` rows raise on every column's slot, as Spark's generated filter reads every column a predicate references. **Tests.** - **`VarkaDecimalValueSuite`** compiles each choice and null-test form, checks the decline reasons in either operand order, and checks the null test's answers against Spark's on nulls and at the bounds. - **Coverage rows**, checked against Spark by the differential suites: `greatest(d9, d9s4) > d9b`, `coalesce(d9, d9b) IS NULL`, `(-d18) IS NOT NULL`, and `CASE WHEN d9 < d9b THEN d9 ELSE d9s4 END > 0.0`. - **The decimal leaf's slot table** covers the bare leaf's null test. **This is the last of three parts.** Row 348, the 64-bit decimal conditions, lands in three pull requests under the 1000-line cap, cut from the draft apache#1304: comparisons at different scales (apache#1321), negation and `abs` (apache#1323), and this one. The parts table is in `sql/varka/plans/m8/VARKA-348.md` section 5, and its outcome in section 10. **Generated files**, regenerated with `dev/varka_regen_generated.sh --all`: - `coverage.json`, `width_audit.json` and `docs/sql-varka.md` gain the four rows. - `emitted_bytes.json` gains the new shapes; no existing row's hash moves, and only the option-arm digests, which hash every shape, change. - The census (`census.tsv`) records the choices and null tests over decimals. - The rendered proof files are as above. ### Why are the changes needed? Choices and null tests over decimal values are common in real queries: a `CASE` that picks a price by a condition, a `coalesce` of two amounts, a `greatest` of two rates, or a null check on an adjusted value. Each one sent its whole filter back to Spark's row path, even when every other part of it fused. ### Does this PR introduce _any_ user-facing change? Yes, for users who enable Varka: these choices and null tests over decimals of precision 18 or less now run in Varka's kernels, with the same answers. ### How was this patch tested? - The tests above, plus `VarkaDecimalLoadSuite`, `VarkaFamilySwitchSuite`, `VarkaProofFilesSuite`, `VarkaEmittedBytesSuite`, `VarkaCoverageSuite` and `VarkaCoverageDifferentialSuite`. `dev/varka_prove.sh --solver both` holds. - An independent high review found no wrong answers. Its findings are fixed: - a null decimal literal and a wide branch rescaled up declined without naming the rows that build them; - the null test's probe and its family notes, which the family switch suite requires; - a refinement departure that was no longer needed, since Spark's filter reads every referenced column. - A medium review of those fixes found three more, fixed with a test each: a null test through a widening cast declined, the rescale test did not look through a negation or `abs`, and a lowering cast over a wide rescale did not name row 350. - **A planning cost found on the way, and fixed separately.** The first matrix run timed out a test that nests a `coalesce` 20 deep. Profiling showed that Varka's compile is linear, but planning a nested `coalesce` took 2^depth time: its IR shares one condition between a value and its validity, and the IR records' `hashCode` walked the shared node once per path (4.6 s at depth 20). The fix, a hash cached in each IR node, landed first as apache#1329, and this branch merges it. The test now counts condition compiles instead of timing them, and its three chains nest 20 deep in well under a second. - Error Prone, scalastyle, lint-java and the census, generated-file, plan, quote and pre-commit checks pass. The change counts 992 hand-written lines. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
…pache#1366) ### What changes were proposed in this pull request? Brings ten rows of milestone 8's plan up to date with the pull requests that merged their work. Row 572 asked for it, and this is its first part. - **Rows 560, 562 and 568 are `Done`.** 560 and 562 said "done when it merges", and apache#1326 and apache#1335 merged. Row 568's three done-when clauses hold on master since apache#1363: `nanByNess` is gone, the lint rule flags each shape in its self-test and finds no expression in the tree, and the opt-in sweeps passed 46 of 46. - **Rows 554, 555, 557, 558, 559, 563 and 546 stay `Started`,** each now naming the pull request that merged it (apache#1312, apache#1313, apache#1332, apache#1320, apache#1329, apache#1340 with apache#1344, and apache#1293) and its date. I did not mark them `Done`: their done-when clauses name checks, such as a Build failing a change over the cap or a matrix no longer failing a test, that I have not confirmed from a run. Row 563's text no longer lists its pull request as left. - **Row 572 is `Started`** and lists what is left: rows 497, 365 and 503, and the rows the triage named whose text is behind merged work (157, 348, 349, 538, 332, 333, 343, 341, 331, 340, 342, 344, 377 and 330). The PR numbers and merge dates were read from the pull requests. ### Why are the changes needed? A row is the only record of why a change exists. A row that still says "Started" or "left: the pull request" after the pull request merged misleads a reader and any count of the milestone's finished rows. ### Does this PR introduce _any_ user-facing change? No. It changes the plan only. ### How was this patch tested? - `dev/varka_plan_lint.py --check --offline`: 0 findings. - `dev/varka_quote_check.py`: 0 orphans. - The pre-commit rules pass. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Sonnet 5.5)
…e#1509) ### What changes were proposed in this pull request? This is a plan-only change to milestone 8's task table (`sql/varka/plans/m8/PLAN.md` section 3). I read every row whose state is not `Done` against the pull requests merged under its id and against its done-when. Eleven rows are closed, one is marked done in part, and two rows that lag merged work have their state text corrected. Only the state clause of each row changes. Merge dates are in CET. | row | old state -> new state | evidence | | ---: | :--- | :--- | | 554 | Started -> Done | apache#1312 merged 3 November. Its own Build was cancelled. The size step later failed the lint job of apache#1427's Build (run 42606922446) with "1357 counted lines ... at or over the cap of 1000" and the largest files. Passing changes print their count. That 1357 is the over-count row 588 later fixed, but it still shows the failure path. | | 558 | Started -> Done | apache#1320 merged 3 November. `varka_lint.py --selftest` passes in the Varka docs checks job, `ci-gates` included. The Build of the plan-only apache#1506 (run 43087405861) skipped both the protobuf job and the UI job. | | 559 | Started -> Done | apache#1329 merged 4 November. Every chain explains in under 2 ms at depth 20, with verdicts and bytes unchanged (`VARKA-559.md` 6, `results/VARKA-559-planning-cost.txt`). | | 569 | Started -> Done | apache#1367 merged 5 November. The hook refuses the wrong checkout and names the fix. `dev/varka_prepush.sh --selftest` is in the lint job and passes. | | 580 | Started -> Done | apache#1426 merged 9 November. The row was done when it merged. The grammar draws a narrow `BitCount` again (`VarkaIrGrammar` case 10). | | 581 | Started -> Done | apache#1416 merged 9 November. The first three Builds whose heads hold it passed catalyst shard 1 of 3: runs 42589018437, 42602246363 and 42602326887. No later run of that job failed through 03:00 UTC on 10 November. In their JUnit reports `VarkaWidthAuditSuite` spends 538 to 1099 s in `beforeAll`, and its longest test takes 1.0 s. | | 582 | Started -> Done | apache#1429 merged 9 November. The row's only open item was review and merge. `VarkaChildProcess` and `VarkaChildProcessSuite` are on master. | | 585 | Started -> Done | apache#1441 merged 10 November. The Build of its head `f017ecac0e8` (run 42699618930) passed all seven suites, according to its JUnit reports. The census suite's one skipped test is the host-census file check, not a child-JVM test. | | 588 | Started -> Done | apache#1471 merged 11 November. The lint job's other steps continue on error. apache#1427's merge commit is in master's history, so the self-test's pinned case counts 52 lines both in the docs-checks job's full clone and on the laptop. | | 589 | Started -> Done | apache#1465 merged 11 November. `notify_test_workflow.yml` is gone, and no `pull_request_target` sync has run since. apache#1506's `Build` check (check run 130755752876) was created while fork run 43087405861 was still running, and it completed with that run's success. | | 595 | Started -> Done | apache#1481 merged 11 November. `dev/varka_precommit.sh --selftest` passes. | | 594 | Started -> Done in part | apache#1463 merged 10 November. Its dry-run table passes every baseline but one at both widths, on AVX-512 and under `-XX:UseAVX=2` on the same laptop. Left: `VarkaBooleanOutputBenchmark`, which stops by design until row 27's step 6, and a dry run on a real AVX2 host. | | 340 | Started (text) | "built on branch" now reads "merged as apache#1397" for steps 2 to 4 and "merged as apache#1434" for step 5. The runner measurement is still owed. | | 414 | Started (text) | "built" now reads "built and merged as apache#1454". The fuse after the SPARK-61352 sync is still owed. | Rows left as they are: - 591: apache#1464 merged, and retry runs exist on vecbricks/varka, for example 43039739304. The post-merge check of `VARKA-591.md` 3 is not recorded on master, so this is unverified. - 572: this change does the reading that row 572 leaves open. The row can close once this change merges. - 414: its done-when is met by its "stays declined with the reason recorded" branch. The row still names the post-sync fuse as owed, so I left the state to the owner. - 27, 157, 332, 341 to 344, 347 to 349, 352, 359, 361, 363, 506 and 577: the type rows. Each one names steps or runner measurements that are still left, and merged work does not finish them. - 483, 490, 491, 493, 507, 508, 510, 512 to 517, 519 to 521, 523 to 530, 532, 533, 536, 538, 546, 555, 557, 563, 565 and 573: the harness rows. Each one's open item is a CI measurement, a matrix run or an owner decision, and master records none of them. For 565, the EPYC regeneration is still owed. For 573, a scheduled run (42355859989) is cited in row 330, but the row's own list of open items is longer. - Planned rows with only plan PRs merged, and every row with an open PR today (103, 104, 339, 342, 345, 360, 541, 578, 584, 592, 593, 596 to 598, 603, 606), were not changed. ### Why are the changes needed? The owner asked on 11 November 2026 for the rows whose work had finished to stop reading as Started. A count of the milestone reads these states. ### Does this PR introduce _any_ user-facing change? No. Only the plan changes. ### How was this patch tested? - `python3 dev/varka_plan_lint.py --check`, online so that the run-head pairing of row 585 is checked: 0 findings. - `python3 dev/varka_push_check.py`: passed (28 counted lines). - `varka_msg_check.py`, `varka_precommit.sh`, `varka_prepush.sh` and `varka_lint.py` self-tests: ok. - One `/code-review high` pass: found 10 / fixed 5 / left 5. Fixed: - row 588 wrongly said CI runs the apache#1427 case vacuously; - rows 558, 569 and 588 named the lint job for self-tests that run in the Varka docs checks job; - row 594 contradicted itself and did not say its AVX2 columns are emulated; - row 554 claimed "every Build since" without a source; - row 589 still named its branch. Left: - `VARKA-559.md` 9 still says "not opened". This change rewrites only the plan's state clauses. - Row 414 meets its done-when through the "stays declined" branch, but the row keeps the post-sync fuse as owed. That is the owner's call. - `varka_plan_lint.py` reads run heads from vecbricks/varka, so a fork Build citation such as row 585's can never be checked. That is a tool change, not a row change. - Row 585's skipped census test is the host-file check (see the table). - Row 595's "differs from both parents" rule is the reading of "what it adds over its first parent" that leaves out what master brings, which is the row's intent. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
### What changes were proposed in this pull request? Plan documents only: six compiler improvements, accepted by the owner on 11 November 2026, are added to the milestone 9 scope catalogue (`sql/varka/plans/m9/SCOPE.md`). Each is a proposal to be measured, not a committed design. Three of them were already partly in the catalogue, so they extend an existing item with a dated paragraph rather than adding a duplicate. The other three are new items 134 to 136. 1. **Check the host's capabilities when emitting, not only when benchmarking: new item 134.** `operator_census.json` records, per host and vector width, whether C2 vectorizes each operator, allocates, or falls back to the Vector API's Java code. No main source reads it. Row 597's decimal readers fuse at 128 bits on x86, where the EPYC 7763's census cells put their slot load in the fallback, and a benchmark found the loss. The item makes each lowering name the census cells it depends on. Planning then treats a fallback cell on the target host as a predicted cost, which item 131's admission step weighs. It is not a refusal by itself, because apache#1262 kept two-lane projections that win although their compare cell reads fallback. It is new rather than part of row 551 or items 127 and 131, because those read HotSpot's feature list or decide *where* a choice is made. None of them use the measured census as the source, and the item sets out how it relates to each. 2. **Compute node properties instead of keeping hand-written lists: extends item 47.** Item 47, "One place per node", was deferred until a second concrete case arrived. The new paragraph records that case. Facts that consumers need sit in `instanceof` lists that miss nodes: the apache#1462 review found `mayHoldOtherNaN` skipping its blend without checking the rounding mode, and row 597 records that apache#1478's `readsDecimal` misses `bigintPair`. The paragraph proposes finishing row 489's descriptor, so the analysis derives these facts bottom-up. The descriptor has to be rebuilt over master, because its branch predates apache#1329. Item 51's mapping type is noted as one more field of the same record. 3. **One admission decision instead of a decline rule per row: extends item 131.** Item 131 already proposes letting the cost model make the two-lane decline. The extension widens it to rows 503, 596, 597 and 603 as one admission step per shape, host and width. That step reads measured costs and item 134's table and refuses with a named reason. It also records that `VarkaEmitCost.kindOf` counts `rint` with and without apache#1462's blend as one feature, which a refit would average. 4. **A hash-consed IR: new item 135.** No item proposes interning. Item 11 has only a one-line design note, and item 85 is about jegg and storage layout. The item starts from row 559 (apache#1329), which cached node hashes and chose that over interning, and lists the walks that still run once per path: the lane lifts, and `equals` over disjoint copies. 5. **Tests that prove they reach the code they claim to test: new item 136.** No item covers this. Two cases from the 11 November reviews show the problem: a test on apache#1436 that passes on an earlier output-type decline, and apache#1425's body claiming checked answers for a test that only asserts no fusion. The item proposes two fixes. Each decline carries the name of the rule that produced it, as `VarkaKernelPlan.Refusal` already carries a kind. The harness records which nodes and lowerings a test reached. `VarkaCompileObserver` is the starting point, but it needs a second listener slot and a lowering report. Item 82's mutation runs are cited as the related check. 6. **Generated files that stop conflicting on every merge: extends item 121.** Item 121 was moved to milestone 8 as row 546, whose merge driver (apache#1293) merged. The new paragraph records what is still left. Every merge still regenerates `option_arms` and the docs blocks and needs another Build, and apache#1448 found four option-arm digests stale on master with no text conflict. The paragraph proposes splitting the files and digests per shape or family, or committing an input digest that CI checks. It notes that row 546 had ruled out CI committing files, because the fork has no token for it. A note further out, folded into **item 1** (decimal lanes) as the owner asked: a general multi-word integer lane for decimals above 18 digits, instead of the per-operation work of rows 359 to 364. Corrections to the evidence as first stated, made after checking it against the tree: - Item 135 does not claim the coverage harness's 45% planning share. `m8/results/VARKA-510-planning-local.txt` puts 45.1% in Spark's analyzer and optimizer, and only 11.7% in Varka's compile and emit, which is the share an interned IR can cut. - The "planning doubles per level" cost of row 561 was fixed for hashing by row 559 (apache#1329), so item 135 cites only the walks that remain. - Row 541's CSE mismatch is between two of Spark's own code generators on the fallback path, so the item says it is outside the IR. - The "60 to 75 minute regeneration" is left out. No committed file records it, and the laptop's regeneration logs of 10 and 11 November show 1 to 23 minutes of sbt time. - The note's rows are 359 to 364, which is the lane-pair range in the milestone 8 header. Row 365 is a read-path fix and row 366 a cast to floating point. One `/code-review high` pass: found 10 / fixed 9 / left 1 (the title says "compiler items" though item 121 is harness work, kept because the owner's brief names the six that way). Fixed: item 134 now treats a census cell that reads F as a predicted cost for item 131's admission step to weigh, not as a refusal on its own, because apache#1262 kept the two-lane projections whose cells read F; items 131 and 134 are one piece of work, with the table built first; item 135 says interning still needs one shared identity memo for the walks; item 47 limits "may raise" to fused subtrees, notes that the 489 branch predates apache#1329, and points its done-when at what apache#1462 and apache#1478 bring to master; item 121's note marks that it stays in milestone 9 and depends on item 129's merge-result build for the stale-digest case; item 136 states `VarkaCompileObserver`'s single listener and that it reports no lowerings; item 131 takes a node's key from row 489's cost kind, and keeps a test for a second lowering of an existing node. A follow-up self-check also tightened four citations: the census's `long.LT` cell, row 559's "every node with a child", row 541's two gates, and the regeneration command's name. ### Why are the changes needed? Several recent problems follow the same patterns. A form known to fall back on a host was still emitted, and only a later EPYC run found it. A hand-written list missed a node or a mode. A decline rule was added for one row at a time. A test passed for a reason other than the one it names. Generated files cost every merge a regeneration and a Build. Recording these as scope items, with their evidence, keeps the fixes general instead of patched one row at a time. Extending the existing items, rather than adding near-duplicates, keeps the catalogue with one entry per idea. ### Does this PR introduce _any_ user-facing change? No. Plan documents only. ### How was this patch tested? `python3 dev/varka_plan_lint.py --check --offline` reports 0 findings. `python3 dev/varka_push_check.py` passes: pre-commit, plan lint, quote check, census check, and 138 counted lines against the cap of 1000. Every row, pull request, file and identifier cited in the new text was checked against `sql/varka/plans/m8/PLAN.md`, the tree at `origin/master`, or the open branches it names. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
https://issues.apache.org/jira/browse/SPARK-2403
Spark hangs for us whenever we forget to register a class with Kryo. This should be a simple fix for that. But let me know if you have a better suggestion.
I did not write a new test for this. It would be pretty complicated and I'm not sure it's worthwhile for such a simple change. Let me know if you disagree.