Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hey-kong committed Jun 28, 2022
1 parent 9634041 commit eab7c7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dbms/src/Functions/FunctionsDuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ DataTypePtr FunctionMyDurationToSec<Impl>::getReturnTypeImpl(const ColumnsWithTy
if (!arguments[0].type->isMyTime())
{
throw Exception(
fmt::format("Illegal type {} of first argument of function {}", arguments[0].type->getName(), getName()),
fmt::format("Illegal type {} of the first argument of function {}", arguments[0].type->getName(), getName()),
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
}
return std::make_shared<DataTypeInt64>();
Expand All @@ -117,7 +117,7 @@ void FunctionMyDurationToSec<Impl>::executeImpl(Block & block, const ColumnNumbe
{
throw Exception(
fmt::format(
"Illegal column {} of first argument of function {}",
"Illegal column {} of the first argument of function {}",
block.getByPosition(arguments[0]).column->getName(),
name),
ErrorCodes::ILLEGAL_COLUMN);
Expand All @@ -132,7 +132,7 @@ void FunctionMyDurationToSec<Impl>::executeImpl(Block & block, const ColumnNumbe
auto col_to = ColumnVector<Int64>::create(size);
typename ColumnVector<Int64>::Container & vec_to = col_to->getData();

for (size_t i = 0; i < vec_from.size(); ++i)
for (size_t i = 0; i < size; ++i)
{
MyDuration val(vec_from[i], from_type->getFsp());
vec_to[i] = Impl::apply(val);
Expand All @@ -142,7 +142,7 @@ void FunctionMyDurationToSec<Impl>::executeImpl(Block & block, const ColumnNumbe
else
throw Exception(
fmt::format(
"Illegal column {} of first argument of function {}",
"Illegal column {} of the first argument of function {}",
block.getByPosition(arguments[0]).column->getName(),
name),
ErrorCodes::ILLEGAL_COLUMN);
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Functions/tests/gtest_duration_pushdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ try
std::random_device rd;
std::default_random_engine gen = std::default_random_engine(rd());
std::uniform_int_distribution<int> sign_dis(0, 1), hour_dis(0, 838), minute_dis(0, 59), second_dis(0, 59), microSecond_dis(0, 999999);
for (int i = 0; i < rowNum; i++)
for (int i = 0; i < rowNum; ++i)
{
auto sign = (sign_dis(gen) == 0) ? 1 : -1;
auto hour = hour_dis(gen);
Expand Down

0 comments on commit eab7c7b

Please sign in to comment.