mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
adjusted the perftest
This commit is contained in:
parent
ab1b7267b6
commit
5c6bd218ad
@ -24,9 +24,9 @@ public:
|
||||
|
||||
using WeightRet = std::conditional_t<DecimalOrExtendedInt<Weight>, Float64, Weight>;
|
||||
const WeightRet weight = [&columns, row_num]() -> WeightRet {
|
||||
if constexpr(IsDecimalNumber<Weight>)
|
||||
if constexpr(IsDecimalNumber<Weight>) /// Unable to cast to double -> use the virtual method
|
||||
return columns[1]->getFloat64(row_num);
|
||||
else if constexpr(DecimalOrExtendedInt<Weight>)
|
||||
else if constexpr(DecimalOrExtendedInt<Weight>) /// Casting to double, otherwise += would be ambitious.
|
||||
return static_cast<Float64>(static_cast<const ColumnVector<Weight>&>(*columns[1]).getData()[row_num]);
|
||||
else
|
||||
return static_cast<const ColumnVector<Weight>&>(*columns[1]).getData()[row_num];
|
||||
|
@ -13,8 +13,8 @@
|
||||
INSERT INTO perf_avg(num)
|
||||
SELECT number / r
|
||||
FROM system.numbers
|
||||
ARRAY JOIN range(1, 1000000) AS r
|
||||
LIMIT 500000000
|
||||
ARRAY JOIN range(1, 10000) AS r
|
||||
LIMIT 5000000
|
||||
</fill_query>
|
||||
|
||||
<query>SELECT avg(num) FROM perf_avg</query>
|
||||
|
Loading…
Reference in New Issue
Block a user