mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #35500 from kitaisreal/throw-if-constant-argument-crash-fix
Fix crash for function throwIf with constant arguments
This commit is contained in:
commit
0576c1b0f3
@ -131,8 +131,10 @@ public:
|
||||
message.value_or("Value passed to '" + getName() + "' function is non zero"));
|
||||
}
|
||||
|
||||
size_t result_size = in_untyped->size();
|
||||
|
||||
/// We return non constant to avoid constant folding.
|
||||
return ColumnUInt8::create(in_data.size(), 0);
|
||||
return ColumnUInt8::create(result_size, 0);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
@ -0,0 +1,10 @@
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
@ -0,0 +1 @@
|
||||
SELECT throwIf(0 AND 2147483646) FROM system.numbers LIMIT 10;
|
Loading…
Reference in New Issue
Block a user