mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
hotfix for Decimal.compareAt
This commit is contained in:
parent
048fe08bde
commit
5bb0cde59c
@ -26,7 +26,7 @@ namespace ErrorCodes
|
||||
template <typename T>
|
||||
int ColumnDecimal<T>::compareAt(size_t n, size_t m, const IColumn & rhs_, int) const
|
||||
{
|
||||
auto other = static_cast<const Self &>(rhs_);
|
||||
auto & other = static_cast<const Self &>(rhs_);
|
||||
const T & a = data[n];
|
||||
const T & b = other.data[m];
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
1000000
|
||||
1000000
|
14
dbms/tests/queries/0_stateless/00880_decimal_in_key.sql
Normal file
14
dbms/tests/queries/0_stateless/00880_decimal_in_key.sql
Normal file
@ -0,0 +1,14 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
|
||||
CREATE TABLE t1 (str String, dec Decimal64(8)) ENGINE = MergeTree ORDER BY str;
|
||||
CREATE TABLE t2 (str String, dec Decimal64(8)) ENGINE = MergeTree ORDER BY dec;
|
||||
|
||||
INSERT INTO t1 SELECT toString(number), toDecimal64(number, 8) FROM system.numbers LIMIT 1000000;
|
||||
SELECT count() FROM t1;
|
||||
|
||||
INSERT INTO t2 SELECT toString(number), toDecimal64(number, 8) FROM system.numbers LIMIT 1000000;
|
||||
SELECT count() FROM t2;
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
Loading…
Reference in New Issue
Block a user