mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Support countState(*)
This commit is contained in:
parent
036d1c8cbc
commit
98fc22b08e
@ -149,7 +149,7 @@ void TranslateQualifiedNamesMatcher::visit(ASTFunction & node, const ASTPtr &, D
|
||||
if (!func_arguments) return;
|
||||
|
||||
String func_name_lowercase = Poco::toLower(node.name);
|
||||
if (func_name_lowercase == "count" &&
|
||||
if ((func_name_lowercase == "count" || func_name_lowercase == "countstate") &&
|
||||
func_arguments->children.size() == 1 &&
|
||||
func_arguments->children[0]->as<ASTAsterisk>())
|
||||
func_arguments->children.clear();
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
11
tests/queries/0_stateless/02455_count_state_asterisk.sql
Normal file
11
tests/queries/0_stateless/02455_count_state_asterisk.sql
Normal file
@ -0,0 +1,11 @@
|
||||
drop table if exists a;
|
||||
drop table if exists b;
|
||||
|
||||
create table a (i int, j int) engine Log;
|
||||
create materialized view b engine Log as select countState(*) from a;
|
||||
|
||||
insert into a values (1, 2);
|
||||
select countMerge(*) from b;
|
||||
|
||||
drop table b;
|
||||
drop table a;
|
Loading…
Reference in New Issue
Block a user