Fix analyzer - preserve column in group by aggregation.#60046
Fix analyzer - preserve column in group by aggregation.#60046yakov-olkhovskiy wants to merge 2 commits intomasterfrom
Conversation
|
This is an automated comment for commit 05adefb with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
alexey-milovidov
left a comment
There was a problem hiding this comment.
Also, commit the exact found case as a test.
(it makes sense, because the fuzzer takes time to find it)
|
Is #59684 related to this bug? There are multiple queries crashing with analyzer + group by there |
|
@Algunenano it is possible - seems like I inadvertently fixed some significant bug... |
| continue; | ||
|
|
||
| auto expression_type_after_aggregation = group_by_use_nulls ? makeNullableSafe(expression_dag_node->result_type) : expression_dag_node->result_type; | ||
| available_columns_after_aggregation.emplace_back(nullptr, expression_type_after_aggregation, expression_dag_node->result_name); |
There was a problem hiding this comment.
I'm not sure that sharing const column for aggregator is a good idea, since there are some manipulations to it, so I think it is better to avoid sharing this column at all, like here https://github.com/ClickHouse/ClickHouse/pull/59986/files#diff-06a4eb7b985c6d6bcb43e37d94ada33f85a846a26674641e6648395f704bcc23R96
There was a problem hiding this comment.
I compared to current version's DAG for the case in this PR and seems it is also sharing this column...
|
closing in favor of #59986 |
Signed-off-by: Azat Khuzhin <[email protected]>
Changelog category (leave one):
found by fuzzer: