rdblue commented on a change in pull request #7: Allow custom hadoop properties
to be loaded in the Spark data source
URL: https://github.com/apache/incubator-iceberg/pull/7#discussion_r240443779
##########
File path:
spark/src/main/java/com/netflix/iceberg/spark/source/IcebergSource.java
##########
@@ -56,16 +57,25 @@ public String shortName() {
@Override
public DataSourceReader createReader(DataSourceOptions options) {
- Table table = findTable(options);
- return new Reader(table, lazyConf());
+ Configuration conf = new Configuration(lazyBaseConf());
+ // Overwrite configurations from the Spark Context with configurations
from the options.
+ mergeIcebergHadoopConfs(conf, options.asMap(), true);
Review comment:
I don't think this quite implements what we want it to. If a config option
is set in the base configuration but not in options, then it will take
precedence over the table configuration. I think we just have to apply the
options twice to get the right precedence.
By the way, thank you for catching this and spending time on it, that
attention to detail is very much appreciated!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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