Merge pull request #62288 from ClickHouse/fix-morton

Fix `mortonEncode` `use-of-uninitialized-value`
This commit is contained in:
Alexey Milovidov 2024-04-05 13:32:22 +02:00 committed by GitHub
commit dd6e5be27b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -321,6 +321,9 @@ public:
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override
{
if (input_rows_count == 0)
return ColumnUInt64::create();
return selector.selectAndExecute(arguments, result_type, input_rows_count);
}

View File

@ -0,0 +1,2 @@
4294967286
4294967286

View File

@ -0,0 +1,2 @@
SELECT mortonEncode(materialize((1, 1)), 65534, 65533);
SELECT mortonEncode((1, 1), 65534, 65533);