openinx commented on a change in pull request #1197:
URL: https://github.com/apache/iceberg/pull/1197#discussion_r458510725
##########
File path: orc/src/main/java/org/apache/iceberg/orc/OrcValueWriter.java
##########
@@ -19,20 +19,28 @@
package org.apache.iceberg.orc;
-import java.io.IOException;
-import org.apache.orc.storage.ql.exec.vector.VectorizedRowBatch;
+import org.apache.orc.storage.ql.exec.vector.ColumnVector;
-/**
- * Write data value of a schema.
- */
public interface OrcValueWriter<T> {
+ Class<T> getJavaClass();
Review comment:
It's used for reading the field from `Record` and casting the value to
target class , see here:
https://github.com/apache/iceberg/pull/1197/files#diff-69c0f1e45966d2eb49a315fe32734cf5R125.
##########
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:
OK, that sounds good to me.
----------------------------------------------------------------
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]