jacktengg commented on code in PR #39030:
URL: https://github.com/apache/doris/pull/39030#discussion_r1710633978


##########
be/src/vec/functions/function_string.h:
##########
@@ -3155,9 +3155,14 @@ class FunctionReplace : public IFunction {
 
         for (int i = 0; i < input_rows_count; ++i) {
             StringRef origin_str =
-                    assert_cast<const 
ColumnString*>(col_origin.get())->get_data_at(i);
-            StringRef old_str = assert_cast<const 
ColumnString*>(col_old.get())->get_data_at(i);
-            StringRef new_str = assert_cast<const 
ColumnString*>(col_new.get())->get_data_at(i);
+                    assert_cast<const ColumnString*, 
TypeCheckOnRelease::DISABLE>(col_origin.get())
+                            ->get_data_at(i);
+            StringRef old_str =
+                    assert_cast<const ColumnString*, 
TypeCheckOnRelease::DISABLE>(col_old.get())
+                            ->get_data_at(i);
+            StringRef new_str =
+                    assert_cast<const ColumnString*, 
TypeCheckOnRelease::DISABLE>(col_new.get())
+                            ->get_data_at(i);

Review Comment:
   `assert_cast` can be moved out before `for` loop and enable type check.



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