From a2539f5cfa11544d7f09af6978d2365e67dec783 Mon Sep 17 00:00:00 2001 From: skylines <34996528+gtk96@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:50:57 +0800 Subject: [PATCH] [hotfix][docs][postgres] Remove unsupported erroneous example code This closes #3464 --- .../docs/connectors/flink-sources/postgres-cdc.md | 1 - docs/content/docs/connectors/flink-sources/postgres-cdc.md | 1 - .../connectors/postgres/source/PostgresSourceBuilder.java | 6 ------ .../postgres/source/PostgresSourceExampleTest.java | 2 -- 4 files changed, 10 deletions(-) diff --git a/docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md b/docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md index 69d47eb572..68a09c889c 100644 --- a/docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md +++ b/docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md @@ -470,7 +470,6 @@ public class PostgresParallelSourceExample { .slotName("flink") .decodingPluginName("decoderbufs") // use pgoutput for PostgreSQL 10+ .deserializer(deserializer) - .includeSchemaChanges(true) // output the schema changes as well .splitSize(2) // the split size of each snapshot split .build(); diff --git a/docs/content/docs/connectors/flink-sources/postgres-cdc.md b/docs/content/docs/connectors/flink-sources/postgres-cdc.md index 16c2d84b4a..ea21ed7a3d 100644 --- a/docs/content/docs/connectors/flink-sources/postgres-cdc.md +++ b/docs/content/docs/connectors/flink-sources/postgres-cdc.md @@ -481,7 +481,6 @@ public class PostgresParallelSourceExample { .slotName("flink") .decodingPluginName("decoderbufs") // use pgoutput for PostgreSQL 10+ .deserializer(deserializer) - .includeSchemaChanges(true) // output the schema changes as well .splitSize(2) // the split size of each snapshot split .build(); diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceBuilder.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceBuilder.java index ee991a70f8..af220061a1 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceBuilder.java +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceBuilder.java @@ -199,12 +199,6 @@ public PostgresSourceBuilder connectionPoolSize(int connectionPoolSize) { return this; } - /** Whether the {@link PostgresIncrementalSource} should output the schema changes or not. */ - public PostgresSourceBuilder includeSchemaChanges(boolean includeSchemaChanges) { - this.configFactory.includeSchemaChanges(includeSchemaChanges); - return this; - } - /** Specifies the startup options. */ public PostgresSourceBuilder startupOptions(StartupOptions startupOptions) { this.configFactory.startupOptions(startupOptions); diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceExampleTest.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceExampleTest.java index f6f2b45d90..77165333b9 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceExampleTest.java +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/PostgresSourceExampleTest.java @@ -108,7 +108,6 @@ public void testConsumingScanEvents() throws Exception { .slotName(SLOT_NAME) .decodingPluginName(PLUGIN_NAME) .deserializer(deserializer) - .includeSchemaChanges(true) // output the schema changes as well .splitSize(2) .build(); @@ -153,7 +152,6 @@ public void testConsumingAllEvents() throws Exception { .slotName(SLOT_NAME) .decodingPluginName(PLUGIN_NAME) .deserializer(buildRowDataDebeziumDeserializeSchema(dataType)) - .includeSchemaChanges(true) // output the schema changes as well .splitSize(2) .debeziumProperties(debeziumProps) .build();