
select toDateTime64(-86400 ,9,'UTC') ==  1969-12-31 00:00:00.000000000

select toDateTime64(-86400.00 ,9,'UTC') ==  1970-01-01 00:00:00.000000000 


However, I expect both outputs to be same. 

Version affected : 22.8
{
        writeText(x, type->getScale(), wb, false);
        return ReturnType(true);
    }
};
template <typename FieldType, typename Name>
struct ConvertImpl<DataTypeEnum<FieldType>, DataTypeNumber<FieldType>, Name, ConvertDefaultBehaviorTag>
{
    static ColumnPtr execute(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t )
    {
        return arguments[0].column;
    }
};
static ColumnUInt8::MutablePtr copyNullMap(ColumnPtr col)
{
    ColumnUInt8::MutablePtr null_map = nullptr;
    if (const auto * col_null = checkAndGetColumn<ColumnNullable>(col.get()))
    {
        null_map = ColumnUInt8::create();
        null_map->insertRangeFrom(col_null->getNullMapColumn(), 0, col_null->size());
    }
    return null_map;
}
template <typename FromDataType, typename Name>
requires (!std::is_same_v<FromDataType, DataTypeString>)
struct ConvertImpl<FromDataType, DataTypeString, Name, ConvertDefaultBehaviorTag>
{
    using FromFieldType = typename FromDataType::FieldType;
    using ColVecType = ColumnVectorOrDecimal<FromFieldType>;
    static ColumnPtr execute(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t )