henrib commented on PR #5878: URL: https://github.com/apache/hive/pull/5878#issuecomment-2984649727
With this modification in HMSCachingCatalog: ` @Override public Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema) { tableCache.invalidate(identifier); return nsCatalog.buildTable(identifier, schema); } ` This test succeeds: ` @Test public void testTableAPI2() throws Exception { String cname = catalog.name(); URI iceUri = URI.create("http://localhost:" + catalogPort + "/"+catalogPath); String jwt = generateJWT(); Schema schema = getTestSchema(); final String tblName = "tbl_" + Integer.toHexString(RND.nextInt(65536)); final TableIdentifier TBL = TableIdentifier.of(DB_NAME, tblName); String location = temp.newFolder(TBL.toString()).toString(); Configuration configuration = new Configuration(); configuration.set("iceberg.catalog", cname); configuration.set("iceberg.catalog."+cname+".type", "rest"); configuration.set("iceberg.catalog."+cname+".uri", iceUri.toString()); configuration.set("iceberg.catalog."+cname+".token", jwt); String catalogName = configuration.get(CATALOG_NAME); Assert.assertEquals(cname, catalogName); Map<String, String> properties = getCatalogPropertiesFromConf(configuration, catalogName); Assert.assertFalse(properties.isEmpty()); RESTCatalog restCatalog = (RESTCatalog) CatalogUtil.buildIcebergCatalog(catalogName, properties, configuration); restCatalog.initialize(catalogName, properties); restCatalog .buildTable(TBL, schema) .withLocation(location) .createTransaction() .commitTransaction(); Table table = catalog.loadTable(TBL); Assert.assertEquals(location, table.location()); } ` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org