Skip to content

Commit

Permalink
upd comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nickitat committed Feb 14, 2024
1 parent c2700c4 commit 4e5cfd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Interpreters/InterpreterInsertQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,10 @@ BlockIO InterpreterInsertQuery::execute()
auto table_id = table->getStorageID();
auto views = DatabaseCatalog::instance().getDependentViews(table_id);

/// TODO: should we really skip views or not? they have special `parallel_view_processing`, it should be enough?
pre_streams_size = !table->isView() && views.empty()
? settings.max_insert_threads
: std::min<size_t>(settings.max_insert_threads, pipeline.getNumStreams());
/// It breaks some views-related tests and we have dedicated `parallel_view_processing` for views, so let's just skip them.
const bool resize_to_max_insert_threads = !table->isView() && views.empty();
pre_streams_size = resize_to_max_insert_threads ? settings.max_insert_threads
: std::min<size_t>(settings.max_insert_threads, pipeline.getNumStreams());
if (table->supportsParallelInsert())
sink_streams_size = pre_streams_size;
}
Expand Down
1 change: 0 additions & 1 deletion src/Processors/Transforms/buildPushingToViewsChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ struct ViewsData
StorageID source_storage_id;
StorageMetadataPtr source_metadata_snapshot;
StoragePtr source_storage;
/// This value is actually only for logs.
size_t max_threads = 1;

/// In case of exception happened while inserting into main table, it is pushed to pipeline.
Expand Down

0 comments on commit 4e5cfd1

Please sign in to comment.