This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 866e26fe2 [docs] Fix docs confusing point about catalog create (#2503)
866e26fe2 is described below

commit 866e26fe26881916e808767e011ee17a10eed698
Author: YeJunHao <[email protected]>
AuthorDate: Wed Dec 13 17:55:55 2023 +0800

    [docs] Fix docs confusing point about catalog create (#2503)
---
 docs/content/api/flink-api.md | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/docs/content/api/flink-api.md b/docs/content/api/flink-api.md
index d5f17fc4a..19ee934f6 100644
--- a/docs/content/api/flink-api.md
+++ b/docs/content/api/flink-api.md
@@ -199,7 +199,7 @@ public class WriteCdcToTable {
         
         new RichCdcSinkBuilder()
                 .withInput(dataStream)
-                .withTable(createTableIfNotExists(identifier))
+                .withTable(createTableIfNotExists(catalogLoader.load(), 
identifier))
                 .withIdentifier(identifier)
                 .withCatalogLoader(catalogLoader)
                 .build();
@@ -207,10 +207,7 @@ public class WriteCdcToTable {
         env.execute();
     }
 
-    private static Table createTableIfNotExists(Identifier identifier) throws 
Exception {
-        CatalogContext context = CatalogContext.create(new Path("..."));
-        Catalog catalog = CatalogFactory.createCatalog(context);
-
+    private static Table createTableIfNotExists(Catalog catalog, Identifier 
identifier) throws Exception {
         Schema.Builder schemaBuilder = Schema.newBuilder();
         schemaBuilder.primaryKey("order_id");
         schemaBuilder.column("order_id", DataTypes.BIGINT());

Reply via email to