BePPPower commented on code in PR #26236:
URL: https://github.com/apache/doris/pull/26236#discussion_r1384651716


##########
regression-test/suites/external_table_p0/tvf/test_tvf_avro.groovy:
##########
@@ -0,0 +1,154 @@
+// 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_tvf_avro", "external,hive,tvf,avro,external_docker") {
+
+    def all_type_file = "all_type.avro";
+    def format = "avro"
+
+    // s3 config
+    String ak = getS3AK()
+    String sk = getS3SK()
+    String s3_endpoint = getS3Endpoint()
+    String region = getS3Region()
+    String bucket = context.config.otherConfigs.get("s3BucketName");
+    def s3Uri = 
"https://${bucket}.${s3_endpoint}/regression/datalake/pipeline_data/tvf/${all_type_file}";;
+
+    // hdfs config
+    String hdfs_port = context.config.otherConfigs.get("hdfs_port")
+    String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+    def hdfsUserName = "doris"
+    def defaultFS = "hdfs://${externalEnvIp}:${hdfs_port}"
+    def hdfsUri = "${defaultFS}" + 
"/user/doris/preinstalled_data/avro/avro_all_types/${all_type_file}"
+
+    // TVF s3()
+    qt_1 """ 
+            desc function s3(
+            "uri" = "${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}"); 
+        """
+
+    qt_2 """
+            select count(*) from s3(
+            "uri" ="${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}"); 
+        """
+
+    qt_3 """
+           select * from s3(
+            "uri" = "${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}") order by aInt, aLong, aFloat; 
+        """
+
+    qt_4 """
+           select anArray from s3(
+            "uri" = "${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}");
+        """
+
+    qt_5 """
+           select aMap from s3(
+            "uri" = "${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}"); 
+        """
+
+    qt_6 """
+           select anEnum from s3(
+            "uri" = "${s3Uri}",
+            "ACCESS_KEY" = "${ak}",
+            "SECRET_KEY" = "${sk}",
+            "REGION" = "${region}",
+            "FORMAT" = "${format}");
+        """

Review Comment:
   Please use `order_qt` to ensure the results are the same every time
   
   



-- 
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