yiguolei commented on code in PR #22694:
URL: https://github.com/apache/doris/pull/22694#discussion_r1287365537


##########
be/src/vec/functions/function_convert_tz.h:
##########
@@ -122,33 +120,44 @@ struct ConvertTZImpl {
                 result_column->insert_default();
                 continue;
             }
-            execute_inner_loop(date_column, time_zone_cache, from_tz, to_tz, 
result_column,
-                               result_null_map, i);
+            execute_inner_loop(date_column, time_zone_cache, cache_lock, 
from_tz, to_tz,
+                               result_column, result_null_map, i);
         }
     }
 
     static void execute_inner_loop(const ColumnType* date_column, ZoneList& 
time_zone_cache,

Review Comment:
   不要这么写,代码太复杂了,一个lock 
从头传到尾,非常容易死锁。在查询的代码里,大部分是不应该有lock的,因为我们的执行线程基本没有数据共享,这样才能保证高性能。
   如果需要拿到timezone,最好是在expr 初始化的时候,拿到timezone,然后放到function state里。



##########
be/src/vec/functions/function_convert_tz.h:
##########
@@ -122,33 +120,44 @@ struct ConvertTZImpl {
                 result_column->insert_default();
                 continue;
             }
-            execute_inner_loop(date_column, time_zone_cache, from_tz, to_tz, 
result_column,
-                               result_null_map, i);
+            execute_inner_loop(date_column, time_zone_cache, cache_lock, 
from_tz, to_tz,
+                               result_column, result_null_map, i);
         }
     }
 
     static void execute_inner_loop(const ColumnType* date_column, ZoneList& 
time_zone_cache,

Review Comment:
   不要这么写,代码太复杂了,一个lock 
从头传到尾,非常容易死锁。在查询的代码里,大部分是不应该有lock的,因为我们的执行线程基本没有数据共享,这样才能保证高性能。
   如果需要拿到timezone,最好是在expr 初始化的时候,拿到timezone,然后放到function state里。



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