mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Removed wrong code from StorageSystemColumns #2447
This commit is contained in:
parent
2616dbcd42
commit
8fae37f5c7
@ -222,18 +222,6 @@ BlockInputStreams StorageSystemColumns::read(
|
||||
}
|
||||
}
|
||||
|
||||
/// Whe should exit quickly in case of LIMIT. This helps when we have extraordinarily huge number of tables.
|
||||
std::optional<UInt64> limit;
|
||||
{
|
||||
const ASTSelectQuery * select = typeid_cast<const ASTSelectQuery *>(query_info.query.get());
|
||||
if (!select)
|
||||
throw Exception("Logical error: not a SELECT query in StorageSystemColumns::read method", ErrorCodes::LOGICAL_ERROR);
|
||||
if (select->limit_length)
|
||||
limit = typeid_cast<const ASTLiteral &>(*select->limit_length).value.get<UInt64>();
|
||||
if (select->limit_offset)
|
||||
*limit += typeid_cast<const ASTLiteral &>(*select->limit_offset).value.get<UInt64>();
|
||||
}
|
||||
|
||||
Block block_to_filter;
|
||||
Storages storages;
|
||||
|
||||
@ -276,16 +264,6 @@ BlockInputStreams StorageSystemColumns::read(
|
||||
std::forward_as_tuple(iterator->table()));
|
||||
table_column_mut->insert(table_name);
|
||||
++offsets[i];
|
||||
|
||||
if (limit && offsets[i] >= *limit)
|
||||
break;
|
||||
}
|
||||
|
||||
if (limit && offsets[i] >= *limit)
|
||||
{
|
||||
offsets.resize(i);
|
||||
database_column = database_column->cut(0, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
@ -0,0 +1,11 @@
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 0);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 1);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 2);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 3);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 4);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 5);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 6);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 7);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 8);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 9);
|
||||
SELECT count() > 0 FROM (SELECT * FROM system.columns LIMIT 10);
|
@ -597,6 +597,60 @@ var results =
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"system": "ClickHouse, new",
|
||||
"version": "1.1.53960",
|
||||
"data_size": 1000000000,
|
||||
"time": "2016-06-01 03:00:00",
|
||||
"comments": "FORMAT Null",
|
||||
"result":
|
||||
[
|
||||
[0.820, 0.103, 0.097],
|
||||
[0.860, 0.077, 0.076],
|
||||
[1.776, 0.742, 0.723],
|
||||
[4.418, 0.441, 0.416],
|
||||
[4.261, 0.633, 0.618],
|
||||
[5.522, 1.694, 1.678],
|
||||
[0.801, 0.451, 0.451],
|
||||
[0.378, 0.084, 0.086],
|
||||
[6.379, 3.103, 3.130],
|
||||
[8.027, 3.948, 3.907],
|
||||
[4.930, 1.288, 1.283],
|
||||
[5.076, 1.494, 1.489],
|
||||
[8.181, 6.093, 6.239],
|
||||
[12.865, 8.096, 7.905],
|
||||
[9.805, 7.135, 6.997],
|
||||
[8.694, 7.291, 7.112],
|
||||
[23.345, 21.626, 21.695],
|
||||
[12.067, 10.538, 10.659],
|
||||
[52.284, 51.300, 52.484],
|
||||
[4.386, 0.444, 0.320],
|
||||
[25.900, 5.011, 4.898],
|
||||
[30.024, 5.966, 5.849],
|
||||
[56.410, 14.579, 14.214],
|
||||
[97.140, 7.581, 7.526],
|
||||
[11.892, 1.935, 1.910],
|
||||
[5.219, 1.633, 1.577],
|
||||
[11.970, 2.035, 1.988],
|
||||
[25.606, 6.115, 6.039],
|
||||
[25.057, 9.123, 8.976],
|
||||
[34.354, 36.880, 36.299],
|
||||
[11.716, 5.816, 5.795],
|
||||
[25.750, 9.693, 9.588],
|
||||
[75.355, 74.710, 74.406],
|
||||
[45.022, 37.971, 38.195],
|
||||
[46.898, 38.200, 37.922],
|
||||
[9.570, 9.053, 9.161],
|
||||
[0.546, 0.247, 0.245],
|
||||
[0.359, 0.063, 0.066],
|
||||
[0.546, 0.110, 0.098],
|
||||
[1.387, 0.446, 0.442],
|
||||
[0.447, 0.023, 0.029],
|
||||
[0.570, 0.020, 0.023],
|
||||
[0.214, 0.014, 0.014]
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"system": "Vertica",
|
||||
"version": "7.1.1",
|
||||
|
Loading…
Reference in New Issue
Block a user