| 276 | } |
| 277 | |
| 278 | bool 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 | |
| 306 | Status FileMetadataUtils::AdjustFieldIdForMigratedPartitionedTables(int *fieldID) const { |
| 307 | DCHECK(file_desc_ != nullptr); |
no test coverage detected