github-actions[bot] commented on code in PR #28685: URL: https://github.com/apache/doris/pull/28685#discussion_r1431810332
########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -1057,15 +1032,11 @@ struct CurrentTimeImpl { size_t result, size_t input_rows_count) { auto col_to = ColumnVector<Float64>::create(); VecDateTimeValue dtv; - if (dtv.from_unixtime(context->state()->timestamp_ms() / 1000, - context->state()->timezone_obj())) { - double time = dtv.hour() * 3600l + dtv.minute() * 60l + dtv.second(); - time *= (1000 * 1000); - col_to->insert_data(const_cast<const char*>(reinterpret_cast<char*>(&time)), 0); - } else { - auto invalid_val = 0; - col_to->insert_data(const_cast<const char*>(reinterpret_cast<char*>(&invalid_val)), 0); - } + dtv.from_unixtime(context->state()->timestamp_ms() / 1000, + context->state()->timezone_obj()); + double time = dtv.hour() * 3600l + dtv.minute() * 60l + dtv.second(); Review Comment: warning: integer literal has suffix 'l', which is not uppercase [readability-uppercase-literal-suffix] ```suggestion double time = dtv.hour() * 3600L + dtv.minute() * 60l + dtv.second(); ``` ########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -1057,15 +1032,11 @@ size_t result, size_t input_rows_count) { auto col_to = ColumnVector<Float64>::create(); VecDateTimeValue dtv; - if (dtv.from_unixtime(context->state()->timestamp_ms() / 1000, - context->state()->timezone_obj())) { - double time = dtv.hour() * 3600l + dtv.minute() * 60l + dtv.second(); - time *= (1000 * 1000); - col_to->insert_data(const_cast<const char*>(reinterpret_cast<char*>(&time)), 0); - } else { - auto invalid_val = 0; - col_to->insert_data(const_cast<const char*>(reinterpret_cast<char*>(&invalid_val)), 0); - } + dtv.from_unixtime(context->state()->timestamp_ms() / 1000, + context->state()->timezone_obj()); + double time = dtv.hour() * 3600l + dtv.minute() * 60l + dtv.second(); Review Comment: warning: integer literal has suffix 'l', which is not uppercase [readability-uppercase-literal-suffix] ```suggestion double time = dtv.hour() * 3600l + dtv.minute() * 60L + dtv.second(); ``` -- 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