Repository navigation
Conversation
|
Workflow [PR], commit [a2d23c2] Summary: ⏳
AI ReviewSummaryThis PR fixes an ASan heap-buffer-overflow in Findings💡 Nits
ClickHouse Rules
Final Verdict
|
| "Illegal column {}, first argument of function {} must be a string", | ||
| arguments[0].column->getName(), | ||
| getName()); | ||
| chassert(false); |
There was a problem hiding this comment.
executeImpl used to throw ILLEGAL_COLUMN on an unexpected first-argument column type, but this branch now uses only chassert(false). In release builds, chassert is compiled out, so this path becomes a silent fallthrough returning an incomplete result column instead of a deterministic exception.
Please keep a real runtime exception here (as before) and keep chassert optionally in addition for debug builds.
| } | ||
|
|
||
| /// Not necessary, but good for performance. | ||
| /// We repeat `pad_string` multiple times until it's length becomes 16 or more. |
There was a problem hiding this comment.
Typo in comment: use its length instead of it's length.
LLVM Coverage Report
Changed lines: 93.46% (100/107) | lost baseline coverage: 47 line(s) · Uncovered code |
leftPad/rightPad functions
nihalzp
left a comment
There was a problem hiding this comment.
Apart from the issues in the comment, looks good!
| { | ||
| size_t number_of_arguments = arguments.size(); | ||
| FunctionArgumentDescriptors mandatory_args{ | ||
| {"string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isStringOrFixedString), nullptr, "Array"}, |
There was a problem hiding this comment.
| {"string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isStringOrFixedString), nullptr, "Array"}, | |
| {"string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isStringOrFixedString), nullptr, "String or FixedString"}, |
| {"length", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isInteger), nullptr, "const UInt*"}, | ||
| }; | ||
| FunctionArgumentDescriptors optional_args{ | ||
| {"pad_string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isString), isColumnConst, "Array"} |
There was a problem hiding this comment.
| {"pad_string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isString), isColumnConst, "Array"} | |
| {"pad_string", static_cast<FunctionArgumentDescriptor::TypeValidator>(&isString), isColumnConst, "const String"} |
Backport #101951 to 26.2: Fix heap-buffer-overflow in `leftPad/rightPad` functions
Backport #101951 to 26.3: Fix heap-buffer-overflow in `leftPad/rightPad` functions
`left/rightPad`: Fix argument description (follow-up to #101951)
Same as #101191 but done in a more clean way.
The relevant commit is 4e6a162, the other commit is cosmetics.
Changelog category (leave one):
Version info
26.4.1.66226.3.5.11,26.2.9.8