github-actions[bot] commented on code in PR #24554:
URL: https://github.com/apache/doris/pull/24554#discussion_r1349459535


##########
be/src/olap/rowset/beta_rowset_writer.h:
##########
@@ -104,6 +104,8 @@ class BetaRowsetWriter : public RowsetWriter {
 
     RowsetId rowset_id() override { return _context.rowset_id; }
 
+    const RowsetWriterContext& context() const override { return _context; }

Review Comment:
   warning: function 'context' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] const RowsetWriterContext& context() const override { 
return _context; }
   ```
   



##########
be/src/olap/rowset/beta_rowset_writer_v2.h:
##########
@@ -104,6 +100,8 @@ class BetaRowsetWriterV2 : public RowsetWriter {
         return nullptr;
     }
 
+    const RowsetWriterContext& context() const override { return _context; }

Review Comment:
   warning: function 'context' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] const RowsetWriterContext& context() const override { 
return _context; }
   ```
   



##########
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; }
 
     /// Checks that all subcolumns have consistent sizes.
     void check_consistency() const;
 
+    MutableColumnPtr get_root() {
+        if (subcolumns.empty() || 
is_nothing(subcolumns.get_root()->data.get_least_common_type())) {
+            return nullptr;
+        }
+        return 
subcolumns.get_mutable_root()->data.get_finalized_column_ptr()->assume_mutable();
+    }
+
+    bool serialize_one_row_to_string(int row, std::string* output) const;
+
+    bool serialize_one_row_to_string(int row, BufferWritable& output) const;
+
+    // serialize one row to json format
+    bool serialize_one_row_to_json_format(int row, rapidjson::StringBuffer* 
output,
+                                          bool* is_null) const;
+
+    // merge multiple sub sparse columns into root
+    void merge_sparse_to_root_column();
+
+    // ensure root node is a certain type
+    void ensure_root_node_type(const DataTypePtr& type);
+
+    // create jsonb root if missing
+    void create_root();
+
+    // create root with type and column if missing
+    void create_root(const DataTypePtr& type, MutableColumnPtr&& column);
+
+    // root is null or type nothing
+    bool is_null_root() const;

Review Comment:
   warning: function 'is_null_root' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] bool is_null_root() const;
   ```
   



##########
be/src/olap/rowset/rowset_writer.h:
##########
@@ -151,6 +151,8 @@ class RowsetWriter {
 
     virtual int64_t segment_writer_ns() { return 0; }
 
+    virtual const RowsetWriterContext& context() const = 0;

Review Comment:
   warning: function 'context' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] virtual const RowsetWriterContext& context() const = 0;
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@
     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; }
 
     /// Checks that all subcolumns have consistent sizes.
     void check_consistency() const;
 
+    MutableColumnPtr get_root() {
+        if (subcolumns.empty() || 
is_nothing(subcolumns.get_root()->data.get_least_common_type())) {
+            return nullptr;
+        }
+        return 
subcolumns.get_mutable_root()->data.get_finalized_column_ptr()->assume_mutable();
+    }
+
+    bool serialize_one_row_to_string(int row, std::string* output) const;
+
+    bool serialize_one_row_to_string(int row, BufferWritable& output) const;
+
+    // serialize one row to json format
+    bool serialize_one_row_to_json_format(int row, rapidjson::StringBuffer* 
output,
+                                          bool* is_null) const;
+
+    // merge multiple sub sparse columns into root
+    void merge_sparse_to_root_column();
+
+    // ensure root node is a certain type
+    void ensure_root_node_type(const DataTypePtr& type);
+
+    // create jsonb root if missing
+    void create_root();
+
+    // create root with type and column if missing
+    void create_root(const DataTypePtr& type, MutableColumnPtr&& column);
+
+    // root is null or type nothing
+    bool is_null_root() const;
+
+    // Only single scalar root column
+    bool is_scalar_variant() const;

Review Comment:
   warning: function 'is_scalar_variant' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] bool is_scalar_variant() const;
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@
     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; }
 
     /// Checks that all subcolumns have consistent sizes.
     void check_consistency() const;
 
+    MutableColumnPtr get_root() {
+        if (subcolumns.empty() || 
is_nothing(subcolumns.get_root()->data.get_least_common_type())) {
+            return nullptr;
+        }
+        return 
subcolumns.get_mutable_root()->data.get_finalized_column_ptr()->assume_mutable();
+    }
+
+    bool serialize_one_row_to_string(int row, std::string* output) const;
+
+    bool serialize_one_row_to_string(int row, BufferWritable& output) const;
+
+    // serialize one row to json format
+    bool serialize_one_row_to_json_format(int row, rapidjson::StringBuffer* 
output,
+                                          bool* is_null) const;
+
+    // merge multiple sub sparse columns into root
+    void merge_sparse_to_root_column();
+
+    // ensure root node is a certain type
+    void ensure_root_node_type(const DataTypePtr& type);
+
+    // create jsonb root if missing
+    void create_root();
+
+    // create root with type and column if missing
+    void create_root(const DataTypePtr& type, MutableColumnPtr&& column);
+
+    // root is null or type nothing
+    bool is_null_root() const;
+
+    // Only single scalar root column
+    bool is_scalar_variant() const;
+
+    ColumnPtr get_root() const { return 
subcolumns.get_root()->data.get_finalized_column_ptr(); }
+
     bool has_subcolumn(const PathInData& key) const;
 
+    DataTypePtr get_root_type() const;

Review Comment:
   warning: function 'get_root_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] DataTypePtr get_root_type() const;
   ```
   



##########
be/src/vec/columns/column_object.cpp:
##########
@@ -939,10 +1320,85 @@ void ColumnObject::revise_to(int target_num_rows) {
     num_rows = target_num_rows;
 }
 
+void ColumnObject::create_root() {
+    auto type = is_nullable ? make_nullable(std::make_shared<MostCommonType>())
+                            : std::make_shared<MostCommonType>();
+    add_sub_column({}, type->create_column(), type);
+}
+
+void ColumnObject::create_root(const DataTypePtr& type, MutableColumnPtr&& 
column) {
+    if (num_rows == 0) {
+        num_rows = column->size();
+    }
+    add_sub_column({}, std::move(column), type);
+}
+
+bool ColumnObject::is_null_root() const {
+    auto* root = subcolumns.get_root();
+    if (root == nullptr) {
+        return true;
+    }
+    if (root->data.num_of_defaults_in_prefix == 0 &&
+        (root->data.data.empty() || 
is_nothing(root->data.get_least_common_type()))) {
+        return true;
+    }
+    return false;
+}
+
+bool ColumnObject::is_scalar_variant() const {
+    // Only root itself
+    return !is_null_root() && subcolumns.get_leaves().size() == 1;
+}
+
+DataTypePtr ColumnObject::get_root_type() const {
+    return subcolumns.get_root()->data.get_least_common_type();
+}
+
+#define SANITIZE_ROOT()                                                        
                    \
+    if (is_null_root()) {                                                      
                    \
+        return Status::InternalError("No root column, path {}", 
path.get_path());                  \
+    }                                                                          
                    \
+    if 
(!WhichDataType(remove_nullable(subcolumns.get_root()->data.get_least_common_type()))
       \
+                 .is_json()) {                                                 
                    \
+        return Status::InternalError(                                          
                    \
+                "Root column is not jsonb type but {}, path {}",               
                    \
+                
subcolumns.get_root()->data.get_least_common_type()->get_name(), 
path.get_path()); \
+    }
+
+Status ColumnObject::extract_root(const PathInData& path) {

Review Comment:
   warning: method 'extract_root' can be made const 
[readability-make-member-function-const]
   
   be/src/vec/columns/column_object.h:457:
   ```diff
   -     Status extract_root(const PathInData& path);
   +     Status extract_root(const PathInData& path) const;
   ```
   
   ```suggestion
   Status ColumnObject::extract_root(const PathInData& path) const {
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@
     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; }
 
     /// Checks that all subcolumns have consistent sizes.
     void check_consistency() const;
 
+    MutableColumnPtr get_root() {
+        if (subcolumns.empty() || 
is_nothing(subcolumns.get_root()->data.get_least_common_type())) {
+            return nullptr;
+        }
+        return 
subcolumns.get_mutable_root()->data.get_finalized_column_ptr()->assume_mutable();
+    }
+
+    bool serialize_one_row_to_string(int row, std::string* output) const;
+
+    bool serialize_one_row_to_string(int row, BufferWritable& output) const;
+
+    // serialize one row to json format
+    bool serialize_one_row_to_json_format(int row, rapidjson::StringBuffer* 
output,
+                                          bool* is_null) const;
+
+    // merge multiple sub sparse columns into root
+    void merge_sparse_to_root_column();
+
+    // ensure root node is a certain type
+    void ensure_root_node_type(const DataTypePtr& type);
+
+    // create jsonb root if missing
+    void create_root();
+
+    // create root with type and column if missing
+    void create_root(const DataTypePtr& type, MutableColumnPtr&& column);
+
+    // root is null or type nothing
+    bool is_null_root() const;
+
+    // Only single scalar root column
+    bool is_scalar_variant() const;
+
+    ColumnPtr get_root() const { return 
subcolumns.get_root()->data.get_finalized_column_ptr(); }
+
     bool has_subcolumn(const PathInData& key) const;
 
+    DataTypePtr get_root_type() const;
+
+    bool is_variant() const override { return true; }

Review Comment:
   warning: function 'is_variant' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] bool is_variant() const override { return true; }
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -188,23 +215,68 @@
     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; }
 
     /// Checks that all subcolumns have consistent sizes.
     void check_consistency() const;
 
+    MutableColumnPtr get_root() {
+        if (subcolumns.empty() || 
is_nothing(subcolumns.get_root()->data.get_least_common_type())) {
+            return nullptr;
+        }
+        return 
subcolumns.get_mutable_root()->data.get_finalized_column_ptr()->assume_mutable();
+    }
+
+    bool serialize_one_row_to_string(int row, std::string* output) const;
+
+    bool serialize_one_row_to_string(int row, BufferWritable& output) const;
+
+    // serialize one row to json format
+    bool serialize_one_row_to_json_format(int row, rapidjson::StringBuffer* 
output,
+                                          bool* is_null) const;
+
+    // merge multiple sub sparse columns into root
+    void merge_sparse_to_root_column();
+
+    // ensure root node is a certain type
+    void ensure_root_node_type(const DataTypePtr& type);
+
+    // create jsonb root if missing
+    void create_root();
+
+    // create root with type and column if missing
+    void create_root(const DataTypePtr& type, MutableColumnPtr&& column);
+
+    // root is null or type nothing
+    bool is_null_root() const;
+
+    // Only single scalar root column
+    bool is_scalar_variant() const;
+
+    ColumnPtr get_root() const { return 
subcolumns.get_root()->data.get_finalized_column_ptr(); }

Review Comment:
   warning: function 'get_root' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] ColumnPtr get_root() const { return 
subcolumns.get_root()->data.get_finalized_column_ptr(); }
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -341,12 +407,11 @@
 
     ColumnPtr filter(const Filter&, ssize_t) const override;
 
+    Status filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn* 
col_ptr) override;
+
     size_t filter(const Filter&) override;
 
-    ColumnPtr permute(const Permutation&, size_t) const override {
-        LOG(FATAL) << "should not call the method in column object";
-        return nullptr;
-    }
+    ColumnPtr permute(const Permutation&, size_t) const override;

Review Comment:
   warning: function 'permute' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] ColumnPtr permute(const Permutation&, size_t) const 
override;
   ```
   



##########
be/src/vec/columns/column_object.h:
##########
@@ -292,18 +360,16 @@
     // May throw execption
     void try_insert(const Field& field);
 
-    void try_insert_from(const IColumn& src, size_t n);
+    void insert_from(const IColumn& src, size_t n) override;
 
-    void try_insert_range_from(const IColumn& src, size_t start, size_t 
length);
+    void insert_range_from(const IColumn& src, size_t start, size_t length) 
override;
 
     void insert_default() override;
 
     // Revise this column to specified num_rows
     void revise_to(int num_rows);
 
-    [[noreturn]] ColumnPtr replicate(const Offsets& offsets) const override {
-        LOG(FATAL) << "should not call the method replicate in column object";
-    }
+    ColumnPtr replicate(const Offsets& offsets) const override;

Review Comment:
   warning: function 'replicate' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] ColumnPtr replicate(const Offsets& offsets) const override;
   ```
   



##########
be/src/vec/data_types/data_type_agg_state.h:
##########
@@ -78,6 +78,10 @@ class DataTypeAggState : public DataTypeString {
         return TPrimitiveType::AGG_STATE;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/columns/column_vector.h:
##########
@@ -421,6 +421,10 @@ class ColumnVector final : public 
COWHelper<ColumnVectorHelper, ColumnVector<T>>
     template <typename Type>
     ColumnPtr index_impl(const PaddedPODArray<Type>& indexes, size_t limit) 
const;
 
+    double get_ratio_of_default_rows(double sample_ratio) const override {

Review Comment:
   warning: function 'get_ratio_of_default_rows' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] double get_ratio_of_default_rows(double sample_ratio) 
const override {
   ```
   



##########
be/src/vec/columns/subcolumn_tree.h:
##########
@@ -53,6 +52,20 @@ class SubcolumnsTree {
 
         bool is_nested() const { return kind == NESTED; }
         bool is_scalar() const { return kind == SCALAR; }
+        bool is_scalar_without_children() const { return kind == SCALAR && 
children.empty(); }

Review Comment:
   warning: function 'is_scalar_without_children' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
           [[nodiscard]] bool is_scalar_without_children() const { return kind 
== SCALAR && children.empty(); }
   ```
   



##########
be/src/vec/core/field.h:
##########
@@ -658,6 +625,40 @@ class Field {
         }
     }
 
+private:
+    std::aligned_union_t<DBMS_MIN_FIELD_SIZE - sizeof(Types::Which), Null, 
UInt64, UInt128, Int64,
+                         Int128, Float64, String, JsonbField, Array, Tuple, 
Map, VariantMap,
+                         DecimalField<Decimal32>, DecimalField<Decimal64>, 
DecimalField<Decimal128>,
+                         DecimalField<Decimal128I>, BitmapValue, HyperLogLog, 
QuantileState>
+            storage;
+
+    Types::Which which;
+
+    /// Assuming there was no allocated state or it was deallocated (see 
destroy).
+    template <typename T>
+    void create_concrete(T&& x) {
+        using UnqualifiedType = std::decay_t<T>;
+
+        // In both Field and PODArray, small types may be stored as wider 
types,
+        // e.g. char is stored as UInt64. Field can return this extended value
+        // with get<StorageType>(). To avoid uninitialized results from get(),
+        // we must initialize the entire wide stored type, and not just the
+        // nominal type.
+        using StorageType = NearestFieldType<UnqualifiedType>;
+        new (&storage) StorageType(std::forward<T>(x));
+        which = TypeToEnum<UnqualifiedType>::value;
+    }
+
+    /// Assuming same types.
+    template <typename T>
+    void assign_concrete(T&& x) {
+        using JustT = std::decay_t<T>;
+        assert(which == TypeToEnum<JustT>::value);
+        JustT* MAY_ALIAS ptr = reinterpret_cast<JustT*>(&storage);
+        *ptr = std::forward<T>(x);
+    }
+
+private:

Review Comment:
   warning: redundant access specifier has the same accessibility as the 
previous access specifier [readability-redundant-access-specifiers]
   
   ```suggestion
   
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/vec/core/field.h:627:** previously declared here
   ```cpp
   private:
   ^
   ```
   
   </details>
   



##########
be/src/vec/data_types/data_type_date.h:
##########
@@ -51,6 +51,10 @@ class DataTypeDate final : public DataTypeNumberBase<Int64> {
     TPrimitiveType::type get_type_as_tprimitive_type() const override {
         return TPrimitiveType::DATE;
     }
+
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_array.h:
##########
@@ -64,6 +64,10 @@ class DataTypeArray final : public IDataType {
         return TPrimitiveType::ARRAY;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_date_time.h:
##########
@@ -78,6 +78,10 @@ class DataTypeDateTime final : public 
DataTypeNumberBase<Int64> {
         return TPrimitiveType::DATETIME;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_hll.h:
##########
@@ -61,6 +61,10 @@ class DataTypeHLL : public IDataType {
         return TPrimitiveType::HLL;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_bitmap.h:
##########
@@ -62,6 +62,10 @@ class DataTypeBitMap : public IDataType {
         return TPrimitiveType::OBJECT;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_fixed_length_object.h:
##########
@@ -58,6 +58,10 @@ class DataTypeFixedLengthObject final : public IDataType {
         return TPrimitiveType::INVALID_TYPE;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -172,6 +172,19 @@ class DataTypeDecimal final : public IDataType {
         __builtin_unreachable();
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_jsonb.h:
##########
@@ -58,6 +58,10 @@ class DataTypeJsonb final : public IDataType {
         return TPrimitiveType::JSONB;
     }
 
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



##########
be/src/vec/data_types/data_type_object.h:
##########
@@ -19,6 +19,7 @@
 // and modified by Doris
 
 #pragma once
+#include <gen_cpp/Exprs_types.h>

Review Comment:
   warning: 'gen_cpp/Exprs_types.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <gen_cpp/Exprs_types.h>
            ^
   ```
   



##########
be/src/vec/data_types/data_type_number_base.h:
##########
@@ -117,6 +117,32 @@ class DataTypeNumberBase : public IDataType {
         LOG(FATAL) << "__builtin_unreachable";
         __builtin_unreachable();
     }
+
+    doris::FieldType get_type_as_field_type() const override {

Review Comment:
   warning: function 'get_type_as_field_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::FieldType get_type_as_field_type() const override {
   ```
   



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