rdsr commented on a change in pull request #1243:
URL: https://github.com/apache/iceberg/pull/1243#discussion_r470370131
##########
File path:
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergInputFormat.java
##########
@@ -155,11 +157,31 @@ public void testJoinTables() {
Assert.assertArrayEquals(new Object[] {1L, "Bob", 102L, 33.33d},
rows.get(2));
}
- private void createHiveTable(String table, String location) {
+ protected void createTable(String tableName, Schema schema, List<Record>
records)
+ throws IOException {
+ Table table = createIcebergTable(tableName, schema, records);
+ createHiveTable(tableName, table.location());
+ }
+
+ protected Table createIcebergTable(String tableName, Schema schema,
List<Record> records)
+ throws IOException {
+ String identifier = testTables.identifier("default." + tableName);
+ TestHelper helper = new TestHelper(
+ metastore.hiveConf(), testTables.tables(), identifier, schema,
SPEC, FileFormat.PARQUET, temp);
+ Table table = helper.createTable();
+
+ if (!records.isEmpty()) {
+ helper.appendToTable(helper.writeFile(null, records));
+ }
+
+ return table;
+ }
+
+ protected void createHiveTable(String tableName, String location) {
shell.execute(String.format(
Review comment:
shouldn't we set the custom catalog loader by setting a table property
`catalog.loader.class` here?
----------------------------------------------------------------
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]