amorynan commented on code in PR #45827:
URL: https://github.com/apache/doris/pull/45827#discussion_r1899259878


##########
be/test/vec/columns/column_array_test.cpp:
##########
@@ -0,0 +1,425 @@
+// 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.
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+#include <gtest/gtest.h>
+
+#include "vec/columns/column.h"
+#include "vec/columns/common_column_test.h"
+#include "vec/core/types.h"
+#include "vec/function/function_test_util.h"
+
+// this test is gonna to make a template ColumnTest
+// for example column_ip should test these functions
+
+namespace doris::vectorized {
+class ColumnArrayTest : public CommonColumnTest {
+protected:
+    void SetUp() override {
+        // insert from data csv and assert insert result
+        std::string data_file_dir = 
"regression-test/data/nereids_function_p0/array/";
+        MutableColumns array_cols;
+        // we need to load data from csv file into column_array list
+        // step1. create data type for array nested type (const and nullable)
+        // array<tinyint>
+        BaseInputTypeSet array_tinyint = {TypeIndex::Array, TypeIndex::Int8};
+        // array<smallint>
+        BaseInputTypeSet array_smallint = {TypeIndex::Array, TypeIndex::Int16};
+        // array<int>
+        BaseInputTypeSet array_int = {TypeIndex::Array, TypeIndex::Int32};
+        // array<bigint>
+        BaseInputTypeSet array_bigint = {TypeIndex::Array, TypeIndex::Int64};
+        // array<largeint>
+        BaseInputTypeSet array_largeint = {TypeIndex::Array, 
TypeIndex::Int128};
+        // array<float>
+        BaseInputTypeSet array_float = {TypeIndex::Array, TypeIndex::Float32};
+        // array<double>
+        BaseInputTypeSet array_double = {TypeIndex::Array, TypeIndex::Float64};
+        // array<ipv4>
+        BaseInputTypeSet array_ipv4 = {TypeIndex::Array, TypeIndex::IPv4};
+        // array<ipv6>
+        BaseInputTypeSet array_ipv6 = {TypeIndex::Array, TypeIndex::IPv6};
+        // array<date>
+        BaseInputTypeSet array_date = {TypeIndex::Array, TypeIndex::Date};
+        // array<datetime>
+        BaseInputTypeSet array_datetime = {TypeIndex::Array, 
TypeIndex::DateTime};
+        // array<datev2>
+        BaseInputTypeSet array_datev2 = {TypeIndex::Array, TypeIndex::DateV2};
+        // array<datetimev2>
+        BaseInputTypeSet array_datetimev2 = {TypeIndex::Array, 
TypeIndex::DateTimeV2};
+        // array<varchar>
+        BaseInputTypeSet array_varchar = {TypeIndex::Array, TypeIndex::String};
+        // array<decimal32(9, 5)> UT
+        BaseInputTypeSet array_decimal = {TypeIndex::Array, 
TypeIndex::Decimal32};
+        // array<decimal64(18, 9)> UT
+        BaseInputTypeSet array_decimal64 = {TypeIndex::Array, 
TypeIndex::Decimal64};
+        // array<decimal128(38, 20)> UT
+        BaseInputTypeSet array_decimal128 = {TypeIndex::Array, 
TypeIndex::Decimal128V3};
+        // array<decimal256(76, 40)> UT
+        BaseInputTypeSet array_decimal256 = {TypeIndex::Array, 
TypeIndex::Decimal256};
+        std::vector<BaseInputTypeSet> array_typeIndex = {
+                array_tinyint,   array_smallint,   array_int,        
array_bigint,  array_largeint,
+                array_float,     array_double,     array_ipv4,       
array_ipv6,    array_date,
+                array_datetime,  array_datev2,     array_datetimev2, 
array_varchar, array_decimal,
+                array_decimal64, array_decimal128, array_decimal256};
+
+        vector<ut_type::UTDataTypeDescs> descs;
+        descs.reserve(array_typeIndex.size());

Review Comment:
   done!



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