@@ -1661,4 +1661,31 @@ TEST_F(FileStoreCommitImplTest, TestCommitWithIOException) {
16611661 ASSERT_TRUE (commit_run_complete);
16621662}
16631663
1664+ TEST_F (FileStoreCommitImplTest, TestObjectStoreAllowedWithRESTCatalogCommit) {
1665+ // Verify: the object store check in FileStoreCommit::Create is skipped when
1666+ // UseRESTCatalogCommit is true. We can't use an actual oss:// path in unit
1667+ // tests (LocalFileSystem rejects the scheme), but we verify the condition
1668+ // by confirming that the "enable-object-store-commit-in-inte-test" flag is
1669+ // not needed when UseRESTCatalogCommit is enabled. End-to-end oss:// testing
1670+ // is covered by duckdb-paimon integration tests.
1671+ ASSERT_OK_AND_ASSIGN (bool is_oss, FileSystem::IsObjectStore (" oss://bucket/path" ));
1672+ ASSERT_TRUE (is_oss);
1673+
1674+ // REST commit with local path should work without the object store flag
1675+ CommitContextBuilder builder (table_path_, " commit_user_1" );
1676+ ASSERT_OK_AND_ASSIGN (
1677+ auto ctx,
1678+ builder.AddOption (Options::MANIFEST_FORMAT , " orc" ).UseRESTCatalogCommit (true ).Finish ());
1679+ ASSERT_OK_AND_ASSIGN (auto commit, FileStoreCommit::Create (std::move (ctx)));
1680+
1681+ auto msgs =
1682+ GetCommitMessages (paimon::test::GetDataDir () +
1683+ " /orc/append_09.db/append_09/commit_messages/commit_messages-01" ,
1684+ 3 );
1685+ ASSERT_GT (msgs.size (), 0 );
1686+ ASSERT_OK (commit->Commit (msgs));
1687+ ASSERT_OK_AND_ASSIGN (auto json, commit->GetLastCommitTableRequest ());
1688+ ASSERT_FALSE (json.empty ());
1689+ }
1690+
16641691} // namespace paimon::test
0 commit comments