You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/08/03 11:57:52 UTC

[GitHub] [iceberg] massdosage commented on a change in pull request #1243: Hive: Add support for custom catalog to Iceberg StorageHandler (#1155)

massdosage commented on a change in pull request #1243:
URL: https://github.com/apache/iceberg/pull/1243#discussion_r464367200



##########
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:
       Yes, and ideally we'd have a unit test which uses multiple tables which are set up differently and checks that the properties that are unique to each table are honoured properly.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org