Merge branch 'hashes_from_values_of_UUID_type' of https://github.com/millb/ClickHouse into hashes_from_values_of_UUID_type

This commit is contained in:
Mikhail Korotov 2019-11-19 14:42:20 +03:00
commit e66cd371c8
3 changed files with 12 additions and 3 deletions

View File

@ -727,9 +727,11 @@ private:
}
}
else
{
throw Exception("Illegal column " + column->getName()
+ " of argument of function " + getName(),
ErrorCodes::ILLEGAL_COLUMN);
+ " of argument of function " + getName(),
ErrorCodes::ILLEGAL_COLUMN);
}
}
template <typename T, bool first>
@ -751,6 +753,12 @@ private:
vec_to[i] = Impl::combineHashes(vec_to[i], h);
}
}
else
{
throw Exception("Illegal column " + column->getName()
+ " of first argument of function " + getName(),
ErrorCodes::ILLEGAL_COLUMN);
}
}
template <bool first>
@ -896,6 +904,7 @@ private:
throw Exception("Unexpected type " + from_type->getName() + " of argument of function " + getName(),
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
}
void executeForArgument(const IDataType * type, const IColumn * column, typename ColumnVector<ToType>::Container & vec_to, bool & is_first)
{
/// Flattening of tuples.

View File

@ -3,3 +3,4 @@ CREATE TABLE t_uuid (x UUID) ENGINE=TinyLog;
INSERT INTO t_uuid SELECT generateUUIDv4();
INSERT INTO t_uuid SELECT generateUUIDv4();
SELECT count() FROM t_uuid WHERE cityHash64(x) = cityHash64(toString(x));
DROP TABLE IF EXISTS t_uuid;

View File

@ -4,4 +4,3 @@ SELECT cityHash64(toDecimal128(128, 24)) = cityHash64(toString(toDecimal128(128,
SELECT count() FROM numbers(200, 2) WHERE cityHash64(toDecimal32(number, 4)) = cityHash64(toString(toDecimal32(number, 4)));
SELECT count() FROM numbers(2301, 2) WHERE cityHash64(toDecimal64(number, 6)) = cityHash64(toString(toDecimal64(number, 6)));
SELECT count() FROM numbers(2143, 2) WHERE cityHash64(toDecimal128(number, 10)) = cityHash64(toString(toDecimal128(number, 10)));