feat(database): support Doris and StarRocks catalogs
This commit is contained in:
44 files changed
+1330
-242
No files matched your search
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
databaseAfterCatalogChange,
|
||||
databaseOptionsForConnection,
|
||||
fetchCatalogNamespaceOptions,
|
||||
fetchNamespaceOptionsForConnection,
|
||||
fetchSqlFileTargetOptions,
|
||||
namespaceOptionsAreSchemas,
|
||||
@@ -130,6 +131,19 @@ describe("namespace options", () => {
|
||||
).toEqual(["analytics"]);
|
||||
});
|
||||
|
||||
it("preserves visible database filtering for catalog-scoped transfer options", async () => {
|
||||
mocks.listDorisCatalogDatabases.mockResolvedValue([{ name: "app" }, { name: "analytics" }]);
|
||||
|
||||
await expect(
|
||||
fetchCatalogNamespaceOptions("connection-1", "hive", {
|
||||
db_type: "starrocks",
|
||||
visible_databases: ["analytics"],
|
||||
}),
|
||||
).resolves.toEqual(["analytics"]);
|
||||
|
||||
expect(mocks.listDorisCatalogDatabases).toHaveBeenCalledWith("connection-1", "hive");
|
||||
});
|
||||
|
||||
it("propagates metadata loading errors", async () => {
|
||||
const error = new Error("schema metadata failed");
|
||||
mocks.listSchemas.mockRejectedValue(error);
|
||||
|
||||
Reference in new issue
Block a user