Skip to content

Fix flaky 04012_explain_pretty_output test - #100965

Closed
bacek wants to merge 3 commits into
ClickHouse:masterfrom
bacek:bacek/fix-04012
Closed

bacek wants to merge 3 commits into
ClickHouse:masterfrom
bacek:bacek/fix-04012

Conversation

@bacek

@bacek bacek commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor

04011 and 04012: The test runner randomizes settings, and when query_plan_join_shard_by_pk_ranges is enabled the optimizer populates primary_key_sharding on JoinStep, causing Sharding: [(a = x)] to appear in EXPLAIN output and break the reference.

04039: Adding use_query_condition_cache = 0 pins the setting and ensures the skip index loop always sees the full set of granules, making the test deterministic.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

The test runner randomizes settings, and when `query_plan_join_shard_by_pk_ranges`
is enabled the optimizer populates `primary_key_sharding` on `JoinStep`, causing
`Sharding: [(a = x)]` to appear in `EXPLAIN` output and break the reference.

Fix by disabling the setting at the start of the test, consistent with the
other settings already pinned there.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@bacek

bacek commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@Fgrtue fyi

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Mar 27, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3e50f98]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Mar 27, 2026
Same issue as `04012_explain_pretty_output`: when the test runner randomly
enables `query_plan_join_shard_by_pk_ranges`, the `Sharding:` line appears
in `EXPLAIN` output and breaks the reference.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@bacek

bacek commented Mar 28, 2026

Copy link
Copy Markdown
Contributor Author

@bacek

bacek commented Mar 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Whack-a-mole. 04039 too.

@bacek

bacek commented Mar 28, 2026

Copy link
Copy Markdown
Contributor Author

Flaked 03632 is fixed in #100987

@bacek

bacek commented Mar 28, 2026

Copy link
Copy Markdown
Contributor Author

Extracted 04039 fix into #100988

@bacek
bacek force-pushed the bacek/fix-04012 branch from e860987 to 3e50f98 Compare March 28, 2026 08:16
@bacek

bacek commented Mar 28, 2026

Copy link
Copy Markdown
Contributor Author

@alexey-milovidov beats me.

@bacek bacek closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants