rdblue commented on a change in pull request #1587: URL: https://github.com/apache/iceberg/pull/1587#discussion_r527829234
########## File path: nessie/src/test/java/org/apache/iceberg/nessie/TestBranchHash.java ########## @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.iceberg.nessie; + +import com.dremio.nessie.client.NessieClient; +import com.dremio.nessie.error.NessieConflictException; +import com.dremio.nessie.error.NessieNotFoundException; +import org.apache.iceberg.Table; +import org.apache.iceberg.catalog.TableIdentifier; +import org.apache.iceberg.types.Types; +import org.junit.Assert; +import org.junit.Test; + +public class TestBranchHash extends BaseTestIceberg { + + private static final String BRANCH = "test-branch-hash"; + + public TestBranchHash() { + super(BRANCH); + } + + @Test + public void testBasicBranch() throws NessieNotFoundException, NessieConflictException { + TableIdentifier foobar = TableIdentifier.of("foo", "bar"); + + Table bar = createTable(foobar, 1); // table 1 + catalog.refresh(); Review comment: Hm. The commit is going to trigger a refresh on the table the next time its metadata is accessed. That is usually right away because operations will read the latest metadata to clean up unused files. For Nessie, `doRefresh` is going to update the shared ref. That's why I thought this was redundant. I guess there could be cases where the metadata isn't accessed yet and you do need the refresh. Not a big deal, so let's not worry about it. ---------------------------------------------------------------- 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]
