You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "feiniaofeiafei (via GitHub)" <gi...@apache.org> on 2024/03/01 09:50:43 UTC

[PR] [regression test] add grouping sets test [doris]

feiniaofeiafei opened a new pull request, #31675:
URL: https://github.com/apache/doris/pull/31675

    add grouping sets regression test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "starocean999 (via GitHub)" <gi...@apache.org>.
starocean999 merged PR #31675:
URL: https://github.com/apache/doris/pull/31675


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #31675:
URL: https://github.com/apache/doris/pull/31675#issuecomment-1978672880

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [regression test] add grouping sets test [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #31675:
URL: https://github.com/apache/doris/pull/31675#issuecomment-1972864022

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #31675:
URL: https://github.com/apache/doris/pull/31675#discussion_r1512209185


##########
regression-test/suites/nereids_rules_p0/grouping_sets/test_grouping_sets_combination.groovy:
##########
@@ -0,0 +1,189 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+suite("test_grouping_sets_combination") {
+    sql "SET enable_nereids_planner=true"
+    sql "SET enable_fallback_to_original_planner=false"
+    sql """
+         DROP TABLE IF EXISTS mal_test1
+        """
+
+    sql """
+        create table mal_test1(pk int, a int, b int) distributed by hash(pk) buckets 10
+        properties('replication_num' = '1'); 
+        """
+
+    sql """
+        insert into mal_test1 values(2,1,3),(1,1,2),(3,5,6),(6,null,6),(4,5,6);
+     """
+
+    sql "drop table if exists test_window_table2"
+
+    sql """
+        create table test_window_table2
+         (
+             a varchar(100) null,
+             b decimalv3(18,10) null,
+             c int,
+         ) ENGINE=OLAP
+         DUPLICATE KEY(a)
+         DISTRIBUTED BY HASH(a) BUCKETS 1
+         PROPERTIES (
+         "replication_allocation" = "tag.location.default: 1"
+         );
+    """
+
+    sql """
+        insert into test_window_table2 values("1", 1, 1),("1", 1, 2),("1", 2, 1),("1", 2, 2),("2", 11, 1),("2", 11, 2),("2", 12, 1),("2", 12, 2);
+    """
+
+
+    sql """drop table if exists test_sql;"""
+    sql """
+        CREATE TABLE `test_sql` (
+        `user_id` varchar(10) NULL,
+        `dt` date NULL,
+        `city` varchar(20) NULL,
+        `age` int(11) NULL
+        ) ENGINE=OLAP
+        UNIQUE KEY(`user_id`)
+        COMMENT 'test'
+        DISTRIBUTED BY HASH(`user_id`) BUCKETS 1
+        PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1",
+        "is_being_synced" = "false",
+        "storage_format" = "V2",
+        "light_schema_change" = "true",
+        "disable_auto_compaction" = "false",
+        "enable_single_replica_compaction" = "false"
+        );
+    """
+
+    sql """ insert into test_sql values (1,'2020-09-09',2,3);"""
+
+    sql "DROP TABLE IF EXISTS agg_test_table_t;"
+    sql """
+        CREATE TABLE `agg_test_table_t` (
+        `k1` varchar(65533) NULL,
+        `k2` text NULL,
+        `k3` text null,
+        `k4` text null
+        ) ENGINE=OLAP
+        DUPLICATE KEY(`k1`)
+        COMMENT 'OLAP'
+        DISTRIBUTED BY HASH(`k1`) BUCKETS 10
+        PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1",
+        "is_being_synced" = "false",
+        "storage_format" = "V2",
+        "light_schema_change" = "true",
+        "disable_auto_compaction" = "false",
+        "enable_single_replica_compaction" = "false"
+        );
+    """
+
+    sql """insert into agg_test_table_t(`k1`,`k2`,`k3`) values('20231026221524','PA','adigu1bububud');"""
+    qt_select1 """

Review Comment:
   not use numeric suffix. use meaningful names



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #31675:
URL: https://github.com/apache/doris/pull/31675#discussion_r1512209918


##########
regression-test/suites/nereids_rules_p0/grouping_sets/test_grouping_sets_combination.groovy:
##########
@@ -0,0 +1,189 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+suite("test_grouping_sets_combination") {
+    sql "SET enable_nereids_planner=true"
+    sql "SET enable_fallback_to_original_planner=false"
+    sql """
+         DROP TABLE IF EXISTS mal_test1
+        """
+
+    sql """
+        create table mal_test1(pk int, a int, b int) distributed by hash(pk) buckets 10
+        properties('replication_num' = '1'); 
+        """
+
+    sql """
+        insert into mal_test1 values(2,1,3),(1,1,2),(3,5,6),(6,null,6),(4,5,6);
+     """
+
+    sql "drop table if exists test_window_table2"
+
+    sql """
+        create table test_window_table2
+         (
+             a varchar(100) null,
+             b decimalv3(18,10) null,
+             c int,
+         ) ENGINE=OLAP
+         DUPLICATE KEY(a)
+         DISTRIBUTED BY HASH(a) BUCKETS 1
+         PROPERTIES (
+         "replication_allocation" = "tag.location.default: 1"
+         );
+    """
+
+    sql """
+        insert into test_window_table2 values("1", 1, 1),("1", 1, 2),("1", 2, 1),("1", 2, 2),("2", 11, 1),("2", 11, 2),("2", 12, 1),("2", 12, 2);
+    """
+
+
+    sql """drop table if exists test_sql;"""
+    sql """
+        CREATE TABLE `test_sql` (
+        `user_id` varchar(10) NULL,
+        `dt` date NULL,
+        `city` varchar(20) NULL,
+        `age` int(11) NULL
+        ) ENGINE=OLAP
+        UNIQUE KEY(`user_id`)
+        COMMENT 'test'
+        DISTRIBUTED BY HASH(`user_id`) BUCKETS 1
+        PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1",
+        "is_being_synced" = "false",
+        "storage_format" = "V2",
+        "light_schema_change" = "true",
+        "disable_auto_compaction" = "false",
+        "enable_single_replica_compaction" = "false"
+        );
+    """
+
+    sql """ insert into test_sql values (1,'2020-09-09',2,3);"""
+
+    sql "DROP TABLE IF EXISTS agg_test_table_t;"
+    sql """
+        CREATE TABLE `agg_test_table_t` (
+        `k1` varchar(65533) NULL,
+        `k2` text NULL,
+        `k3` text null,
+        `k4` text null
+        ) ENGINE=OLAP
+        DUPLICATE KEY(`k1`)
+        COMMENT 'OLAP'
+        DISTRIBUTED BY HASH(`k1`) BUCKETS 10
+        PROPERTIES (
+        "replication_allocation" = "tag.location.default: 1",
+        "is_being_synced" = "false",
+        "storage_format" = "V2",
+        "light_schema_change" = "true",
+        "disable_auto_compaction" = "false",
+        "enable_single_replica_compaction" = "false"
+        );
+    """
+
+    sql """insert into agg_test_table_t(`k1`,`k2`,`k3`) values('20231026221524','PA','adigu1bububud');"""

Review Comment:
   add
   ```
   sql """
   sync
   """
   ```
   
   after insert for stable result



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #31675:
URL: https://github.com/apache/doris/pull/31675#issuecomment-1978067992

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "feiniaofeiafei (via GitHub)" <gi...@apache.org>.
feiniaofeiafei commented on PR #31675:
URL: https://github.com/apache/doris/pull/31675#issuecomment-1978550903

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [test](Nereids) add grouping sets test [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #31675:
URL: https://github.com/apache/doris/pull/31675#issuecomment-1978672944

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org