This is an automated email from the ASF dual-hosted git repository. ron pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit d9ada73cc6dade9c5bafd4f4febdf05cdc1e27fe Author: Feng Jin <jinfeng1...@gmail.com> AuthorDate: Sun Jan 19 20:49:53 2025 +0800 [FLINK-37133][table] Fix TestFileSystemCatalog losing scheme information when constructing table paths --- .../flink/table/file/testutils/catalog/TestFileSystemCatalog.java | 2 +- .../table/file/testutils/catalog/TestFileSystemCatalogTest.java | 6 +++--- .../table/file/testutils/catalog/TestFileSystemCatalogTestBase.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/main/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalog.java b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/main/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalog.java index 092940419da8..c5302828afbe 100644 --- a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/main/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalog.java +++ b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/main/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalog.java @@ -273,7 +273,7 @@ public class TestFileSystemCatalog extends AbstractCatalog { return deserializeTable( tableInfo.getTableKind(), tableInfo.getCatalogTableInfo(), - tableDataPath.getPath()); + tableDataPath.toString()); } catch (IOException e) { throw new CatalogException( String.format("Getting table %s occur exception.", tablePath), e); diff --git a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTest.java b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTest.java index 1936896146ba..e9d07ca45398 100644 --- a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTest.java +++ b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTest.java @@ -175,7 +175,7 @@ public class TestFileSystemCatalogTest extends TestFileSystemCatalogTestBase { expectedOptions.put( PATH.key(), String.format( - "%s/%s/%s/%s", + "file:%s/%s/%s/%s", tempFile.getAbsolutePath(), tablePath.getDatabaseName(), tablePath.getObjectName(), @@ -214,7 +214,7 @@ public class TestFileSystemCatalogTest extends TestFileSystemCatalogTestBase { expectedOptions.put( PATH.key(), String.format( - "%s/%s/%s/%s", + "file:%s/%s/%s/%s", tempFile.getAbsolutePath(), tablePath.getDatabaseName(), tablePath.getObjectName(), @@ -350,7 +350,7 @@ public class TestFileSystemCatalogTest extends TestFileSystemCatalogTestBase { expectedOptions.put( PATH.key(), String.format( - "%s/%s/%s/%s", + "file:%s/%s/%s/%s", tempFile.getAbsolutePath(), tablePath.getDatabaseName(), tablePath.getObjectName(), diff --git a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTestBase.java b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTestBase.java index fb419cf019e2..7ba3a9149db4 100644 --- a/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTestBase.java +++ b/flink-test-utils-parent/flink-table-filesystem-test-utils/src/test/java/org/apache/flink/table/file/testutils/catalog/TestFileSystemCatalogTestBase.java @@ -43,7 +43,7 @@ public abstract class TestFileSystemCatalogTestBase extends AbstractTestBase { File testDb = new File(tempFile, TEST_DEFAULT_DATABASE); testDb.mkdir(); - String catalogPathStr = tempFile.getAbsolutePath(); + String catalogPathStr = "file:" + tempFile.getAbsolutePath(); catalog = new TestFileSystemCatalog(catalogPathStr, TEST_CATALOG, TEST_DEFAULT_DATABASE); catalog.open(); }