Skip to content

Commit

Permalink
feat(iceberg): add license for iceberg sink with glue (#18187)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 authored Aug 22, 2024
1 parent c101a30 commit 955c6bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/connector/src/sink/iceberg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down Expand Up @@ -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(())
}
Expand Down
1 change: 1 addition & 0 deletions src/license/src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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." },
}
};
}
Expand Down

0 comments on commit 955c6bb

Please sign in to comment.