HappenLee commented on code in PR #23902: URL: https://github.com/apache/doris/pull/23902#discussion_r1316663394
########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -1104,6 +1104,62 @@ struct SecToTimeImpl { return Status::OK(); } }; +struct MicroSec { + static constexpr auto name = "from_microsecond"; + static constexpr Int64 ratio = 1000000; +}; +struct MilliSec { + static constexpr auto name = "from_millisecond"; + static constexpr Int64 ratio = 1000; +}; +struct Sec { + static constexpr auto name = "from_second"; + static constexpr Int64 ratio = 1; +}; +template <typename impl> +struct TimestampToDateTime : IFunction { + using ReturnType = DataTypeDateTimeV2; + static constexpr auto name = impl::name; + static constexpr Int64 ratio_to_micro = (1000 * 1000) / impl::ratio; + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 0; } Review Comment: 0 ? 1? -- 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