[feature](Nereids) support agg state type in create table (#32171)
this PR introduce a behavior change, syntax of create table with agg_state type is changed.
This commit is contained in:
@ -46,7 +46,7 @@ suite("test_vertical_compaction_agg_state") {
|
||||
sql """
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
user_id VARCHAR,
|
||||
agg_user_id agg_state collect_set(string)
|
||||
agg_user_id agg_state<collect_set(string)> generic
|
||||
)ENGINE=OLAP
|
||||
AGGREGATE KEY(`user_id`)
|
||||
COMMENT 'OLAP'
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_agg_state_avg") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int not null,
|
||||
k2 agg_state avg(int not null)
|
||||
k2 agg_state<avg(int not null)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1)
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_agg_state_group_concat") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int null,
|
||||
k2 agg_state group_concat(string)
|
||||
k2 agg_state<group_concat(string)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1) buckets 3
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_agg_state_max") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int not null,
|
||||
k2 agg_state max(int not null)
|
||||
k2 agg_state<max(int not null)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1)
|
||||
@ -60,7 +60,7 @@ suite("test_agg_state_max") {
|
||||
sql """
|
||||
create table a_table2(
|
||||
k1 int not null,
|
||||
k2 agg_state max(int null)
|
||||
k2 agg_state<max(int null)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1)
|
||||
|
||||
@ -48,7 +48,7 @@ suite("test_agg_state_nereids") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int null,
|
||||
k2 agg_state max_by(int not null,int)
|
||||
k2 agg_state<max_by(int not null, int)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1) buckets 3
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_agg_state_quantile_union") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int not null,
|
||||
k2 agg_state quantile_union(quantile_state not null)
|
||||
k2 agg_state<quantile_union(quantile_state not null)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1)
|
||||
|
||||
@ -45,7 +45,7 @@ suite("test_agg_state") {
|
||||
sql """
|
||||
create table a_table(
|
||||
k1 int null,
|
||||
k2 agg_state max_by(int not null,int)
|
||||
k2 agg_state<max_by(int not null,int)> generic
|
||||
)
|
||||
aggregate key (k1)
|
||||
distributed BY hash(k1) buckets 3
|
||||
|
||||
@ -22,7 +22,7 @@ suite ("dis_26495") {
|
||||
sql """ DROP TABLE IF EXISTS doris_test; """
|
||||
|
||||
sql """
|
||||
create table doris_test (a int,b int, agg_st_1 agg_state max_by(int ,int))
|
||||
create table doris_test (a int,b int, agg_st_1 agg_state<max_by(int ,int)> generic)
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1 properties("replication_num" = "1");
|
||||
"""
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ suite("test_analyze_with_agg_complex_type") {
|
||||
device_id bitmap BITMAP_UNION NULL,
|
||||
hll_test hll hll_union,
|
||||
qs QUANTILE_STATE QUANTILE_UNION,
|
||||
agg_st_1 agg_state max_by(int ,int)
|
||||
agg_st_1 agg_state<max_by(int, int)> GENERIC
|
||||
)
|
||||
aggregate key (datekey)
|
||||
distributed by hash(datekey) buckets 1
|
||||
|
||||
Reference in New Issue
Block a user