xy720 commented on code in PR #19928:
URL: https://github.com/apache/doris/pull/19928#discussion_r1201486463


##########
regression-test/suites/query_p0/show/test_nesting_complex_switch.groovy:
##########
@@ -0,0 +1,245 @@
+// 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_nesting_complex_switch", "query") {

Review Comment:
   ```suggestion
   suite("test_nested_complex_switch", "query") {
   ```



##########
regression-test/suites/query_p0/show/test_nesting_complex_switch.groovy:
##########
@@ -0,0 +1,245 @@
+// 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_nesting_complex_switch", "query") {
+    // define a sql table
+    def testTable_m = "test_nesting_complex_switch_map"
+    def testTable_a = "test_nesting_complex_switch_array"
+    def testTable_s = "test_nesting_complex_switch_struct"
+
+
+    def sql_m_s = """CREATE TABLE IF NOT EXISTS ${testTable_m} (
+                                           `k1` INT(11) NULL,
+                                           `k2` 
MAP<STRING,STRUCT<F1:TINYINT(4)>>
+                                         ) ENGINE=OLAP
+                                         DUPLICATE KEY(`k1`)
+                                         COMMENT 'OLAP'
+                                         DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                                         PROPERTIES (
+                                         "replication_allocation" = 
"tag.location.default: 1",
+                                         "in_memory" = "false",
+                                         "storage_format" = "V2",
+                                         "disable_auto_compaction" = "false"
+                                         )"""
+    def sql_m_a = """CREATE TABLE IF NOT EXISTS ${testTable_m} (
+                          `k1` INT(11) NULL,
+                          `k2` MAP<ARRAY<INT>, STRING>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_m_m = """CREATE TABLE IF NOT EXISTS ${testTable_m} (
+                          `k1` INT(11) NULL,
+                          `k2` MAP<STRING,MAP<STRING, INT>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_a_s = """CREATE TABLE IF NOT EXISTS ${testTable_a} (
+                          `k1` INT(11) NULL,
+                          `k2` ARRAY<STRUCT<F1:TINYINT(4)>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_a_m = """CREATE TABLE IF NOT EXISTS ${testTable_a} (
+                          `k1` INT(11) NULL,
+                          `k2` ARRAY<MAP<STRING, INT>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_s_s = """CREATE TABLE IF NOT EXISTS ${testTable_s} (
+                          `k1` INT(11) NULL,
+                          `k2` 
STRUCT<F1:STRUCT<F11:BOOLEAN>,F2:TINYINT(4),F3:ARRAY<INT(11)>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_s_a = """CREATE TABLE IF NOT EXISTS ${testTable_s} (
+                          `k1` INT(11) NULL,
+                          `k2` STRUCT<F2:TINYINT(4),F3:ARRAY<INT(11)>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    def sql_s_m = """CREATE TABLE IF NOT EXISTS ${testTable_s} (
+                          `k1` INT(11) NULL,
+                          `k2` STRUCT<F1:TINYINT(4), 
F2:MAP<BOOLEAN,TINYINT(4)>>
+                        ) ENGINE=OLAP
+                        DUPLICATE KEY(`k1`)
+                        COMMENT 'OLAP'
+                        DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+                        PROPERTIES (
+                        "replication_allocation" = "tag.location.default: 1",
+                        "in_memory" = "false",
+                        "storage_format" = "V2",
+                        "disable_auto_compaction" = "false"
+                        )"""
+
+    try {
+        sql "DROP TABLE IF EXISTS ${testTable_m}"
+        sql "DROP TABLE IF EXISTS ${testTable_a}"
+        sql "DROP TABLE IF EXISTS ${testTable_s}"
+        sql "ADMIN SET FRONTEND CONFIG ('enable_map_type' = 'true')"
+        sql "ADMIN SET FRONTEND CONFIG ('enable_struct_type' = 'true')"
+        sql "ADMIN SET FRONTEND CONFIG ('disable_nesting_complex_type' = 
'true')"

Review Comment:
   ```suggestion
           sql "ADMIN SET FRONTEND CONFIG ('disable_nested_complex_type' = 
'true')"
   ```



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to