guilload commented on a change in pull request #1243:
URL: https://github.com/apache/iceberg/pull/1243#discussion_r468202092
##########
File path:
mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
##########
@@ -66,7 +73,12 @@ public HiveAuthorizationProvider getAuthorizationProvider()
throws HiveException
@Override
public void configureInputJobProperties(TableDesc tableDesc, Map<String,
String> map) {
+ Properties props = tableDesc.getProperties();
+ Table table = Catalogs.loadTable(conf, props);
+ map.put(InputFormatConfig.TABLE_IDENTIFIER, props.getProperty(NAME));
+ map.put(InputFormatConfig.TABLE_LOCATION, table.location());
+ map.put(InputFormatConfig.TABLE_SCHEMA,
SchemaParser.toJson(table.schema()));
Review comment:
The current implement of the catalog loader reads directly from the
HiveConf and ignores the table properties, that why the catalog loader class is
not forwarded here.
I'm planning to add the ability to declare the catalog in the table
properties but I'd rather do so in a follow-up PR because that requires a
refactor of the current test suite. I'll make sure to add a test that reads
from multiples tables set up with different catalogs.
----------------------------------------------------------------
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]