rdblue commented on a change in pull request #1497:
URL: https://github.com/apache/iceberg/pull/1497#discussion_r493952200



##########
File path: 
mr/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java
##########
@@ -248,6 +258,26 @@ public void close() throws IOException {
       return iterable;
     }
 
+    @SuppressWarnings("unchecked")
+    private CloseableIterable<T> open(FileScanTask currentTask, Schema 
readSchema) {
+      CloseableIterable<T> iter;
+      switch (inMemoryDataModel) {
+        case PIG:
+        case HIVE:
+          // TODO implement value readers for Pig and Hive
+          throw new UnsupportedOperationException("Avro support not yet 
supported for Pig and Hive");
+        case GENERIC:
+          DeleteFilter deletes = new GenericDeleteFilter(io, currentTask, 
tableSchema, readSchema);
+          Schema requiredSchema = deletes.requiredSchema();
+          iter = deletes.filter(openTask(currentTask, requiredSchema));

Review comment:
       Why not return `deletes.filter(...)` here? That would remove the need 
for `iter` and `break`.




----------------------------------------------------------------
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.

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