From 28bf9779603fa906ce9b028832d9e4400d0c6a3c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Nov 2023 03:59:16 +0100 Subject: [PATCH] Fix test --- src/Functions/FunctionTokens.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Functions/FunctionTokens.h b/src/Functions/FunctionTokens.h index a79d37a7a87..0a669e0279c 100644 --- a/src/Functions/FunctionTokens.h +++ b/src/Functions/FunctionTokens.h @@ -172,7 +172,11 @@ static inline std::optional extractMaxSplits( return std::nullopt; if (const ColumnConst * column = checkAndGetColumn(arguments[max_substrings_argument_position].column.get())) - return column->getUInt(0); + { + size_t res = column->getUInt(0); + if (res) + return res; + } return std::nullopt; }