HappenLee commented on code in PR #16159: URL: https://github.com/apache/doris/pull/16159#discussion_r1089911086
########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -303,6 +305,21 @@ struct DateTimeOp { reinterpret_cast<bool&>(null_map[i])); } } + static void vector_vector(const PaddedPODArray<FromType1>& vec_from0, + const PaddedPODArray<FromType2>& vec_from1, + PaddedPODArray<ToType>& vec_to) { + size_t size = vec_from0.size(); + vec_to.resize(size); + + bool valid = true; + for (size_t i = 0; i < size; ++i) { + // here reinterpret_cast is used to convert uint8& to bool&, + // otherwise it will be implicitly converted to bool, causing the rvalue to fail to match the lvalue. + // the same goes for the following. + vec_to[i] = Transform::execute(vec_from0[i], vec_from1[i], valid); Review Comment: check the assembly code to make sure the function can SIMD ? -- 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