HappenLee commented on code in PR #48870: URL: https://github.com/apache/doris/pull/48870#discussion_r1989708197
########## be/src/vec/functions/date_time_transforms.h: ########## @@ -406,11 +407,33 @@ struct Transformer<FromType, ToType, ToYearImpl<FromType>> { auto* __restrict from_ptr = vec_from.data(); for (size_t i = 0; i < size; ++i) { - to_ptr[i] = ToYearImpl<FromType>::execute(from_ptr[i]); + to_ptr[i] = Impl<FromType>::execute(from_ptr[i]); } } }; +template <typename FromType, typename ToType> +struct Transformer<FromType, ToType, ToYearImpl<FromType>> { Review Comment: here better use `inheritance`, to reduce the code `struct Transformer<FromType, ToType, ToYearImpl<FromType>> : public TransformerYear<FromType, ToType, ToYearImpl<FromType>>` -- 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