mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Remove unnecessary checks
This commit is contained in:
parent
e3e6c79d72
commit
b47a95bd4f
@ -123,27 +123,8 @@ StoragePtr TableFunctionObjectStorage<Definition, Configuration>::executeImpl(
|
||||
columns = cached_columns;
|
||||
|
||||
StoragePtr storage;
|
||||
|
||||
if (context->getClientInfo().query_kind == ClientInfo::QueryKind::SECONDARY_QUERY)
|
||||
{
|
||||
storage = std::make_shared<StorageObjectStorage>(
|
||||
configuration,
|
||||
getObjectStorage(context, !is_insert_query),
|
||||
context,
|
||||
StorageID(getDatabaseName(), table_name),
|
||||
columns,
|
||||
ConstraintsDescription{},
|
||||
/* comment */ String{},
|
||||
/* format_settings */ std::nullopt,
|
||||
/* mode */ LoadingStrictnessLevel::CREATE,
|
||||
/* distributed_processing */ true,
|
||||
/* partition_by */ nullptr);
|
||||
|
||||
storage->startup();
|
||||
return storage;
|
||||
}
|
||||
|
||||
const auto & settings = context->getSettingsRef();
|
||||
|
||||
auto parallel_replicas_cluster_name = settings[Setting::cluster_for_parallel_replicas].toString();
|
||||
auto can_use_parallel_replicas = settings[Setting::allow_experimental_parallel_reading_from_replicas] > 0
|
||||
&& settings[Setting::parallel_replicas_for_cluster_engines]
|
||||
|
@ -132,24 +132,6 @@ StoragePtr TableFunctionURL::getStorage(
|
||||
const String & source, const String & format_, const ColumnsDescription & columns, ContextPtr global_context,
|
||||
const std::string & table_name, const String & compression_method_) const
|
||||
{
|
||||
if (global_context->getClientInfo().query_kind == ClientInfo::QueryKind::SECONDARY_QUERY)
|
||||
{
|
||||
return std::make_shared<StorageURL>(
|
||||
source,
|
||||
StorageID(getDatabaseName(), table_name),
|
||||
format_,
|
||||
std::nullopt /*format settings*/,
|
||||
columns,
|
||||
ConstraintsDescription{},
|
||||
String{},
|
||||
global_context,
|
||||
compression_method_,
|
||||
configuration.headers,
|
||||
configuration.http_method,
|
||||
nullptr,
|
||||
/*distributed_processing*/ true);
|
||||
}
|
||||
|
||||
const auto & settings = global_context->getSettingsRef();
|
||||
auto parallel_replicas_cluster_name = settings[Setting::cluster_for_parallel_replicas].toString();
|
||||
auto can_use_parallel_replicas = settings[Setting::allow_experimental_parallel_reading_from_replicas] > 0
|
||||
|
Loading…
Reference in New Issue
Block a user