kbendick commented on a change in pull request #2935:
URL: https://github.com/apache/iceberg/pull/2935#discussion_r683756441



##########
File path: orc/src/main/java/org/apache/iceberg/data/orc/GenericOrcWriters.java
##########
@@ -531,6 +543,32 @@ public void nonNullWrite(int rowId, Map<K, V> map, 
ColumnVector output) {
     }
   }
 
+  private static class PositionDeleteWriter implements 
OrcRowWriter<PositionDelete<Record>> {
+    private final OrcRowWriter<Record> rowWriter;
+    private final GenericRecord record;
+
+    PositionDeleteWriter(Schema deleteSchema, OrcRowWriter rowWriter) {
+      this.rowWriter = rowWriter != null ?
+          rowWriter : GenericOrcWriter.buildWriter(deleteSchema, 
ORCSchemaUtil.convert(deleteSchema));
+      this.record = GenericRecord.create(deleteSchema);
+    }
+
+    @Override
+    public void write(PositionDelete<Record> row, VectorizedRowBatch output) 
throws IOException {
+      record.set(0, row.path());

Review comment:
       Nit / non-blocking: Do we have a named constant for the 0 / 1 record 
position (for `path` and `pos` and I guess `row` for 2)?
   
   If we have that elsewhere, would be nice to see it used. 




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