mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix crash after mergine ActionsDAG.
This commit is contained in:
parent
bd81f43ecb
commit
d13ec0d909
@ -821,6 +821,13 @@ ActionsDAGPtr ActionsDAG::merge(ActionsDAG && first, ActionsDAG && second)
|
||||
|
||||
first.nodes.splice(first.nodes.end(), std::move(second.nodes));
|
||||
|
||||
/// Here we rebuild index because some string_view from the first map now may point to string from second.
|
||||
ActionsDAG::Index first_index;
|
||||
for (auto * node : first.index)
|
||||
first_index.insert(node);
|
||||
|
||||
first.index.swap(first_index);
|
||||
|
||||
#if USE_EMBEDDED_COMPILER
|
||||
if (first.compilation_cache == nullptr)
|
||||
first.compilation_cache = second.compilation_cache;
|
||||
|
1024
tests/queries/0_stateless/01672_actions_dag_merge_crash.reference
Normal file
1024
tests/queries/0_stateless/01672_actions_dag_merge_crash.reference
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
SELECT [NULL, '25.6', '-0.02', NULL], [NULL], 1024, [NULL, '10485.76', NULL, NULL], [NULL, '-922337203.6854775808', toNullable(NULL)], [NULL] FROM (SELECT [multiIf((number % 1023) = -inf, toString(number), NULL)], NULL, '-1', multiIf((number % NULL) = NULL, toString(number), ''), [NULL, NULL], multiIf((number % NULL) = 65536, toString(number), '') AS s FROM system.numbers) LIMIT 1024
|
Loading…
Reference in New Issue
Block a user