mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #57033 from ClickHouse/fix-fuzzbits
Fix `fuzzBits` with `ARRAY JOIN`
This commit is contained in:
commit
8c88dbe5aa
@ -84,6 +84,10 @@ public:
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
auto col_in_untyped = arguments[0].column;
|
||||
|
||||
if (input_rows_count == 0)
|
||||
return col_in_untyped;
|
||||
|
||||
const double inverse_probability = assert_cast<const ColumnConst &>(*arguments[1].column).getValue<double>();
|
||||
|
||||
if (inverse_probability < 0.0 || 1.0 < inverse_probability)
|
||||
|
@ -0,0 +1,4 @@
|
||||
12 1
|
||||
12 2
|
||||
100 1
|
||||
100 2
|
@ -0,0 +1,2 @@
|
||||
SELECT length(fuzzBits('stringstring', 0.5)), a FROM numbers(1) ARRAY JOIN [1, 2] AS a;
|
||||
SELECT length(fuzzBits('stringstring'::FixedString(100), 0.5)), a FROM numbers(1) ARRAY JOIN [1, 2] AS a
|
Loading…
Reference in New Issue
Block a user