Skip to content

HOTFIX: bug caused by #941 - #1108

Closed
pwendell wants to merge 1 commit into
apache:masterfrom
pwendell:hotfix
Closed

pwendell wants to merge 1 commit into
apache:masterfrom
pwendell:hotfix

Conversation

@pwendell

Copy link
Copy Markdown
Contributor

This patch should have qualified the use of PIPE. This needs to be back ported into 0.9 and 1.0.

@pwendell

Copy link
Copy Markdown
Contributor Author

I need to test this more so please don't merge yet.

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. All automated tests passed.

@AmplabJenkins

Copy link
Copy Markdown

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15854/

@pwendell

Copy link
Copy Markdown
Contributor Author

@mengxr Mind merging this? If you have tested it, I think it's okay to merge. It should be back ported into 1.0 and 0.9 as well.

@mengxr

mengxr commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

Verified that it is working now. I'm going to merge this.

@asfgit asfgit closed this in b2ebf42 Jun 17, 2014
asfgit pushed a commit that referenced this pull request Jun 17, 2014
This patch should have qualified the use of PIPE. This needs to be back ported into 0.9 and 1.0.

Author: Patrick Wendell <pwendell@gmail.com>

Closes #1108 from pwendell/hotfix and squashes the following commits:

711c58d [Patrick Wendell] HOTFIX: bug caused by #941

(cherry picked from commit b2ebf42)
Signed-off-by: Xiangrui Meng <meng@databricks.com>
asfgit pushed a commit that referenced this pull request Jun 17, 2014
This patch should have qualified the use of PIPE. This needs to be back ported into 0.9 and 1.0.

Author: Patrick Wendell <pwendell@gmail.com>

Closes #1108 from pwendell/hotfix and squashes the following commits:

711c58d [Patrick Wendell] HOTFIX: bug caused by #941

(cherry picked from commit b2ebf42)
Signed-off-by: Xiangrui Meng <meng@databricks.com>
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
This patch should have qualified the use of PIPE. This needs to be back ported into 0.9 and 1.0.

Author: Patrick Wendell <pwendell@gmail.com>

Closes apache#1108 from pwendell/hotfix and squashes the following commits:

711c58d [Patrick Wendell] HOTFIX: bug caused by apache#941
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
This patch should have qualified the use of PIPE. This needs to be back ported into 0.9 and 1.0.

Author: Patrick Wendell <pwendell@gmail.com>

Closes apache#1108 from pwendell/hotfix and squashes the following commits:

711c58d [Patrick Wendell] HOTFIX: bug caused by apache#941
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Oct 29, 2026
…r apps (apache#1108)

### What changes were proposed in this pull request?

Two new rows in the milestone 8 plan, and the measurements the first one rests on.

- **Row 510.** Once the answer checks run below the Spark session, the coverage harness still spends 45.1% of its profile samples in Spark's analyzer and optimizer. The cause is how many plans it makes, not repeats: it plans about eleven tiny queries per test (11,601 for 1,067 tests), and a cache of identical plans found only 1,192 repeats. The row plans a coverage row's forms together, in as few optimizer runs as keep each output identical to what a session gives it alone, and builds each fixture's Arrow batches once.
- **Row 511.** A blog post for developers of Spark applications on speeding up their own tests below the session. It uses a small application-style suite measured three ways, with Varka's suites as the real-world case.
- `sql/varka/plans/m8/results/VARKA-510-planning-local.txt`: the JFR profile of the harness suites after the move, and the repeat count.

### Why are the changes needed?

The first profile after the move shows that query planning is the harness's largest cost. A first experiment ruled out the obvious fix, caching repeated plans: it saved about 1 s of 39. The post is split out because the first draft read as a post about Varka, while its lesson applies to any Spark test suite.

### Does this PR introduce _any_ user-facing change?

No. This changes plan documents only.

### How was this patch tested?

`dev/varka_plan_lint.py --check` and `dev/varka_quote_check.py` are clean. The profile was taken with JFR on the laptop, and the repeat count with a temporary cache that was not kept.

### 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
…aved (apache#1111)

### What changes were proposed in this pull request?

This measures what the previous pull requests saved by checking Varka's answers in a harness without a Spark session instead of through one. The coverage, differential and time-arithmetic suites are measured on the laptop, in the pull request's Build and in the option matrix. The PR also adds the script that reads the CI numbers.

- `sql/varka/plans/m8/results/VARKA-509-step4.txt`:
  - **Laptop, at the defaults:** the suites take 135.8 s where they took 472.2, with 1,211 tests against 1,172.
  - **Pull request's Build:** the Varka jobs spend 399.3 s on them against 1,064.1. The longest sql job takes 24 minutes against 33.
  - **Option matrix:** their configuration-hours fall from 11.96 to 1.61, and the run's suite-hours from 35.30 to 22.61.
  - **Matrix wall time:** it went from 58 minutes to 45, set by the run's longest bin rather than by its total work.
- `dev/varka_matrix_run.py`: one run's cost, from the Actions API and the artifacts the run uploads.
  - For an option-matrix run: its wall time, bins, JVM time, and each suite's hours under the configurations.
  - For a Build: its sql and catalyst test jobs' minutes, and each named suite's seconds, from either the full module jobs or the Varka-scoped jobs.
- The plan marks the task done. The profile after the move, in `VARKA-510-planning-local.txt` (merged with apache#1108), shows where the time goes now.

### Why are the changes needed?

The move had to be measured against the cost it set out to cut, and the measurement found two costs that affect the next steps:
- **The reach recording.** The Build records which configurations change what each test compiles, so the matrix can skip unchanged tests. That recording doubles a harness suite's time in the Build: 45 s plain against 92 s recording for the three harness suites on the laptop. We keep it, because it lets the matrix skip what a configuration doesn't change.
- **Query planning.** With the session gone, the harness's largest cost is Spark's analyzer and optimizer, planning one tiny query at a time.

The two "before" Builds were checked for comparability. The first Build of step 1 predates the reach recording, the three-job split and the sort-page fix, so it isn't used. The before is step 1's last Build, which has all three, like the after.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

- `dev/varka_matrix_run.py --self-test`; ruff check and ruff format.
- `dev/varka_plan_lint.py --check` and `dev/varka_quote_check.py` are clean.
- The Java and Scala linters don't apply: this changes no Java or Scala.
- **No option matrix is dispatched.** This PR changes no code the matrix runs, and apache#1107's matrix (run 40855387471) passed on the same tree of code.

This PR is stacked on apache#1107. Until apache#1107 merges, its diff also shows apache#1107's files.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants