提交 e8a8da1a 编写于 作者: N Nikolai Kochetov

Fix array intersect.

上级 736e3c0f
...@@ -432,15 +432,20 @@ ColumnPtr FunctionArrayIntersect::execute(const UnpackedArrays & arrays, Mutable ...@@ -432,15 +432,20 @@ ColumnPtr FunctionArrayIntersect::execute(const UnpackedArrays & arrays, Mutable
current_has_nullable = true; current_has_nullable = true;
else else
{ {
typename Map::mapped_type * value = nullptr;
if constexpr (is_numeric_column) if constexpr (is_numeric_column)
++map[columns[arg]->getElement(i)]; value = &map[columns[arg]->getElement(i)];
else if constexpr (std::is_same<ColumnType, ColumnString>::value || std::is_same<ColumnType, ColumnFixedString>::value) else if constexpr (std::is_same<ColumnType, ColumnString>::value || std::is_same<ColumnType, ColumnFixedString>::value)
++map[columns[arg]->getDataAt(i)]; value = &map[columns[arg]->getDataAt(i)];
else else
{ {
const char * data = nullptr; const char * data = nullptr;
++map[columns[arg]->serializeValueIntoArena(i, arena, data)]; value = &map[columns[arg]->serializeValueIntoArena(i, arena, data)];
} }
if (*value == arg)
++(*value);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册