Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed May 8, 2024
1 parent efad6a3 commit 981144f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/sqlparser/src/ast/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,10 @@ impl ParseTo for CreateSourceStatement {
.find(|&opt| opt.name.real_value() == UPSTREAM_SOURCE_KEY);
let connector: String = option.map(|opt| opt.value.to_string()).unwrap_or_default();
let cdc_source_job = connector.contains("-cdc");
if cdc_source_job {
if !columns.is_empty() || !constraints.is_empty() {
return Err(ParserError::ParserError(
"CDC source cannot define columns and constraints".to_string(),
));
}
if cdc_source_job && (!columns.is_empty() || !constraints.is_empty()) {
return Err(ParserError::ParserError(
"CDC source cannot define columns and constraints".to_string(),
));
}

// row format for nexmark source must be native
Expand Down

0 comments on commit 981144f

Please sign in to comment.