@@ -26,7 +26,8 @@ use pgwire::pg_response::{PgResponse, StatementType};
2626use prost:: Message as _;
2727use risingwave_common:: catalog:: {
2828 CdcTableDesc , ColumnCatalog , ColumnDesc , ConflictBehavior , DEFAULT_SCHEMA_NAME , Engine ,
29- ObjectId , RISINGWAVE_ICEBERG_ROW_ID , ROW_ID_COLUMN_NAME , TableId ,
29+ ICEBERG_SINK_PREFIX , ICEBERG_SOURCE_PREFIX , ObjectId , RISINGWAVE_ICEBERG_ROW_ID ,
30+ ROW_ID_COLUMN_NAME , TableId ,
3031} ;
3132use risingwave_common:: config:: MetaBackend ;
3233use risingwave_common:: global_jvm:: Jvm ;
@@ -61,12 +62,12 @@ use risingwave_sqlparser::ast::{
6162use risingwave_sqlparser:: parser:: { IncludeOption , Parser } ;
6263use thiserror_ext:: AsReport ;
6364
65+ use super :: RwPgResponse ;
6466use super :: create_source:: { CreateSourceType , SqlColumnStrategy , bind_columns_from_source} ;
65- use super :: { RwPgResponse , alter_streaming_rate_limit} ;
6667use crate :: binder:: { Clause , SecureCompareContext , bind_data_type} ;
6768use crate :: catalog:: root_catalog:: SchemaPath ;
6869use crate :: catalog:: source_catalog:: SourceCatalog ;
69- use crate :: catalog:: table_catalog:: { ICEBERG_SINK_PREFIX , ICEBERG_SOURCE_PREFIX , TableVersion } ;
70+ use crate :: catalog:: table_catalog:: TableVersion ;
7071use crate :: catalog:: { ColumnId , DatabaseId , SchemaId , SourceId , check_column_name_not_reserved} ;
7172use crate :: error:: { ErrorCode , Result , RwError , bail_bind_error} ;
7273use crate :: expr:: { Expr , ExprImpl , ExprRewriter } ;
@@ -99,7 +100,6 @@ use risingwave_connector::sink::iceberg::{
99100 SNAPSHOT_EXPIRATION_RETAIN_LAST , WRITE_MODE , parse_partition_by_exprs,
100101} ;
101102use risingwave_pb:: ddl_service:: create_iceberg_table_request:: { PbSinkJobInfo , PbTableJobInfo } ;
102- use risingwave_pb:: meta:: PbThrottleTarget ;
103103
104104use crate :: handler:: create_sink:: { SinkPlanContext , gen_sink_plan} ;
105105
@@ -1394,7 +1394,7 @@ fn bind_cdc_table_schema(
13941394
13951395#[ allow( clippy:: too_many_arguments) ]
13961396pub async fn handle_create_table (
1397- mut handler_args : HandlerArgs ,
1397+ handler_args : HandlerArgs ,
13981398 table_name : ObjectName ,
13991399 column_defs : Vec < ColumnDef > ,
14001400 wildcard_idx : Option < usize > ,
@@ -1422,21 +1422,6 @@ pub async fn handle_create_table(
14221422 risingwave_sqlparser:: ast:: Engine :: Hummock => Engine :: Hummock ,
14231423 risingwave_sqlparser:: ast:: Engine :: Iceberg => Engine :: Iceberg ,
14241424 } ;
1425- if engine == Engine :: Iceberg && handler_args. with_options . get_connector ( ) . is_some ( ) {
1426- // HACK: since we don't have atomic DDL, table with connector may lose data.
1427- // FIXME: remove this after https://github.com/risingwavelabs/risingwave/issues/21863
1428- if let Some ( _rate_limit) = handler_args. with_options . insert (
1429- OverwriteOptions :: SOURCE_RATE_LIMIT_KEY . to_owned ( ) ,
1430- "0" . to_owned ( ) ,
1431- ) {
1432- // prevent user specified rate limit
1433- return Err ( ErrorCode :: NotSupported (
1434- "source_rate_limit for iceberg table engine during table creation" . to_owned ( ) ,
1435- "Please remove source_rate_limit from WITH options." . to_owned ( ) ,
1436- )
1437- . into ( ) ) ;
1438- }
1439- }
14401425
14411426 if let Either :: Right ( resp) = session. check_relation_name_duplicated (
14421427 table_name. clone ( ) ,
@@ -2174,8 +2159,6 @@ pub async fn create_iceberg_engine_table(
21742159 )
21752160 . await ?;
21762161
2177- let has_connector = source. is_some ( ) ;
2178-
21792162 // before we create the table, ensure the JVM is initialized as we use jdbc catalog right now.
21802163 // If JVM isn't initialized successfully, current not atomic ddl will result in a partially created iceberg engine table.
21812164 let _ = Jvm :: get_or_init ( ) ?;
@@ -2211,17 +2194,6 @@ pub async fn create_iceberg_engine_table(
22112194 res?
22122195 }
22132196
2214- // TODO: remove it together with rate limit rewrite after we support atomic DDL in meta side.
2215- if has_connector {
2216- alter_streaming_rate_limit:: handle_alter_streaming_rate_limit (
2217- handler_args,
2218- PbThrottleTarget :: TableWithSource ,
2219- table_name,
2220- -1 ,
2221- )
2222- . await ?;
2223- }
2224-
22252197 Ok ( ( ) )
22262198}
22272199
0 commit comments