[Fix](from_unixtime) Keep consistent with MySQL & bug fix (#25966)
Bug fix: implicit convert from int32 -> int64 makes negative time stamp valid, so change signature to int64 Consistent: keep consistent with mysql.
This commit is contained in:
@ -179,9 +179,10 @@ TEST(VTimestampFunctionsTest, from_unix_test) {
|
||||
std::string func_name = "from_unixtime";
|
||||
TimezoneUtils::load_timezone_names();
|
||||
|
||||
InputTypeSet input_types = {TypeIndex::Int32};
|
||||
InputTypeSet input_types = {TypeIndex::Int64};
|
||||
|
||||
DataSet data_set = {{{1565080737}, std::string("2019-08-06 16:38:57")}, {{-123}, Null()}};
|
||||
DataSet data_set = {{{int64_t(1565080737)}, std::string("2019-08-06 16:38:57")},
|
||||
{{int64_t(-123)}, Null()}};
|
||||
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user