openinx commented on a change in pull request #4384:
URL: https://github.com/apache/iceberg/pull/4384#discussion_r833964212
##########
File path: orc/src/main/java/org/apache/iceberg/orc/ORC.java
##########
@@ -162,11 +162,9 @@ private WriteBuilder
createContextFunc(Function<Map<String, String>, Context> ne
public <D> FileAppender<D> build() {
Preconditions.checkNotNull(schema, "Schema is required");
- Configuration conf;
+ Configuration conf = new Configuration();
if (file instanceof HadoopOutputFile) {
- conf = ((HadoopOutputFile) file).getConf();
- } else {
- conf = new Configuration();
+ ((HadoopOutputFile) file).getConf().forEach(entry ->
conf.set(entry.getKey(), entry.getValue()));
Review comment:
Seems we will merge the hadoop file's configuration with the default
environment configuration by default if it's a `HadoopOutputFile`, right ?
Should we just use the original code piece ( according to
[here](https://github.com/apache/iceberg/pull/4291/files#diff-34d7fce4c1d9417fa9342247cf5ace0636cd86591efbed0555ae80197f79303dL90-L94)):
```java
if (file instanceof HadoopOutputFile) {
this.conf = new Configuration(((HadoopOutputFile) file).getConf());
} else {
this.conf = new Configuration();
}
```
--
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]