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

Method IsValuePartitionCol

be/src/exec/file-metadata-utils.cc:278–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278bool FileMetadataUtils::IsValuePartitionCol(const SlotDescriptor* slot_desc) {
279 DCHECK(file_desc_ != nullptr);
280 if (slot_desc->col_pos() < scan_node_->num_partition_keys() &&
281 !slot_desc->IsVirtual()) {
282 return true;
283 }
284
285 if (!scan_node_->hdfs_table()->IsIcebergTable()) return false;
286
287 using namespace org::apache::impala::fb;
288
289 const SchemaPath& path = slot_desc->col_path();
290 if (path.size() != 1) return false;
291
292 int field_id = scan_node_->hdfs_table()->col_descs()[path.front()].field_id();
293 auto transforms = IcebergPartitionTransforms();
294 if (transforms == nullptr) return false;
295 for (int i = 0; i < transforms->size(); ++i) {
296 auto transform = transforms->Get(i);
297 if (transform->source_id() == field_id &&
298 transform->transform_type() ==
299 FbIcebergTransformType::FbIcebergTransformType_IDENTITY) {
300 return true;
301 }
302 }
303 return false;
304}
305
306Status FileMetadataUtils::AdjustFieldIdForMigratedPartitionedTables(int *fieldID) const {
307 DCHECK(file_desc_ != nullptr);

Callers 1

IsPartitionKeySlotMethod · 0.80

Calls 9

col_posMethod · 0.80
num_partition_keysMethod · 0.80
IsVirtualMethod · 0.80
IsIcebergTableMethod · 0.80
hdfs_tableMethod · 0.80
field_idMethod · 0.80
frontMethod · 0.80
sizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected