mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fix TrimLayer so that TRIM-ing an empty string no longer throws an exception
This commit is contained in:
parent
343f1e7e70
commit
fc96f54e10
@ -1667,6 +1667,11 @@ public:
|
||||
if (!mergeElement())
|
||||
return false;
|
||||
|
||||
/// Skip replaceRegex if trying to TRIM an empty string to avoid exception
|
||||
if (char_override && elements[0]->getID() == "Literal_''") {
|
||||
char_override = false;
|
||||
}
|
||||
|
||||
to_remove = makeASTFunction("regexpQuoteMeta", elements[0]);
|
||||
elements.clear();
|
||||
state = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user