Skip to content

Revert "Enable server-side AST fuzzer in stress test and BuzzHouse" - #100437

Closed
alexey-milovidov wants to merge 1 commit into
masterfrom
revert-98138-enable-ast-fuzzer-stress-buzzhouse
Closed

alexey-milovidov wants to merge 1 commit into
masterfrom
revert-98138-enable-ast-fuzzer-stress-buzzhouse

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Reverts #98138

Way too powerful for now - let's enable again this week.

@clickhouse-gh

clickhouse-gh Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3f1e7fc]


AI Review

Summary

This PR reverts #98138 and disables server-side AST fuzzer enablement in stress/fuzzer test paths, while also reverting several safety guards in query execution and join-filter evaluation helpers. High-level verdict: request changes because the revert reintroduces a correctness issue in two optimizer helpers by removing defensive checks before ActionsDAG::evaluatePartialResult.

Findings

❌ Blockers

  • [src/Processors/QueryPlan/Optimizations/Utils.cpp:121] The null-check for filter_dag.tryFindInOutputs(filter_column_name) was removed. When the output is absent, nullptr is passed to ActionsDAG::evaluatePartialResult, which expects valid nodes. This breaks the intended FilterResult::UNKNOWN fallback and can trigger an exception path.
    • Suggested fix: restore
      const auto * filter_node = filter_dag.tryFindInOutputs(filter_column_name);
      if (!filter_node)
          return FilterResult::UNKNOWN;
      and pass { filter_node }.
  • [src/Processors/QueryPlan/Optimizations/convertAnyJoinToSemiOrAntiJoin.cpp:30] Same regression: removed null-check for combined_dag.tryFindInOutputs(filter_column_name) before evaluatePartialResult.
    • Suggested fix: restore the filter_node null-check and return FilterResult::UNKNOWN when missing.

ClickHouse Rules

Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ⚠️ Revert in optimizer core area reintroduced missing-node handling regression in two call sites.
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ⚠️ Current state should not be rolled out until missing-output handling is restored.
Compilation time ✅

Final Verdict

  • Status: ⚠️ Request changes
  • Minimum required actions:
    • Restore tryFindInOutputs null-guards in:
      • src/Processors/QueryPlan/Optimizations/Utils.cpp
      • src/Processors/QueryPlan/Optimizations/convertAnyJoinToSemiOrAntiJoin.cpp
    • Ensure missing filter output returns FilterResult::UNKNOWN instead of passing nullptr into evaluatePartialResult.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 23, 2026
filter_output = ActionsDAG::evaluatePartialResult(
filter_input,
{ filter_node },
{ filter_dag.tryFindInOutputs(filter_column_name) },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restoring this revert drops a defensive null-check that was preventing a null ActionsDAG::Node from being passed into ActionsDAG::evaluatePartialResult.

If filter_column_name is missing from outputs, tryFindInOutputs returns nullptr, and evaluatePartialResult dereferences output nodes (e.g. node->children) without null handling. This can lead to an exception path outside the intended UNKNOWN fallback.

Please restore the guard:

const auto * filter_node = filter_dag.tryFindInOutputs(filter_column_name);
if (!filter_node)
    return FilterResult::UNKNOWN;

and pass { filter_node } to evaluatePartialResult.

filter_output = ActionsDAG::evaluatePartialResult(
combined_dag_input,
{ filter_node },
{ combined_dag.tryFindInOutputs(filter_column_name) },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in filterResultForNotMatchedRows: this revert removes the null-check for combined_dag.tryFindInOutputs(filter_column_name).

Without the guard, a missing output can propagate nullptr to ActionsDAG::evaluatePartialResult, which assumes valid node pointers. Please restore the previous filter_node null-check and return FilterResult::UNKNOWN when not found.

alexey-milovidov added a commit that referenced this pull request Mar 23, 2026
Set `ast_fuzzer_runs` back to 0 (default) in stress test and BuzzHouse
CI configs while stability issues are being addressed.

See #100437

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

#100439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant