From 072d7e701ea1fea358b64fd0230427bee54b1874 Mon Sep 17 00:00:00 2001 From: Xinhao Xu <84456268+xxhZs@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:33:42 +0800 Subject: [PATCH] fix(frontend): fix changelog append_only (#17583) --- integration_tests/snowflake-sink/upsert/create_sink.sql | 3 --- src/frontend/src/optimizer/plan_node/stream_changelog.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/integration_tests/snowflake-sink/upsert/create_sink.sql b/integration_tests/snowflake-sink/upsert/create_sink.sql index 0986005d8c717..20f45968439db 100644 --- a/integration_tests/snowflake-sink/upsert/create_sink.sql +++ b/integration_tests/snowflake-sink/upsert/create_sink.sql @@ -13,7 +13,4 @@ CREATE SINK snowflake_sink FROM ss_mv WITH ( snowflake.aws_secret_access_key = 'EXAMPLE_SECRET_KEY', snowflake.aws_region = 'EXAMPLE_REGION', snowflake.s3_path = 'EXAMPLE_S3_PATH', - -- depends on your mv setup, note that snowflake sink *only* supports - -- `append-only` mode at present. - force_append_only = 'true' ); \ No newline at end of file diff --git a/src/frontend/src/optimizer/plan_node/stream_changelog.rs b/src/frontend/src/optimizer/plan_node/stream_changelog.rs index d84aa8c7e0cdf..0ee696c58067a 100644 --- a/src/frontend/src/optimizer/plan_node/stream_changelog.rs +++ b/src/frontend/src/optimizer/plan_node/stream_changelog.rs @@ -43,7 +43,8 @@ impl StreamChangeLog { let base = PlanBase::new_stream_with_core( &core, dist, - input.append_only(), + // The changelog will convert all delete/update to insert, so it must be true here. + true, input.emit_on_window_close(), watermark_columns, );