mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 20:42:04 +00:00
debugging
This commit is contained in:
parent
fa667b4543
commit
2d4216ecad
@ -499,6 +499,10 @@ QueryPipeline InterpreterInsertQuery::buildInsertSelectPipeline()
|
||||
InterpreterSelectWithUnionQuery interpreter_select(query.select, select_context, select_query_options);
|
||||
pipeline = interpreter_select.buildQueryPipeline();
|
||||
}
|
||||
|
||||
// auto resources = QueryPlanResourceHolder();
|
||||
// resources.interpreter_context.push_back(select_context);
|
||||
// pipeline.addResources(std::move(resources));
|
||||
}
|
||||
|
||||
pipeline.dropTotalsAndExtremes();
|
||||
@ -710,6 +714,12 @@ BlockIO InterpreterInsertQuery::execute()
|
||||
StoragePtr table = getTable(query);
|
||||
checkStorageSupportsTransactionsIfNeeded(table, getContext());
|
||||
|
||||
if (auto * dist_storage = dynamic_cast<StorageDistributed *>(table.get()))
|
||||
{
|
||||
LOG_DEBUG(getLogger("InsertQuery"),
|
||||
"dist_storage engine {} table name {}.{}", dist_storage->getName(), dist_storage->getStorageID().database_name, dist_storage->getStorageID().table_name);
|
||||
}
|
||||
|
||||
if (query.partition_by && !table->supportsPartitionBy())
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "PARTITION BY clause is not supported by storage");
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <Columns/ColumnConst.h>
|
||||
|
||||
#include "Common/logger_useful.h"
|
||||
#include <Common/threadPoolCallbackRunner.h>
|
||||
#include <Common/Macros.h>
|
||||
#include <Common/ProfileEvents.h>
|
||||
@ -106,6 +107,7 @@
|
||||
#include <IO/Operators.h>
|
||||
#include <IO/ConnectionTimeouts.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
#include <cassert>
|
||||
@ -1822,10 +1824,14 @@ void StorageDistributed::renameOnDisk(const String & new_path_to_table_data)
|
||||
|
||||
void StorageDistributed::delayInsertOrThrowIfNeeded() const
|
||||
{
|
||||
LOG_WARNING(log, "delayInsertOrThrowIfNeeded");
|
||||
|
||||
if (!distributed_settings.bytes_to_throw_insert &&
|
||||
!distributed_settings.bytes_to_delay_insert)
|
||||
return;
|
||||
|
||||
LOG_WARNING(log, "delayInsertOrThrowIfNeeded getContext() is null: {}", getContext() == nullptr);
|
||||
|
||||
UInt64 total_bytes = *totalBytes(getContext()->getSettingsRef());
|
||||
|
||||
if (distributed_settings.bytes_to_throw_insert && total_bytes > distributed_settings.bytes_to_throw_insert)
|
||||
|
Loading…
Reference in New Issue
Block a user