Fix mortonEncode with no rows

This commit is contained in:
Antonio Andelic 2024-04-04 15:22:09 +02:00
parent 03feab3d20
commit 9e1d8b8aaa
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);