mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
dbms: implemented method getExtremes for ColumnTuple [#METR-18474].
This commit is contained in:
parent
d5e8f3e427
commit
1eaa3cb309
@ -233,7 +233,13 @@ public:
|
||||
|
||||
void getExtremes(Field & min, Field & max) const override
|
||||
{
|
||||
throw Exception("Method getExtremes is not supported for " + getName(), ErrorCodes::NOT_IMPLEMENTED);
|
||||
size_t tuple_size = columns.size();
|
||||
|
||||
min = Array(tuple_size);
|
||||
max = Array(tuple_size);
|
||||
|
||||
for (size_t i = 0; i < tuple_size; ++i)
|
||||
columns[i]->getExtremes(min.get<Array &>()[i], max.get<Array &>()[i]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
0 (0,'2015-01-01')
|
||||
1 (1,'2015-01-02')
|
||||
2 (2,'2015-01-03')
|
||||
3 (3,'2015-01-04')
|
||||
4 (4,'2015-01-05')
|
||||
5 (5,'2015-01-06')
|
||||
6 (6,'2015-01-07')
|
||||
7 (7,'2015-01-08')
|
||||
8 (8,'2015-01-09')
|
||||
9 (9,'2015-01-10')
|
||||
|
||||
0 (0,'2015-01-01')
|
||||
9 (9,'2015-01-10')
|
1
dbms/tests/queries/0_stateless/00254_tuple_extremes.sql
Normal file
1
dbms/tests/queries/0_stateless/00254_tuple_extremes.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT number, (number, toDate('2015-01-01') + number) FROM system.numbers LIMIT 10 SETTINGS extremes = 1;
|
Loading…
Reference in New Issue
Block a user