MCPcopy Create free account
hub / github.com/apache/impala / PrepareCatalogUpdate

Method PrepareCatalogUpdate

be/src/runtime/dml-exec-state.cc:175–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175bool DmlExecState::PrepareCatalogUpdate(TUpdateCatalogRequest* catalog_update,
176 const TFinalizeParams& finalize_params) {
177 lock_guard<mutex> l(lock_);
178 for (const PartitionStatusMap::value_type& partition : per_partition_status_) {
179 TUpdatedPartition updatedPartition;
180 for (int i = 0; i < partition.second.created_files_size(); ++i) {
181 const DmlFileStatusPb& file = partition.second.created_files(i);
182 updatedPartition.files.push_back(file.final_path());
183 }
184 for (int i = 0; i < partition.second.created_delete_files_size(); ++i) {
185 const DmlFileStatusPb& file = partition.second.created_delete_files(i);
186 updatedPartition.files.push_back(file.final_path());
187 }
188 catalog_update->updated_partitions[partition.first] = updatedPartition;
189 }
190 if (finalize_params.__isset.iceberg_params
191 && finalize_params.iceberg_params.operation == TIcebergOperation::OPTIMIZE) {
192 return true;
193 }
194 return catalog_update->updated_partitions.size() != 0;
195}
196
197// Deletes data files and directories in 'path'. Keeps top-level
198// - hidden files

Callers 1

UpdateCatalogMethod · 0.80

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected