| 132 | } |
| 133 | |
| 134 | void ClusterFunctionReadTaskResponse::deserialize(ReadBuffer & in) |
| 135 | { |
| 136 | size_t protocol_version = 0; |
| 137 | readVarUInt(protocol_version, in); |
| 138 | if (protocol_version < DBMS_CLUSTER_INITIAL_PROCESSING_PROTOCOL_VERSION || protocol_version > DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION) |
| 139 | { |
| 140 | throw Exception( |
| 141 | ErrorCodes::UNKNOWN_PROTOCOL, |
| 142 | "Supported protocol versions are in range [{}, {}], got: {}", |
| 143 | DBMS_CLUSTER_INITIAL_PROCESSING_PROTOCOL_VERSION, |
| 144 | DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION, |
| 145 | protocol_version); |
| 146 | } |
| 147 | |
| 148 | readStringBinary(path, in); |
| 149 | if (protocol_version >= DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_DATA_LAKE_METADATA) |
| 150 | { |
| 151 | DeserializedSetsRegistry registry; |
| 152 | auto transform = std::make_shared<ActionsDAG>(ActionsDAG::deserialize(in, registry, Context::getGlobalContextInstance())); |
| 153 | |
| 154 | if (!path.empty() && !transform->getInputs().empty()) |
| 155 | { |
| 156 | data_lake_metadata.schema_transform = std::move(transform); |
| 157 | } |
| 158 | if (protocol_version >= DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_EXCLUDED_ROWS) |
| 159 | { |
| 160 | data_lake_metadata.excluded_rows = std::make_shared<DataLakeObjectMetadata::ExcludedRows>(); |
| 161 | data_lake_metadata.excluded_rows->read(in); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | if (protocol_version >= DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_FILE_BUCKETS_INFO) |
| 166 | { |
| 167 | String format; |
| 168 | readStringBinary(format, in); |
| 169 | if (!format.empty()) |
| 170 | { |
| 171 | file_bucket_info = FormatFactory::instance().getFileBucketInfo(format); |
| 172 | file_bucket_info->deserialize(in); |
| 173 | } |
| 174 | } |
| 175 | if (protocol_version >= DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_ICEBERG_METADATA) |
| 176 | { |
| 177 | auto has_iceberg_metadata = false; |
| 178 | readVarUInt(has_iceberg_metadata, in); |
| 179 | if (has_iceberg_metadata) |
| 180 | { |
| 181 | iceberg_info = Iceberg::IcebergObjectSerializableInfo{}; |
| 182 | iceberg_info->deserializeForClusterFunctionProtocol(in, protocol_version); |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | } |
nothing calls this directly
no test coverage detected