Repository navigation
Do not analyze viewExplain arguments before validation - #108384
Conversation
|
Workflow [PR], commit [f1cd36d] Summary: ✅
AI ReviewSummaryThis PR changes Final Verdict✅ No material issues found in the current diff. LLVM Coverage ReportMeasured on commit f1cd36d.
Changed lines: Changed C/C++ lines covered: 7/7 (100.00%) · Uncovered code |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 7/7 (100.00%) | Lost baseline coverage: none · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 9 s compile time in total, 7 of them have a recent master baseline. |
vdimir
left a comment
There was a problem hiding this comment.
We may still want to add a changelog entry since it changes behavior, something like "Return BAD_ARGUMENTS error code for illegal viewExplain argument order instead of previously ..."
viewExplainis the internal lowered form ofSELECT * FROM (EXPLAIN ...). Its arguments are consumed directly byTableFunctionExplain::parseArguments: the first two must be string literals and the optional third argument is the unresolvedSELECTquery being explained.This change skips expression analysis for all
viewExplainarguments so invalid arguments are rejected byparseArgumentsasBAD_ARGUMENTSinstead of resolving nested expressions in arguments that should be validated as literal AST nodes.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixes error handling for invalid calls to the internal viewExplain table function. If the EXPLAIN kind or serialized settings argument is not a string literal, ClickHouse now returns BAD_ARGUMENTS instead of analyzing the invalid expression and potentially returning an unrelated error such as UNKNOWN_TABLE.
Workflow [PR]
Sync PR [sync-upstream/pr/108384]
Version info
26.9.1.442(included in26.9and later)