csun5285 commented on code in PR #49776:
URL: https://github.com/apache/doris/pull/49776#discussion_r2026050409


##########
be/src/vec/data_types/serde/data_type_serde.h:
##########
@@ -179,6 +179,10 @@ class DataTypeSerDe {
          */
         const char* nested_string_wrapper;
         int wrapper_len;
+        /**
+         *  variant flat or not
+         */
+        const bool variant_flatten_nested = false;

Review Comment:
   unused



##########
be/test/vec/columns/column_variant_test.cpp:
##########
@@ -0,0 +1,1179 @@
+// 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 <gmock/gmock-more-matchers.h>
+#include <gtest/gtest.h>
+
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+
+#include "testutil/test_util.h"
+#include "vec/columns/column_vector.h"
+#include "vec/columns/column_object.h"
+#include "vec/columns/common_column_test.h"
+#include "vec/core/field.h"
+#include "vec/core/types.h"
+#include "vec/data_types/data_type_factory.hpp"
+
+using namespace doris;
+namespace doris::vectorized {
+static std::string root_dir;
+static std::string test_data_dir;
+static std::string test_result_dir;
+static std::string test_data_dir_json;
+static DataTypePtr dt_variant =
+        
DataTypeFactory::instance().create_data_type(FieldType::OLAP_FIELD_TYPE_VARIANT,
 0, 0);
+
+DataTypeSerDeSPtrs serde;
+
+static ColumnObject::MutablePtr column_variant;
+
+class ColumnObjectTest : public CommonColumnTest {
+protected:
+    static void SetUpTestSuite() {
+        root_dir = std::string(getenv("ROOT"));
+        std::cout << "root_dir: " << root_dir << std::endl;
+        test_data_dir = root_dir + "/be/test/data/vec/columns";
+        test_result_dir = root_dir + "/be/test/expected_result/vec/columns";
+
+        column_variant = ColumnObject::create(true);

Review Comment:
   `ColumnObject::create(count);`, `count`  could be a random value.
   



##########
be/src/vec/columns/column_object.cpp:
##########
@@ -2376,8 +2395,9 @@ Status ColumnObject::sanitize() const {
     for (const auto& subcolumn : subcolumns) {
         if (subcolumn->data.is_finalized()) {
             auto column = 
subcolumn->data.get_least_common_type()->create_column();
-            std::string original = 
subcolumn->data.get_finalized_column().get_name();
-            std::string expected = column->get_name();
+            std::string original =

Review Comment:
   no need to remove nullable



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