Copilot commented on code in PR #62179:
URL: https://github.com/apache/doris/pull/62179#discussion_r3056243760


##########
be/src/core/data_type_serde/data_type_number_serde.cpp:
##########
@@ -268,7 +270,8 @@ Status 
DataTypeNumberSerDe<T>::read_column_from_arrow(IColumn& column,
                     if constexpr (T == TYPE_DATETIMEV2 || T == 
TYPE_TIMESTAMPTZ) {
                         StringRef str_ref(raw_data, raw_data_len);
                         UInt64 val = 0;
-                        if (!try_read_int_text(val, str_ref)) {
+                        CastParameters params;
+                        if (!CastToInt::from_string<false>(str_ref, val, 
params)) {

Review Comment:
   `CastParameters params;` is allocated inside the per-element parsing path 
(and similarly in other branches in this function). If `read_column_from_arrow` 
processes large Arrow arrays, repeatedly constructing `CastParameters` can add 
measurable overhead. Consider hoisting `CastParameters params;` to an outer 
scope (per-batch/per-loop) and reusing it for each element.



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