mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
clickhouse: fixed unhex function [#CONV-6788].
This commit is contained in:
parent
be85c7ba2b
commit
215cc0a8c1
@ -468,7 +468,7 @@ public:
|
||||
/// Выполнить функцию над блоком.
|
||||
void execute(Block & block, const ColumnNumbers & arguments, size_t result)
|
||||
{
|
||||
const ColumnPtr column = &*block.getByPosition(arguments[0]).column;
|
||||
const ColumnPtr column = block.getByPosition(arguments[0]).column;
|
||||
|
||||
if (const ColumnString * col = dynamic_cast<const ColumnString *>(&*column))
|
||||
{
|
||||
@ -520,5 +520,5 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@ -34,9 +34,10 @@ public:
|
||||
|
||||
const IDataType * type = &*arguments[0];
|
||||
|
||||
if (!type->isNumeric() ||
|
||||
dynamic_cast<const DataTypeFloat32 *>(type) ||
|
||||
dynamic_cast<const DataTypeFloat64 *>(type))
|
||||
if (!dynamic_cast<DataTypeUInt8>(type) &&
|
||||
!dynamic_cast<DataTypeUInt16>(type) &&
|
||||
!dynamic_cast<DataTypeUInt32>(type) &&
|
||||
!dynamic_cast<DataTypeUInt64>(type))
|
||||
throw Exception("Cannot format " + type->getName() + " as bitmask string", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
||||
|
||||
return new DataTypeString;
|
||||
|
Loading…
Reference in New Issue
Block a user