Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Interpreters/ClusterFunctionReadTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ namespace ErrorCodes
namespace Setting
{
extern const SettingsBool cluster_function_process_archive_on_multiple_nodes;
extern const SettingsBool allow_experimental_iceberg_read_optimization;
}

ClusterFunctionReadTaskResponse::ClusterFunctionReadTaskResponse(ObjectInfoPtr object, const ContextPtr & context)
: iceberg_read_optimization_enabled(context->getSettingsRef()[Setting::allow_experimental_iceberg_read_optimization])
{
if (!object)
throw Exception(ErrorCodes::LOGICAL_ERROR, "`object` cannot be null");
Expand Down Expand Up @@ -67,7 +69,8 @@ void ClusterFunctionReadTaskResponse::serialize(WriteBuffer & out, size_t protoc

if (protocol_version >= DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_DATA_LAKE_COLUMNS_METADATA)
{
if (file_meta_info.has_value())
/// This info is not used when optimization is disabled, so there is no need to send it.
if (iceberg_read_optimization_enabled && file_meta_info.has_value())
file_meta_info.value()->serialize(out);
else
DataFileMetaInfo().serialize(out);
Expand Down
2 changes: 2 additions & 0 deletions src/Interpreters/ClusterFunctionReadTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ struct ClusterFunctionReadTaskResponse
/// File's columns info
std::optional<DataFileMetaInfoPtr> file_meta_info;

const bool iceberg_read_optimization_enabled = false;

/// Convert received response into ObjectInfo.
ObjectInfoPtr getObjectInfo() const;

Expand Down
Loading