mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
tidy
This commit is contained in:
parent
36f62334c4
commit
503e7490d4
@ -98,7 +98,7 @@ void VirtualRowTransform::work()
|
||||
ColumnPtr current_column = type_and_name.type->createColumn();
|
||||
// ordered_columns.push_back(current_column->cloneResized(1));
|
||||
|
||||
if (j < index->size() && type_and_name.name == primary_key.column_names[j]
|
||||
if (j < index->size() && type_and_name.name == primary_key.column_names[j]
|
||||
&& type_and_name.type == primary_key.data_types[j])
|
||||
{
|
||||
auto column = current_column->cloneEmpty();
|
||||
|
@ -161,12 +161,6 @@ MergeTreeReadTask::BlockAndProgress MergeTreeReadTask::read(const BlockSizeParam
|
||||
|
||||
auto read_result = range_readers.main.read(rows_to_read, mark_ranges);
|
||||
|
||||
if (add_virtual_row)
|
||||
{
|
||||
/// Now we have the virtual row, which is at most once for each part.
|
||||
add_virtual_row = false;
|
||||
}
|
||||
|
||||
/// All rows were filtered. Repeat.
|
||||
if (read_result.num_rows == 0)
|
||||
read_result.columns.clear();
|
||||
|
@ -162,9 +162,6 @@ private:
|
||||
|
||||
/// Used to satistfy preferred_block_size_bytes limitation
|
||||
MergeTreeBlockSizePredictorPtr size_predictor;
|
||||
|
||||
/// If true, add once, and then set false.
|
||||
bool add_virtual_row = false;
|
||||
};
|
||||
|
||||
using MergeTreeReadTaskPtr = std::unique_ptr<MergeTreeReadTask>;
|
||||
|
@ -195,14 +195,14 @@ INSERT INTO tab VALUES (201, 'rick c01'), (202, 'mick c02'), (203, 'nick c03');
|
||||
SELECT name, type FROM system.data_skipping_indices WHERE table == 'tab' AND database = currentDatabase() LIMIT 1;
|
||||
|
||||
-- search full_text index
|
||||
SELECT * FROM tab WHERE s LIKE '%01%' ORDER BY k SETTINGS optimize_read_in_order = 0;
|
||||
SELECT * FROM tab WHERE s LIKE '%01%' ORDER BY k;
|
||||
|
||||
-- check the query only read 3 granules (6 rows total; each granule has 2 rows)
|
||||
SYSTEM FLUSH LOGS;
|
||||
SELECT read_rows==6 from system.query_log
|
||||
WHERE query_kind ='Select'
|
||||
AND current_database = currentDatabase()
|
||||
AND endsWith(trimRight(query), 'SELECT * FROM tab WHERE s LIKE \'%01%\' ORDER BY k SETTINGS optimize_read_in_order = 0;')
|
||||
AND endsWith(trimRight(query), 'SELECT * FROM tab WHERE s LIKE \'%01%\' ORDER BY k;')
|
||||
AND type='QueryFinish'
|
||||
AND result_rows==3
|
||||
LIMIT 1;
|
||||
|
Loading…
Reference in New Issue
Block a user