Repository navigation
Minor fix - #1105
Closed
WangTaoTheTonic wants to merge 1 commit into
Closed
Minor fix#1105WangTaoTheTonic wants to merge 1 commit into
WangTaoTheTonic wants to merge 1 commit into
Conversation
|
Can one of the admins verify this patch? |
Contributor
There was a problem hiding this comment.
can you put the space before ( instead of after? Thanks!
Contributor
Author
|
Updated. |
Contributor
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
Contributor
|
Thanks, merged into master. |
pdeyhim
pushed a commit
to pdeyhim/spark-1
that referenced
this pull request
Jun 25, 2014
The value "env" is never used in SparkContext.scala. Add detailed comment for method setDelaySeconds in MetadataCleaner.scala instead of the unsure one. Author: WangTao <barneystinson@aliyun.com> Closes apache#1105 from WangTaoTheTonic/master and squashes the following commits: 688358e [WangTao] Minor fix
xiliu82
pushed a commit
to xiliu82/spark
that referenced
this pull request
Sep 4, 2014
The value "env" is never used in SparkContext.scala. Add detailed comment for method setDelaySeconds in MetadataCleaner.scala instead of the unsure one. Author: WangTao <barneystinson@aliyun.com> Closes apache#1105 from WangTaoTheTonic/master and squashes the following commits: 688358e [WangTao] Minor fix
MaxGekk
added a commit
to MaxGekk/spark
that referenced
this pull request
Oct 29, 2026
…sion (apache#1105) ### What changes were proposed in this pull request? Each error condition a coverage row raises now runs through a Spark session once, compared against what Spark itself raises. This also completes the record of where every old coverage test's check now lives. **This PR sits on apache#1104, which sits on apache#1103, apache#1102 and apache#1101.** Its own commit is the last one. - **`VarkaAnsiForm.RAISES`** lists each error condition the coverage rows raise on the extremes fixture under ANSI mode, with the first row that raises it. There are five: | Condition | Row | |---|---| | `ARITHMETIC_OVERFLOW` | `add_months(d, i)` | | `BINARY_ARITHMETIC_OVERFLOW` | `y1 + y2` | | `CAST_OVERFLOW` | `d + CAST(i AS INTERVAL DAY)` | | `DATETIME_FIELD_OUT_OF_BOUNDS.WITHOUT_SUGGESTION` | `make_date(2021, i, 1)` | | `INTERVAL_ARITHMETIC_OVERFLOW.WITH_SUGGESTION` | `ym - ymm` | A harness test holds the list to the table both ways. A condition the rows raise but the list doesn't name fails. So does an entry whose row no longer raises it. - **`VarkaCoverageDifferentialSuite`** runs one test per entry through both sessions: - the plan must hold a Varka node, so the row engine alone can't pass it; - the error must be Spark's: the condition, SQLSTATE, parameters, message and exception class. These five tests are in Scala. The error comparison they need (`VarkaMaybeThrows`) and the session plumbing (`VarkaSharedSessions`) are both Scala. - **The partition test** now also checks that excluding the partition rewrites actually takes effect: under that setting, `WHERE NOT (p)` must reach Varka as the `Not` it was written as. Before, a rule left on by mistake would have let the oracle check the very rewrite it means to bypass. - **The results file** maps all 1,066 tests the coverage suite had before this work to the tests that now hold their checks. It also names, for each path the end-to-end layer keeps, the session test that holds it. | Path | Test | |---|---| | Each consumer over a sample | the 27 sample rows | | The rule fusing and declining | the sample rows' fused-plan check; `VarkaEndToEndSuite` | | A SQL configuration reaching the emitter | `VarkaFamilySwitchQuerySuite`; `VarkaProjectExecSuite` | | The fallback's accounting | `VarkaFallbackReasonSuite`; `VarkaProjectExecSuite` | | An ANSI error as the user sees it | the five new tests | The design's section 3 now says the layer is these session suites, not one new suite. - **A count correction:** the step 2a results file said 165 predicate rows. The table has 164. ### Why are the changes needed? With the coverage checks moved below the session, no test ran a real row of each error condition through a session. The two ANSI tests left there plant faults in the comparison itself. On the laptop, the harness suite runs 1,067 tests in 30 s and the session suite 35 tests. Results are in `sql/varka/plans/m8/results/VARKA-509-step2e-local.txt`. ### Does this PR introduce _any_ user-facing change? No. Tests only. ### How was this patch tested? - Both suites pass at the defaults. - I ran two configurations locally; the CI matrix covers the rest: - `checkIntOverflow=false`: 40 tests cancel as listed. That is the earlier 38 plus two new skip lines: `y1 + y2` and `ym - ymm` wrap under that configuration by its design. - `validityByWidth=false`: 31 tests cancel, unchanged. - The linters pass. ### 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 29, 2026
…ssion (apache#1107) ### What changes were proposed in this pull request? The date, interval and integer kernels' answer checks now run without a Spark session, through the expression harness that the coverage and TIME suites already use. `VarkaDifferentialSuite` keeps the 27 tests that need a session. **This PR sits on apache#1106, which sits on apache#1105.** Its own commits are the last two. - **`VarkaDifferentialHarnessSuite`** holds 68 of the old suite's 94 tests, under their old names, over the same tables. The tables are now SQL `VALUES` with the old nullability: where the old table declared a column nullable that holds no null, an all-null row goes into the `VALUES` and is filtered out again. Without it, Spark would read the column as non-nullable, and the optimizer would rewrite some queries; `coalesce(d, d2)`, for example, would become `d`. - **`VarkaHarnessCases`** now lets one test run its queries in parts, each with its own table, ANSI mode and emit options, as the old tests set them between queries. Each query states what the old test asserted of the plan and the node's metrics: | Expectation | Old assertion | |---|---| | something fused, and a kernel answered a batch | `checkDifferential(..., expectFused = true)` | | something fused | `assertFused` alone | | fused whole and served every batch | `numFallbackBatchesDeclined === 0` beside a kernel run | | fused whole, and a kernel declined a batch with its own status | `numFallbackBatchesDeclined > 0` | | nothing fused | `expectFused = false` | Where the old test read verbose `EXPLAIN`, the harness checks the same lines from `VarkaFusionReport`: `"far: residual (day range ["`, `"kernel 2 of 2"` and the others. - **Two changes to how the harness runs a query:** - *Filters:* the filter evaluator is handed only the conjuncts the compiler fuses. That is what `VarkaColumnarRule` hands the Varka node, leaving the rest to a row filter above it. The evaluator compiles only a condition that fuses whole, so without this a filter with one residual conjunct fell back on every batch. - *The row consumer:* it now compares only the outputs `projectFused` returns. Projections with residual or forwarded entries therefore run through the row node's path too. - **`VarkaDifferentialSuite`** keeps what needs a session: - the plan around the Varka nodes: a narrowing projection absorbed, a residual conjunct's row filter and the order Spark evaluates conjuncts in, a projection stacked on a filter's compacted batch, the common-expression hoist; - the fallback hooks and the metrics they move; - AQE, aggregation, the cache's batches, tasks sharing a kernel class, a non-Arrow source, the SQL UI's residual count, Metaspace; - the `guardDayProducers=false` test, which asserts only the metric, never the wrong values that configuration produces; the harness compares every answer; - the `ILLEGAL_DAY_OF_WEEK` error a user sees. No coverage row raises that condition, so no other session test shows it. - **`VarkaSharedSessions`** drops the seven fixtures no suite reads any more. - **`VarkaHarnessParitySuite`** plans every hand-written query of both harness suites in a session, under its part's ANSI mode, and requires each expression to equal the harness's. - **`skips.tsv`:** - 11 lines follow their tests to the new suite. - The `arrowBatchSize=1` line for "null-as-false, and the boundary selectivities" is removed. Its reason was the in-memory scan's statistics pruning one-row batches, and the harness has no scan, so the test now passes there. - **Docs:** `ADDING_AN_EXPRESSION.md` and `docs/sql-varka.md` now point to the harness suite. ### Why are the changes needed? The suite spent its time on session work. It ran each query through two sessions, sorted the results, and ran the query a second time for the warm cache. It took 66 s at the defaults on the laptop, and 3.66 h of the option matrix's run 40658422887. The checks need only the expressions and the batches. | Configuration | Before (old suite) | After (harness suite + session suite) | |---|---|---| | defaults | 66 s | 4.1 s + 36.7 s | | `arrowBatchSize=1` | 70 s | 4.6 s + 36.4 s | Results, with each of the 94 old tests mapped to where its check now lives: `sql/varka/plans/m8/results/VARKA-509-step3b-local.txt`. ### Does this PR introduce _any_ user-facing change? No. Tests only. ### How was this patch tested? - All 1,211 tests of the harness and session suites this work touches pass at the defaults, in one JVM. That includes the coverage suites and the 68 new tests. - I ran the six configurations that have skip lines for these tests locally: `checkIntOverflow=false`, `guardDayProducers=false`, `guardUnderArm=false`, `severalKernels=false`, `arrowBatchSize=1` and `validityByWidth=false`. Each test cancels where its line says, and nothing else fails. The CI matrix covers the other configurations. - `build/sbt 'sql/testOnly *VarkaDifferentialHarnessSuite'` runs the 68 tests, as `ADDING_AN_EXPRESSION.md` now says. - The linters pass. ### 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.
The value "env" is never used in SparkContext.scala.
Add detailed comment for method setDelaySeconds in MetadataCleaner.scala instead of the unsure one.