mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
minor changes
This commit is contained in:
parent
c590a74981
commit
b700d7c7db
@ -86,7 +86,7 @@ template <typename T>
|
||||
void DataTypeDecimal<T>::serializeBinary(const Field & field, WriteBuffer & ostr) const
|
||||
{
|
||||
/// ColumnType::value_type is a narrower type. For example, UInt8, when the Field type is UInt64
|
||||
typename ColumnType::value_type x = get<FieldType>(field);
|
||||
typename ColumnType::value_type x = get<typename NearestFieldType<FieldType>::Type>(field);
|
||||
writeBinary(x, ostr);
|
||||
}
|
||||
|
||||
|
@ -21,3 +21,7 @@
|
||||
0 0 0.00000
|
||||
0 0 0.00000
|
||||
42 42 42.42000
|
||||
1 0
|
||||
1 0
|
||||
1 0
|
||||
1 0
|
||||
|
@ -44,4 +44,7 @@ SELECT least(a, b), least(a, g), greatest(a, b), greatest(a, g) FROM test.decima
|
||||
SELECT least(a, 0), least(b, 0), least(g, 0) FROM test.decimal ORDER BY a;
|
||||
SELECT greatest(a, 0), greatest(b, 0), greatest(g, 0) FROM test.decimal ORDER BY a;
|
||||
|
||||
SELECT (a, d, g) = (b, e, h), (a, d, g) != (b, e, h) FROM test.decimal ORDER BY a;
|
||||
SELECT (a, d, g) = (c, f, i), (a, d, g) != (c, f, i) FROM test.decimal ORDER BY a;
|
||||
|
||||
DROP TABLE IF EXISTS test.decimal;
|
||||
|
Loading…
Reference in New Issue
Block a user