提交 5bb0cde5 编写于 作者: C chertus

hotfix for Decimal.compareAt

上级 048fe08b
......@@ -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];
......
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;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册