Fix flaky test 04039_prune_array_join_columns by groeneai · Pull Request #101593 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix flaky test 04039_prune_array_join_columns#101593

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix/04039-prune-array-join-columns-flaky
Closed

Fix flaky test 04039_prune_array_join_columns#101593
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix/04039-prune-array-join-columns-flaky

Conversation

@groeneai

@groeneai groeneai commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

The test uses EXPLAIN header=1 which produces output that depends on query plan expression step merging. When CI randomizes query_plan_merge_expressions to 0 (or query_plan_enable_optimizations to 0), Expression steps that are normally merged (e.g. Before ORDER BY + Projection) appear as separate steps, causing the output to differ from the reference file.

Pin query_plan_enable_optimizations=1 and query_plan_merge_expressions=1 to ensure stable EXPLAIN output regardless of CI setting randomization.

Changelog category (leave one):

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

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

The test uses EXPLAIN header=1 whose output depends on query plan
expression step merging. When CI randomizes query_plan_merge_expressions
to 0, Expression steps that are normally merged (e.g. "Before ORDER BY
+ Projection") appear as separate steps, causing the output to differ
from the reference file.

Pin query_plan_enable_optimizations=1 and query_plan_merge_expressions=1
to ensure stable EXPLAIN output regardless of CI randomization.
@groeneai

groeneai commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

@groeneai

groeneai commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

cc @novikd — could you review this? It pins query_plan_enable_optimizations=1 and query_plan_merge_expressions=1 in the ARRAY JOIN column pruning test to prevent EXPLAIN output differences when CI randomizes these settings.

@nikitamikhaylov nikitamikhaylov added the can be tested Allows running workflows for external contributors label Apr 2, 2026
@nikitamikhaylov nikitamikhaylov self-assigned this Apr 2, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e3f9b38]

Summary:

job_name test_name status info comment
Stress test (arm_msan) failure
Server died FAIL cidb
MemorySanitizer: use-of-uninitialized-value (STID: 2410-543a) FAIL cidb

AI Review

Summary

This PR stabilizes tests/queries/0_stateless/04039_prune_array_join_columns.sql by pinning query_plan_enable_optimizations=1 and query_plan_merge_expressions=1, so EXPLAIN header=1 output is no longer affected by CI randomization. The change is minimal, targeted, and matches the flaky behavior root cause; I found no correctness, safety, or performance issues.

ClickHouse Rules
Item Status Notes
Deletion logging
Serialization versioning
Core-area scrutiny
No test removal
Experimental gate
No magic constants
Backward compatibility
SettingsChangesHistory.cpp
PR metadata quality
Safe rollout
Compilation time
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Apr 2, 2026
@groeneai

groeneai commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

@groeneai groeneai closed this Apr 2, 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.

3 participants