mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Update repeat.cpp
This commit is contained in:
parent
4465fdb8bf
commit
61b02598d7
@ -178,16 +178,18 @@ public:
|
|||||||
Impl::vectorConst(copy_str, repeat_time, col_res->getChars(), col_res->getOffsets());
|
Impl::vectorConst(copy_str, repeat_time, col_res->getChars(), col_res->getOffsets());
|
||||||
block.getByPosition(result).column = std::move(col_res);
|
block.getByPosition(result).column = std::move(col_res);
|
||||||
}
|
}
|
||||||
else if (!castType(block.getByPosition(arguments[1]).type.get(), [&](const auto & type)
|
else if (!castType(block.getByPosition(arguments[1]).type.get(), [&](const auto & type)
|
||||||
|
{
|
||||||
|
using DataType = std::decay_t<decltype(type)>;
|
||||||
|
using T0 = typename DataType::FieldType;
|
||||||
|
const ColumnVector<T0> * colnum = checkAndGetColumn<ColumnVector<T0>>(numcolumn.get());
|
||||||
|
auto col_res = ColumnString::create();
|
||||||
|
Impl::vectorNonConstInteger(copy_str, col_res->getChars(), col_res->getOffsets(), colnum->getData());
|
||||||
|
block.getByPosition(result).column = std::move(col_res);
|
||||||
|
return 0;
|
||||||
|
}))
|
||||||
{
|
{
|
||||||
using DataType = std::decay_t<decltype(type)>;
|
}
|
||||||
using T0 = typename DataType::FieldType;
|
|
||||||
const ColumnVector<T0> * colnum = checkAndGetColumn<ColumnVector<T0>>(numcolumn.get());
|
|
||||||
auto col_res = ColumnString::create();
|
|
||||||
Impl::vectorNonConstInteger(copy_str, col_res->getChars(), col_res->getOffsets(), colnum->getData());
|
|
||||||
block.getByPosition(result).column = std::move(col_res);
|
|
||||||
return 0;
|
|
||||||
}));
|
|
||||||
else
|
else
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Illegal column " + block.getByPosition(arguments[1]).column->getName() + " of argument of function " + getName(),
|
"Illegal column " + block.getByPosition(arguments[1]).column->getName() + " of argument of function " + getName(),
|
||||||
|
Loading…
Reference in New Issue
Block a user