mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Analyzer: Fix LOGICAL_ERROR in CountDistinctPass
This commit is contained in:
parent
90a64ae5b8
commit
f41c6b0e6b
@ -61,6 +61,8 @@ public:
|
||||
return;
|
||||
|
||||
auto & count_distinct_argument_column = count_distinct_arguments_nodes[0];
|
||||
if (count_distinct_argument_column->getNodeType() != QueryTreeNodeType::COLUMN)
|
||||
return;
|
||||
auto & count_distinct_argument_column_typed = count_distinct_argument_column->as<ColumnNode &>();
|
||||
|
||||
/// Build subquery SELECT count_distinct_argument_column FROM table_expression GROUP BY count_distinct_argument_column
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,8 @@
|
||||
set count_distinct_optimization = 1;
|
||||
|
||||
SELECT uniqExact('257')
|
||||
FROM
|
||||
(SELECT
|
||||
number, CAST(number / 9223372036854775806, 'UInt64') AS m
|
||||
FROM numbers(3)
|
||||
);
|
Loading…
Reference in New Issue
Block a user