rdblue commented on a change in pull request #139: ORC support integration for
Spark 2.4.0
URL: https://github.com/apache/incubator-iceberg/pull/139#discussion_r281735085
##########
File path: orc/src/main/java/org/apache/iceberg/orc/ORC.java
##########
@@ -65,15 +69,26 @@ public WriteBuilder config(String property, String value) {
return this;
}
+ public WriteBuilder createWriterFunc(Function<TypeDescription,
OrcValueWriter<?>> writerFunction) {
+ this.createWriterFunc = writerFunction;
+ return this;
+ }
+
+ public WriteBuilder setAll(Map<String, String> properties) {
+ properties.forEach(conf::set);
+ return this;
+ }
+
public WriteBuilder schema(Schema schema) {
this.schema = schema;
return this;
}
- public OrcFileAppender build() {
- OrcFile.WriterOptions options =
- OrcFile.writerOptions(conf);
- return new OrcFileAppender(schema, file, options, metadata);
+ public <D> FileAppender<D> build() {
Review comment:
It's probably a good idea, but not required. The requirement is that we can
get the file's Iceberg schema from its metadata, and I prefer to build that
from the file schema itself, plus the column IDs. That way, we don't have
problems from a faulty conversion in an old version.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]