Repository navigation
Add error-path tests for functions refactored in PR #97672 - #98997
alexey-milovidov merged 2 commits into
Conversation
|
Workflow [PR], commit [3cb6ebc] Summary: ✅ AI Review1) SummaryThis PR adds a new stateless test pair ( 2) Missing context (if any)
3) Findings (by severity)No Blockers or Majors found; the PR looks good. 4) Tests & Evidence
5) ClickHouse Compliance Checklist (Yes/No + short note)
6) Performance & Safety NotesNo hot-path or memory/concurrency impact: this PR only adds stateless SQL test coverage. No performance benchmark is required for this scope. 7) User-Lens ReviewThe added tests improve confidence that users receive stable, actionable type-validation exceptions after the #97672 refactor. Behavior is unsurprising and error expectations are explicit in test annotations. 8) Final Verdict
|
|
The LLVM Coverage job failure in this PR is caused by a bug introduced in #96738 — the job crashes when a PR has no C++ source code changes. The fix is in #99032. Since this branch is in a fork, I can't merge it directly — please merge master once #99032 lands, or cherry-pick the fix. cc @alexbakharew |
|
The LLVM Coverage job is fixed in this PR: #99103 |
PR ClickHouse#97672 replaced manual argument validation with `validateFunctionArguments` in 21 function files. The following functions had no existing tests for their error paths (wrong argument types): - `appendTrailingCharIfAbsent` - `monthName` - `conv` - `lowCardinalityIndices` / `lowCardinalityKeys` - `randomPrintableASCII` - `randomString` - `ngrams` (uses `BAD_ARGUMENTS` instead of `ILLEGAL_TYPE_OF_ARGUMENT`) - `dynamicType` Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
dd94594 to
3cb6ebc
Compare
PR #97672 mechanically replaced manual argument validation with the validateFunctionArguments / validateFunctionArgumentsWithVariadics framework across 21 function files. While the behavior is unchanged, the following functions had no existing tests verifying their error paths (wrong argument types → ILLEGAL_TYPE_OF_ARGUMENT or BAD_ARGUMENTS):
This adds a single test file covering both happy-path and error-path queries for each of these functions, preventing future regressions if the validation framework or these functions are changed.
Functions already covered by existing tests (tupleConcat, substringIndex, randomStringUTF8) are intentionally excluded.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Note
Low Risk
Adds only stateless SQL tests and expected outputs, with no production code changes; risk is limited to potential test flakiness or incorrect expected error codes.
Overview
Adds a new stateless query test (
03930_pr97672_validation_error_paths.sql+.reference) that exercises both success and wrong-argument-type error paths for several functions whose argument validation was recently refactored (e.g.,appendTrailingCharIfAbsent,monthName,conv,lowCardinalityIndices/Keys,randomPrintableASCII,randomString,ngrams,dynamicType).The test asserts expected failures via
serverError ILLEGAL_TYPE_OF_ARGUMENTto prevent regressions in validation behavior.Written by Cursor Bugbot for commit 3cb6ebc. This will update automatically on new commits. Configure here.
Version info
26.3.1.709