From 955c6bba246f116d77f334864836a40fb17b5c84 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 22 Aug 2024 17:04:55 +0800 Subject: [PATCH] feat(iceberg): add license for iceberg sink with glue (#18187) --- src/connector/src/sink/iceberg/mod.rs | 7 ++++++- src/license/src/feature.rs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/connector/src/sink/iceberg/mod.rs b/src/connector/src/sink/iceberg/mod.rs index 2274b5805d81d..4984fb9efdab4 100644 --- a/src/connector/src/sink/iceberg/mod.rs +++ b/src/connector/src/sink/iceberg/mod.rs @@ -204,7 +204,7 @@ impl IcebergConfig { Ok(config) } - fn catalog_type(&self) -> &str { + pub fn catalog_type(&self) -> &str { self.catalog_type.as_deref().unwrap_or("storage") } @@ -737,6 +737,11 @@ impl Sink for IcebergSink { } async fn validate(&self) -> Result<()> { + if "glue".eq_ignore_ascii_case(self.config.catalog_type()) { + risingwave_common::license::Feature::IcebergSinkWithGlue + .check_available() + .map_err(|e| anyhow::anyhow!(e))?; + } let _ = self.create_and_validate_table().await?; Ok(()) } diff --git a/src/license/src/feature.rs b/src/license/src/feature.rs index 8a02cee72875a..6047e0414b24e 100644 --- a/src/license/src/feature.rs +++ b/src/license/src/feature.rs @@ -56,6 +56,7 @@ macro_rules! for_all_features { { SqlServerSink, Paid, "Sink data from RisingWave to SQL Server." }, { SqlServerCdcSource, Paid, "CDC source connector for Sql Server." }, { CdcAutoSchemaChange, Paid, "Auto replicate upstream DDL to CDC Table." }, + { IcebergSinkWithGlue, Paid, "Delivering data to Iceberg with Glue catalog." }, } }; }