yiguolei commented on code in PR #22897:
URL: https://github.com/apache/doris/pull/22897#discussion_r1292269712


##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@ class ColumnObject final : public COWHelper<IColumn, 
ColumnObject> {
     const bool is_nullable;
     Subcolumns subcolumns;
     size_t num_rows;
+    // sparse columns will be merge and encoded into root column
+    Subcolumns sparse_columns;
+    // The rapidjson document format of Subcolumns tree structure
+    // the leaves is null.In order to display whole document, copy
+    // this structure and fill with Subcolumns sub items
+    mutable std::shared_ptr<rapidjson::Document> doc_structure;
 
 public:
     static constexpr auto COLUMN_NAME_DUMMY = "_dummy";
 
-    explicit ColumnObject(bool is_nullable_);
+    explicit ColumnObject(bool is_nullable_, bool create_root = true);
 
     ColumnObject(Subcolumns&& subcolumns_, bool is_nullable_);
 
     ~ColumnObject() override = default;
 
-    bool can_be_inside_nullable() const override { return true; }
+    bool can_be_inside_nullable() const override { return false; }

Review Comment:
   这个函数可能不对,我们现在column const 和 nullable的关系是确定的,而且比较trick,很多地方的设定,很难通过一个函数来保证。



##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@ class ColumnObject final : public COWHelper<IColumn, 
ColumnObject> {
     const bool is_nullable;
     Subcolumns subcolumns;
     size_t num_rows;
+    // sparse columns will be merge and encoded into root column
+    Subcolumns sparse_columns;
+    // The rapidjson document format of Subcolumns tree structure
+    // the leaves is null.In order to display whole document, copy
+    // this structure and fill with Subcolumns sub items
+    mutable std::shared_ptr<rapidjson::Document> doc_structure;
 
 public:
     static constexpr auto COLUMN_NAME_DUMMY = "_dummy";
 
-    explicit ColumnObject(bool is_nullable_);
+    explicit ColumnObject(bool is_nullable_, bool create_root = true);
 
     ColumnObject(Subcolumns&& subcolumns_, bool is_nullable_);
 
     ~ColumnObject() override = default;
 
-    bool can_be_inside_nullable() const override { return true; }
+    bool can_be_inside_nullable() const override { return false; }

Review Comment:
   这个函数可能不对,我们现在column const 和 nullable的关系是确定的,而且比较trick,很多地方的设定,很难通过一个函数来保证。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to