aokolnychyi commented on a change in pull request #2214:
URL: https://github.com/apache/iceberg/pull/2214#discussion_r599173369



##########
File path: core/src/main/java/org/apache/iceberg/io/DataWriter.java
##########
@@ -37,16 +38,23 @@
   private final PartitionSpec spec;
   private final StructLike partition;
   private final ByteBuffer keyMetadata;
+  private final SortOrder sortOrder;
   private DataFile dataFile = null;
 
   public DataWriter(FileAppender<T> appender, FileFormat format, String 
location,
                     PartitionSpec spec, StructLike partition, 
EncryptionKeyMetadata keyMetadata) {
+    this(appender, format, location, spec, partition, keyMetadata, null);
+  }
+
+  public DataWriter(FileAppender<T> appender, FileFormat format, String 
location,

Review comment:
       I was referring to the place where, for example, `SparkAppenderFactory` 
instantiates `DataWriter`:
   
   ```
     @Override
     public DataWriter<InternalRow> newDataWriter(EncryptedOutputFile file, 
FileFormat format, StructLike partition) {
       return new DataWriter<>(newAppender(file.encryptingOutputFile(), 
format), format,
           file.encryptingOutputFile().location(), spec, partition, 
file.keyMetadata());
     }
   ```
   
   Here we are using the constructor without sort order. I thought about a 
comment explaining why but I think we should do that later. We will eventually 
add sort order to classes like `SparkAppenderFactory` and then can add the 
comment.
   
   To sum up, ignore my original comment.




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