mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Debug prints
This commit is contained in:
parent
af7aa7de56
commit
b81e024c70
@ -34,9 +34,12 @@ public:
|
||||
|
||||
std::string getEngineName() const override { return DataLakeMetadata::name; }
|
||||
|
||||
void update(ObjectStoragePtr object_storage, ContextPtr local_context) override
|
||||
void update(ObjectStoragePtr object_storage, ContextPtr local_context, bool update_base) override
|
||||
{
|
||||
// BaseStorageConfiguration::update(object_storage, local_context);
|
||||
if (update_base)
|
||||
{
|
||||
BaseStorageConfiguratixon::update(object_storage, local_context);
|
||||
}
|
||||
auto new_metadata = DataLakeMetadata::create(object_storage, weak_from_this(), local_context);
|
||||
if (current_metadata && *current_metadata == *new_metadata)
|
||||
return;
|
||||
|
@ -76,16 +76,16 @@ void printConfiguration(const Poco::Util::AbstractConfiguration & config, std::s
|
||||
|
||||
for (const auto & key : keys)
|
||||
{
|
||||
std::string fullKey = prefix.empty() ? key : (prefix + "." + key);
|
||||
std::string full_key = prefix.empty() ? key : (prefix + "." + key);
|
||||
|
||||
if (config.hasProperty(fullKey))
|
||||
if (config.hasProperty(full_key))
|
||||
{
|
||||
std::string value = config.getString(fullKey);
|
||||
LOG_DEBUG(&Poco::Logger::get(log_name), "{} = {}", fullKey, value);
|
||||
std::string value = config.getString(full_key);
|
||||
LOG_DEBUG(&Poco::Logger::get(log_name), "{} = {}", full_key, value);
|
||||
}
|
||||
|
||||
// Recursively print sub-configurations
|
||||
printConfiguration(config, fullKey, log_name);
|
||||
printConfiguration(config, full_key, log_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ StorageObjectStorage::StorageObjectStorage(
|
||||
printConfiguration(context->getConfigRef(), "Storage create");
|
||||
try
|
||||
{
|
||||
// configuration->update(object_storage, context);
|
||||
configuration->update(object_storage, context);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -166,7 +166,7 @@ bool StorageObjectStorage::supportsSubsetOfColumns(const ContextPtr & context) c
|
||||
return FormatFactory::instance().checkIfFormatSupportsSubsetOfColumns(configuration->format, context, format_settings);
|
||||
}
|
||||
|
||||
void StorageObjectStorage::Configuration::update(ObjectStoragePtr object_storage_ptr, ContextPtr context)
|
||||
void StorageObjectStorage::Configuration::update(ObjectStoragePtr object_storage_ptr, ContextPtr context, [[maybe_unused]] bool update_base)
|
||||
{
|
||||
IObjectStorage::ApplyNewSettingsOptions options{.allow_client_change = !isStaticConfiguration()};
|
||||
object_storage_ptr->applyNewSettings(context->getConfigRef(), getTypeName() + ".", context, options);
|
||||
@ -309,7 +309,7 @@ void StorageObjectStorage::read(
|
||||
size_t max_block_size,
|
||||
size_t num_streams)
|
||||
{
|
||||
configuration->update(object_storage, local_context);
|
||||
configuration->update(object_storage, local_context, true);
|
||||
printConfiguration(local_context->getConfigRef(), "Select query");
|
||||
if (partition_by && configuration->withPartitionWildcard())
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
String compression_method = "auto";
|
||||
String structure = "auto";
|
||||
|
||||
virtual void update(ObjectStoragePtr object_storage, ContextPtr local_context);
|
||||
virtual void update(ObjectStoragePtr object_storage, ContextPtr local_context, [[maybe_unused]] bool update_base = false);
|
||||
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user