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



##########
File path: 
data/src/test/java/org/apache/iceberg/data/TestMetricsRowGroupFilterTypes.java
##########
@@ -180,7 +180,7 @@ public void createOrcInputFile(List<Record> records) throws 
IOException {
     OutputFile outFile = Files.localOutput(ORC_FILE);
     try (FileAppender<Record> appender = ORC.write(outFile)
         .schema(FILE_SCHEMA)
-        .createWriterFunc(GenericOrcWriter::buildWriter)
+        .createWriterFunc(typeDesc -> 
GenericOrcWriter.buildWriter(FILE_SCHEMA, typeDesc))

Review comment:
       Since the schema is passed to the write builder, what about adding a 
`createWriterFunc` method that accepts `BiFunction<Schema, TypeDescription>`? 
Then this wouldn't need to change.
   
   We do this in Avro: 
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/avro/Avro.java#L199-L203
   
   That would cut down on the number of files that need to change in this PR.




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