hililiwei commented on a change in pull request #4291:
URL: https://github.com/apache/iceberg/pull/4291#discussion_r824411966
##########
File path: orc/src/main/java/org/apache/iceberg/orc/ORC.java
##########
@@ -153,30 +154,46 @@ public WriteBuilder metricsConfig(MetricsConfig
newMetricsConfig) {
}
// supposed to always be a private method used strictly by data and delete
write builders
- private WriteBuilder createContextFunc(Function<Configuration, Context>
newCreateContextFunc) {
+ private WriteBuilder createContextFunc(Function<Map<String, String>,
Context> newCreateContextFunc) {
this.createContextFunc = newCreateContextFunc;
return this;
}
public <D> FileAppender<D> build() {
Preconditions.checkNotNull(schema, "Schema is required");
+ Configuration conf;
+ if (file instanceof HadoopOutputFile) {
+ conf = ((HadoopOutputFile) file).getConf();
+ } else {
+ conf = new Configuration();
+ }
+
+ for (Map.Entry<String, String> entry : config.entrySet()) {
+ conf.set(entry.getKey(), entry.getValue());
+ }
+
+ // for compatibility
+ if (conf.get(VECTOR_ROW_BATCH_SIZE) != null &&
config.get(TableProperties.ORC_VECTOR_ROW_BATCH_SIZE) == null) {
+ config.put(TableProperties.ORC_VECTOR_ROW_BATCH_SIZE,
conf.get(VECTOR_ROW_BATCH_SIZE));
+ }
Review comment:
Get the value from the Hadoop conf for compatibility. @openinx
--
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]