pvary commented on a change in pull request #2701:
URL: https://github.com/apache/hive/pull/2701#discussion_r724401618



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java
##########
@@ -214,18 +218,27 @@ public void initialize(InputSplit split, 
TaskAttemptContext newContext) {
       this.reuseContainers = 
conf.getBoolean(InputFormatConfig.REUSE_CONTAINERS, false);
       this.inMemoryDataModel = 
conf.getEnum(InputFormatConfig.IN_MEMORY_DATA_MODEL,
               InputFormatConfig.InMemoryDataModel.GENERIC);
-      this.currentIterator = open(tasks.next(), expectedSchema).iterator();
+      // save the scanTask to retrieve the file path
+      this.currentScanTask = tasks.next();
+      this.currentIterator = open(currentScanTask, expectedSchema).iterator();
     }
 
     @Override
     public boolean nextKeyValue() throws IOException {
       while (true) {
         if (currentIterator.hasNext()) {
           current = currentIterator.next();
+          Object position = ((GenericRecord) 
current).getField(MetadataColumns.ROW_POSITION.name());
+          if (position != null) {
+            // hacky way to propagate the data to 
MapOperator#populateVirtualColumnValues
+            System.setProperty("delete_file_path", 
currentScanTask.file().path().toString());

Review comment:
       This is terrible 🗡️ 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to