This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 60f2be1e4ba3c90b41c6e28f0de6d62fb90f7864
Author: amory <[email protected]>
AuthorDate: Tue Aug 29 14:55:35 2023 +0800

    [FIX](serde) fix handle serde error #23565
---
 .../vec/data_types/serde/data_type_array_serde.h   |  6 ++--
 .../vec/data_types/serde/data_type_bitmap_serde.h  | 12 ++++----
 .../data_types/serde/data_type_date64_serde.cpp    |  3 +-
 .../data_types/serde/data_type_datetimev2_serde.h  |  2 +-
 .../data_types/serde/data_type_decimal_serde.cpp   |  6 ++--
 .../vec/data_types/serde/data_type_decimal_serde.h |  6 ++--
 .../serde/data_type_fixedlengthobject_serde.h      | 32 ++++++++++------------
 be/src/vec/data_types/serde/data_type_hll_serde.h  |  2 +-
 be/src/vec/data_types/serde/data_type_map_serde.h  |  6 ++--
 .../vec/data_types/serde/data_type_number_serde.h  |  6 ++--
 .../vec/data_types/serde/data_type_object_serde.h  | 32 ++++++++++------------
 .../serde/data_type_quantilestate_serde.h          | 16 +++++------
 .../vec/data_types/serde/data_type_struct_serde.h  | 15 ++++------
 13 files changed, 68 insertions(+), 76 deletions(-)

diff --git a/be/src/vec/data_types/serde/data_type_array_serde.h 
b/be/src/vec/data_types/serde/data_type_array_serde.h
index 222564de0e..46b9c851d3 100644
--- a/be/src/vec/data_types/serde/data_type_array_serde.h
+++ b/be/src/vec/data_types/serde/data_type_array_serde.h
@@ -52,12 +52,10 @@ public:
                                                const FormatOptions& options) 
const override;
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
                               int end) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
     Status read_column_from_pb(IColumn& column, const PValues& arg) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("read_column_from_pb with type " + 
column.get_name());
     }
 
     void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, 
Arena* mem_pool,
diff --git a/be/src/vec/data_types/serde/data_type_bitmap_serde.h 
b/be/src/vec/data_types/serde/data_type_bitmap_serde.h
index 3a36aad612..8bf532b4dc 100644
--- a/be/src/vec/data_types/serde/data_type_bitmap_serde.h
+++ b/be/src/vec/data_types/serde/data_type_bitmap_serde.h
@@ -46,14 +46,14 @@ public:
     }
     Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
                                           const FormatOptions& options) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_one_cell_from_text with type 
" +
+                                    column.get_name());
     }
     Status deserialize_column_from_text_vector(IColumn& column, 
std::vector<Slice>& slices,
                                                int* num_deserialized,
                                                const FormatOptions& options) 
const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_column_from_text_vector with 
type " +
+                                    column.get_name());
     }
 
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
@@ -68,12 +68,12 @@ public:
                                arrow::ArrayBuilder* array_builder, int start,
                                int end) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_column_to_arrow with type " + 
column.get_name());
     }
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
diff --git a/be/src/vec/data_types/serde/data_type_date64_serde.cpp 
b/be/src/vec/data_types/serde/data_type_date64_serde.cpp
index 6afe531eab..92d8513008 100644
--- a/be/src/vec/data_types/serde/data_type_date64_serde.cpp
+++ b/be/src/vec/data_types/serde/data_type_date64_serde.cpp
@@ -220,7 +220,8 @@ void DataTypeDate64SerDe::read_column_from_arrow(IColumn& 
column, const arrow::A
         const auto type = 
std::static_pointer_cast<arrow::TimestampType>(arrow_array->type());
         divisor = time_unit_divisor(type->unit());
         if (divisor == 0L) {
-            LOG(FATAL) << "Invalid Time Type:" << type->name();
+            throw doris::Exception(doris::ErrorCode::INVALID_ARGUMENT,
+                                   "Invalid Time Type: " + type->name());
         }
         for (size_t value_i = start; value_i < end; ++value_i) {
             VecDateTimeValue v;
diff --git a/be/src/vec/data_types/serde/data_type_datetimev2_serde.h 
b/be/src/vec/data_types/serde/data_type_datetimev2_serde.h
index f69924b25f..b45b6a304d 100644
--- a/be/src/vec/data_types/serde/data_type_datetimev2_serde.h
+++ b/be/src/vec/data_types/serde/data_type_datetimev2_serde.h
@@ -63,7 +63,7 @@ public:
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
diff --git a/be/src/vec/data_types/serde/data_type_decimal_serde.cpp 
b/be/src/vec/data_types/serde/data_type_decimal_serde.cpp
index e356b5dc0a..694418c8d9 100644
--- a/be/src/vec/data_types/serde/data_type_decimal_serde.cpp
+++ b/be/src/vec/data_types/serde/data_type_decimal_serde.cpp
@@ -150,7 +150,8 @@ void DataTypeDecimalSerDe<T>::write_column_to_arrow(const 
IColumn& column, const
                              array_builder->type()->name());
         }
     } else {
-        LOG(FATAL) << "Not support write " << column.get_name() << " to arrow";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "write_column_to_arrow with type " + 
column.get_name());
     }
 }
 
@@ -191,7 +192,8 @@ void 
DataTypeDecimalSerDe<T>::read_column_from_arrow(IColumn& column,
             column_data.emplace_back(*reinterpret_cast<const 
T*>(concrete_array->Value(value_i)));
         }
     } else {
-        LOG(FATAL) << "Not support read " << column.get_name() << " from 
arrow";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 }
 
diff --git a/be/src/vec/data_types/serde/data_type_decimal_serde.h 
b/be/src/vec/data_types/serde/data_type_decimal_serde.h
index ef016ea597..56a44e3561 100644
--- a/be/src/vec/data_types/serde/data_type_decimal_serde.h
+++ b/be/src/vec/data_types/serde/data_type_decimal_serde.h
@@ -172,7 +172,8 @@ void DataTypeDecimalSerDe<T>::write_one_cell_to_jsonb(const 
IColumn& column, Jso
         Decimal64::NativeType val = *reinterpret_cast<const 
Decimal64::NativeType*>(data_ref.data);
         result.writeInt64(val);
     } else {
-        LOG(FATAL) << "unknown Column " << column.get_name() << " for writing 
to jsonb";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "write_one_cell_to_jsonb with type " + 
column.get_name());
     }
 }
 
@@ -189,7 +190,8 @@ void 
DataTypeDecimalSerDe<T>::read_one_cell_from_jsonb(IColumn& column,
     } else if constexpr (std::is_same_v<T, Decimal<Int64>>) {
         col.insert_value(static_cast<const JsonbInt64Val*>(arg)->val());
     } else {
-        LOG(FATAL) << "unknown jsonb " << arg->typeName() << " for writing to 
column";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "read_one_cell_from_jsonb with type " + 
column.get_name());
     }
 }
 } // namespace vectorized
diff --git a/be/src/vec/data_types/serde/data_type_fixedlengthobject_serde.h 
b/be/src/vec/data_types/serde/data_type_fixedlengthobject_serde.h
index aa357aeb80..46928bdb99 100644
--- a/be/src/vec/data_types/serde/data_type_fixedlengthobject_serde.h
+++ b/be/src/vec/data_types/serde/data_type_fixedlengthobject_serde.h
@@ -39,68 +39,64 @@ public:
     void serialize_one_cell_to_text(const IColumn& column, int row_num, 
BufferWritable& bw,
                                     FormatOptions& options) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_one_cell_to_text with type " + 
column.get_name());
     }
 
     void serialize_column_to_text(const IColumn& column, int start_idx, int 
end_idx,
                                   BufferWritable& bw, FormatOptions& options) 
const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_column_to_text with type " + 
column.get_name());
     }
     Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
                                           const FormatOptions& options) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_one_cell_from_text with type 
" +
+                                    column.get_name());
     }
 
     Status deserialize_column_from_text_vector(IColumn& column, 
std::vector<Slice>& slices,
                                                int* num_deserialized,
                                                const FormatOptions& options) 
const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_column_from_text_vector with 
type " +
+                                    column.get_name());
     }
 
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
                               int end) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
     Status read_column_from_pb(IColumn& column, const PValues& arg) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("read_column_from_pb with type " + 
column.get_name());
     };
     void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, 
Arena* mem_pool,
                                  int32_t col_id, int row_num) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_one_cell_to_jsonb with type " + 
column.get_name());
     }
 
     void read_one_cell_from_jsonb(IColumn& column, const JsonbValue* arg) 
const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_one_cell_from_jsonb with type " + 
column.get_name());
     }
     void write_column_to_arrow(const IColumn& column, const NullMap* null_map,
                                arrow::ArrayBuilder* array_builder, int start,
                                int end) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_column_to_arrow with type " + 
column.get_name());
     }
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
                                  int row_idx, bool col_const) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_mysql with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<false>& 
row_buffer,
                                  int row_idx, bool col_const) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
 };
 } // namespace vectorized
diff --git a/be/src/vec/data_types/serde/data_type_hll_serde.h 
b/be/src/vec/data_types/serde/data_type_hll_serde.h
index 46f90fc20c..b7bae1302a 100644
--- a/be/src/vec/data_types/serde/data_type_hll_serde.h
+++ b/be/src/vec/data_types/serde/data_type_hll_serde.h
@@ -56,7 +56,7 @@ public:
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
diff --git a/be/src/vec/data_types/serde/data_type_map_serde.h 
b/be/src/vec/data_types/serde/data_type_map_serde.h
index e90ba11f29..05c129114a 100644
--- a/be/src/vec/data_types/serde/data_type_map_serde.h
+++ b/be/src/vec/data_types/serde/data_type_map_serde.h
@@ -51,12 +51,10 @@ public:
                                                const FormatOptions& options) 
const override;
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
                               int end) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
     Status read_column_from_pb(IColumn& column, const PValues& arg) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("read_column_from_pb with type " + 
column.get_name());
     }
     void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, 
Arena* mem_pool,
                                  int32_t col_id, int row_num) const override;
diff --git a/be/src/vec/data_types/serde/data_type_number_serde.h 
b/be/src/vec/data_types/serde/data_type_number_serde.h
index 1e27ef03d1..cfe84a4f8f 100644
--- a/be/src/vec/data_types/serde/data_type_number_serde.h
+++ b/be/src/vec/data_types/serde/data_type_number_serde.h
@@ -235,7 +235,8 @@ void 
DataTypeNumberSerDe<T>::read_one_cell_from_jsonb(IColumn& column,
     } else if constexpr (std::is_same_v<T, double>) {
         col.insert_value(static_cast<const JsonbDoubleVal*>(arg)->val());
     } else {
-        LOG(FATAL) << "unknown jsonb type " << arg->typeName() << " for 
writing to column";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "read_one_cell_from_jsonb with type '{}'", 
arg->typeName());
     }
 }
 template <typename T>
@@ -271,7 +272,8 @@ void DataTypeNumberSerDe<T>::write_one_cell_to_jsonb(const 
IColumn& column,
         double val = *reinterpret_cast<const double*>(data_ref.data);
         result.writeDouble(val);
     } else {
-        LOG(FATAL) << "unknown column type " << column.get_name() << " for 
writing to jsonb";
+        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
+                               "write_one_cell_to_jsonb with type " + 
column.get_name());
     }
 }
 
diff --git a/be/src/vec/data_types/serde/data_type_object_serde.h 
b/be/src/vec/data_types/serde/data_type_object_serde.h
index 3dddc06113..dc42176779 100644
--- a/be/src/vec/data_types/serde/data_type_object_serde.h
+++ b/be/src/vec/data_types/serde/data_type_object_serde.h
@@ -39,68 +39,64 @@ public:
     void serialize_one_cell_to_text(const IColumn& column, int row_num, 
BufferWritable& bw,
                                     FormatOptions& options) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_one_cell_to_text with type " + 
column.get_name());
     }
 
     void serialize_column_to_text(const IColumn& column, int start_idx, int 
end_idx,
                                   BufferWritable& bw, FormatOptions& options) 
const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_column_to_text with type " + 
column.get_name());
     }
     Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
                                           const FormatOptions& options) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_one_cell_from_text with type 
" +
+                                    column.get_name());
     }
     Status deserialize_column_from_text_vector(IColumn& column, 
std::vector<Slice>& slices,
                                                int* num_deserialized,
                                                const FormatOptions& options) 
const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_column_from_text_vector with 
type " +
+                                    column.get_name());
     }
 
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
                               int end) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
     Status read_column_from_pb(IColumn& column, const PValues& arg) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("read_column_from_pb with type " + 
column.get_name());
     }
     void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, 
Arena* mem_pool,
                                  int32_t col_id, int row_num) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_one_cell_to_jsonb with type " + 
column.get_name());
     }
 
     void read_one_cell_from_jsonb(IColumn& column, const JsonbValue* arg) 
const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_one_cell_from_jsonb with type " + 
column.get_name());
     }
 
     void write_column_to_arrow(const IColumn& column, const NullMap* null_map,
                                arrow::ArrayBuilder* array_builder, int start,
                                int end) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_column_to_arrow with type " + 
column.get_name());
     }
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
                                  int row_idx, bool col_const) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_mysql with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<false>& 
row_buffer,
                                  int row_idx, bool col_const) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_mysql with type " + 
column.get_name());
     }
 };
 } // namespace vectorized
diff --git a/be/src/vec/data_types/serde/data_type_quantilestate_serde.h 
b/be/src/vec/data_types/serde/data_type_quantilestate_serde.h
index 4c9dae672b..e9fe7a8a5d 100644
--- a/be/src/vec/data_types/serde/data_type_quantilestate_serde.h
+++ b/be/src/vec/data_types/serde/data_type_quantilestate_serde.h
@@ -43,25 +43,25 @@ public:
     void serialize_one_cell_to_text(const IColumn& column, int row_num, 
BufferWritable& bw,
                                     FormatOptions& options) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_one_cell_to_text with type " + 
column.get_name());
     }
 
     void serialize_column_to_text(const IColumn& column, int start_idx, int 
end_idx,
                                   BufferWritable& bw, FormatOptions& options) 
const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "serialize_column_to_text with type " + 
column.get_name());
     }
     Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
                                           const FormatOptions& options) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_one_cell_from_text with type 
" +
+                                    column.get_name());
     }
 
     Status deserialize_column_from_text_vector(IColumn& column, 
std::vector<Slice>& slices,
                                                int* num_deserialized,
                                                const FormatOptions& options) 
const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_column_from_text_vector with 
type " +
+                                    column.get_name());
     }
 
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
@@ -76,12 +76,12 @@ public:
                                arrow::ArrayBuilder* array_builder, int start,
                                int end) const override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "write_column_to_arrow with type " + 
column.get_name());
     }
     void read_column_from_arrow(IColumn& column, const arrow::Array* 
arrow_array, int start,
                                 int end, const cctz::time_zone& ctz) const 
override {
         throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+                               "read_column_from_arrow with type " + 
column.get_name());
     }
 
     Status write_column_to_mysql(const IColumn& column, MysqlRowBuffer<true>& 
row_buffer,
diff --git a/be/src/vec/data_types/serde/data_type_struct_serde.h 
b/be/src/vec/data_types/serde/data_type_struct_serde.h
index 33d14c7411..ec36e12ebb 100644
--- a/be/src/vec/data_types/serde/data_type_struct_serde.h
+++ b/be/src/vec/data_types/serde/data_type_struct_serde.h
@@ -53,25 +53,22 @@ public:
 
     Status deserialize_one_cell_from_text(IColumn& column, Slice& slice,
                                           const FormatOptions& options) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "deserialize_one_cell_from_text with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_one_cell_from_text with type 
" +
+                                    column.get_name());
     }
 
     Status deserialize_column_from_text_vector(IColumn& column, 
std::vector<Slice>& slices,
                                                int* num_deserialized,
                                                const FormatOptions& options) 
const override {
-        throw doris::Exception(
-                ErrorCode::NOT_IMPLEMENTED_ERROR,
-                "deserialize_column_from_text_vector with type " + 
column.get_name());
+        return Status::NotSupported("deserialize_column_from_text_vector with 
type " +
+                                    column.get_name());
     }
     Status write_column_to_pb(const IColumn& column, PValues& result, int 
start,
                               int end) const override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "write_column_to_pb with type " + 
column.get_name());
+        return Status::NotSupported("write_column_to_pb with type " + 
column.get_name());
     }
     Status read_column_from_pb(IColumn& column, const PValues& arg) const 
override {
-        throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
-                               "read_column_from_pb with type " + 
column.get_name());
+        return Status::NotSupported("read_column_from_pb with type " + 
column.get_name());
     }
     void write_one_cell_to_jsonb(const IColumn& column, JsonbWriter& result, 
Arena* mem_pool,
                                  int32_t col_id, int row_num) const override;


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

Reply via email to