Skip to content

Backport #113289 to 26.6: Fix quadratic JSON subcolumn skip-index matching over a large dotted constant - #114476

Merged
clickhouse-gh[bot] merged 8 commits into
26.6from
backport/26.6/113289
Aug 18, 2026
Merged

clickhouse-gh[bot] merged 8 commits into
26.6from
backport/26.6/113289

Conversation

@robot-ch-test-poll3

@robot-ch-test-poll3 robot-ch-test-poll3 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #113289

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.6.3.61

@robot-ch-test-poll3 robot-ch-test-poll3 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Aug 12, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [5d95247]

Summary: ✅

On 26.6, `EXPLAIN indexes = 1` does not print the combined
`Parts: 0 | Granules: 0` summary line that master's pretty plan
formatting emits, so the backported reference had one extra line.
The meaningful assertion — the JSON subcolumn index still prunes,
`Granules: 0/1000` — is unchanged.

CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114476&sha=9a63cb20d13792992441770495ca5610ca25ca62&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%2C%202%2F2%29
PR: #114476

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Aug 13, 2026
`EXPLAIN indexes = 1` on 26.5 does not print the combined `Parts: 0 | Granules: 0`
pretty-plan summary line that master prints, so the backported test failed with
"result differs with reference". Remove that line from the reference, same as the
26.6 backport #114476 (commit 684cae3).

CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114475&sha=9568481a71e534e76cb6efef89bb9f5c825156ac&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%2C%202%2F2%29
PR: #114475

Co-Authored-By: Claude Fable 5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the failure: https://github.com/ClickHouse/ClickHouse/actions/runs/31792735192/job/94929983011 and provide a fix in a separate PR. The job report contains no failed test, and the archived Actions log is unavailable (BlobNotFound), so this appears to be CI infrastructure rather than this backport. If a fix is already in progress, link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

Your reading is right, this is the runner wedge rather than the backport. The job completed as failure while its own Run step is still in_progress with conclusion: null, the archived log is BlobNotFound, the run has 0 artifacts, and CIDB has rows for shards 1, 2, 3, 4 and 6 of that check at 43be551 but none at all for 5/6 (the amd_tsan family at the same commit has all six).

The fix is already in progress in #112984. Its workflow gate was released yesterday, so CI is now running there on the new head 2accb4a.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Verified the only failed shard had no test result or archived log and was the documented amd-medium runner wedge, not a backport regression. Its failed-job rerun is queued as job 94990501325; no code change is indicated. There are no unresolved review threads.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the unrelated failure in test_storage_delta/test_imds.py::test_session_token: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114476&sha=81b1877a77035974fac61ec465c1a32c02f6dd17&name_0=BackportPR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%205%2F6%29. It fails before the test body while starting Spark with Py4JError: SparkConf does not exist in the JVM; the backport changes only JSON skip-index matching. I found no matching open issue or fix PR. Please provide a fix in a separate PR, or link an existing one.

@groeneai

Copy link
Copy Markdown
Collaborator

Not the backport. This is the integration harness reusing a dead py4j gateway; py4j relabels the dead-socket error as SparkConf does not exist in the JVM.

From the job log: worker gw0 ran test_storage_delta/test.py and test_database_delta/test.py earlier in the same process, then picked up test_imds.py at 14:25. The SparkConf lookup is sent to the cached gateway and gets Answer from Java side is empty -> Py4JNetworkError: Error while sending or receiving, which JVMView.__getattr__ reports as the missing-class message. The single-test retry in the same job passed.

Fixed on master by #113430 (merged 2026-08-05). It is absent from 26.6: tests/integration/helpers/spark_tools.py at 81b1877 is blob d0270403, byte-identical to the pre-fix master blob; master is bf370b47. The head has none of _gateway_is_live, _reset_pyspark_class_state, _prepare_and_create, so ResilientSparkSession.__init__ creates the session without probing the cached gateway. class ResilientSparkSession itself predates the fix and is present, so grepping for it is misleading.

Breadth: 29 CIDB hits of this string in 90 days. 28 are 26.6, one is master on 2026-06-20 (pre-fix). None on master since.

So the gap is that the fix never reached the release branches, not a missing fix. Per the standing rule I do not hand-author release-branch PRs, so could you apply v26.6-must-backport to #113430? That expands to 26.6 and 26.7 and the robot opens the backport. I verified the port: git merge-tree --merge-base=<PR base> returns clean on both branches, and the resulting spark_tools.py is byte-identical to master's.

Two notes:

  • 26.5 and 26.3 also lack it and port cleanly, so v26.3-must-backport covers 26.3/26.5/26.6/26.7 if you want the whole line. Please do not use pr-must-backport: 25.8 has no spark_tools.py, and the port there conflicts modify/delete.
  • The sibling harness fix Do not run Python in the forked child when launching Spark's gateway #113870 (gateway launch stall) has no release-branch hits and its test-file changes conflict on 26.6, so I am not asking for it.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Applied v26.6-must-backport to #113430, which triggers the requested 26.6 Spark gateway recovery backport. The remaining failure is therefore being addressed in the appropriate follow-up PR; this JSON skip-index backport needs no code change.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Re-checked the remaining failure and its remediation. This PR has no unresolved review threads; its only failing test was test_storage_delta/test_imds.py::test_session_token, which passed when retried in the same job. The intended release fix is #114972. Its current failed run was cancelled after 58 minutes while unrelated tests were failing, before it reached test_imds, so it does not invalidate the gateway diagnosis. A successful rerun/merge of #114972 remains the required external gate; this JSON skip-index backport needs no further code change.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Updated this branch with current 26.6 (commit b3c6478f), including the merged Spark gateway recovery backport #114972. The current failed run is unrelated to the JSON skip-index change: the AsyncLoader::spawn abort is fixed by #114897; I applied v26.6-must-backport to create its release backport. The library-bridge failure is a Connection reset by peer after the test deliberately restarts the bridge; it is unrelated and its existing stabilization is #106152. There are no unresolved review threads.

@clickhouse-gh
clickhouse-gh Bot merged commit 34ccdac into 26.6 Aug 18, 2026
38 of 39 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.6/113289 branch August 18, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants