Mryange commented on code in PR #56402:
URL: https://github.com/apache/doris/pull/56402#discussion_r2375341950


##########
be/src/vec/data_types/data_type.cpp:
##########
@@ -210,7 +210,11 @@ std::string IDataType::to_string(const IColumn& column, 
size_t row_num) const {
     auto serde = get_serde();
     auto tmp_col = ColumnString::create();
     BufferWriter write_buffer(*tmp_col);
-    serde->to_string(*ptr, row_num, write_buffer);
+    try {
+        serde->to_string(*ptr, row_num, write_buffer);
+    } catch (const Exception& e) {
+        return get_name() + "<to_string throw exception: " + e.what() + ">";

Review Comment:
   因为我们过去有很多这种代码
   ```C++
       std::string to_string(const IColumn& column, size_t row_num) const 
override {
           return "QuantileState()";
       }
   ```
   不过感觉也没必要这么保险,直接报错也可以。



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