MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_create_iceberg_sink

Method parse_create_iceberg_sink

src/sql-parser/src/parser.rs:3476–3510  ·  view source on GitHub ↗
(
        &mut self,
        name: Option<UnresolvedItemName>,
        in_cluster: Option<RawClusterName>,
        from: RawItemName,
        if_not_exists: bool,
        connection: CreateSinkConnect

Source from the content-addressed store, hash-verified

3474 }
3475
3476 fn parse_create_iceberg_sink(
3477 &mut self,
3478 name: Option<UnresolvedItemName>,
3479 in_cluster: Option<RawClusterName>,
3480 from: RawItemName,
3481 if_not_exists: bool,
3482 connection: CreateSinkConnection<Raw>,
3483 ) -> Result<CreateSinkStatement<Raw>, ParserError> {
3484 let mode = if self.parse_keyword(MODE) {
3485 Some(self.parse_iceberg_sink_mode()?)
3486 } else {
3487 None
3488 };
3489
3490 let with_options = if self.parse_keyword(WITH) {
3491 self.expect_token(&Token::LParen)?;
3492 let options = self.parse_comma_separated(Parser::parse_create_sink_option)?;
3493 self.expect_token(&Token::RParen)?;
3494 options
3495 } else {
3496 vec![]
3497 };
3498
3499 Ok(CreateSinkStatement {
3500 name,
3501 in_cluster,
3502 from,
3503 connection,
3504 format: None,
3505 envelope: None,
3506 mode,
3507 if_not_exists,
3508 with_options,
3509 })
3510 }
3511
3512 fn parse_create_kafka_sink(
3513 &mut self,

Callers 1

parse_create_sinkMethod · 0.80

Calls 4

parse_keywordMethod · 0.80
expect_tokenMethod · 0.80
parse_comma_separatedMethod · 0.80

Tested by

no test coverage detected