Skip to content

Commit

Permalink
fix(frontend): fix dml output fields (#12881) (#12884)
Browse files Browse the repository at this point in the history
Co-authored-by: Dylan <[email protected]>
  • Loading branch information
github-actions[bot] and chenzl25 authored Oct 16, 2023
1 parent 69ab415 commit cab8135
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/frontend/src/binder/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ pub enum BoundStatement {
impl BoundStatement {
pub fn output_fields(&self) -> Vec<Field> {
match self {
BoundStatement::Insert(i) => i.returning_schema.as_ref().map_or(
vec![Field::unnamed(risingwave_common::types::DataType::Int64)],
|s| s.fields().into(),
),
BoundStatement::Delete(d) => d.returning_schema.as_ref().map_or(
vec![Field::unnamed(risingwave_common::types::DataType::Int64)],
|s| s.fields().into(),
),
BoundStatement::Update(u) => u.returning_schema.as_ref().map_or(
vec![Field::unnamed(risingwave_common::types::DataType::Int64)],
|s| s.fields().into(),
),
BoundStatement::Insert(i) => i
.returning_schema
.as_ref()
.map_or(vec![], |s| s.fields().into()),
BoundStatement::Delete(d) => d
.returning_schema
.as_ref()
.map_or(vec![], |s| s.fields().into()),
BoundStatement::Update(u) => u
.returning_schema
.as_ref()
.map_or(vec![], |s| s.fields().into()),
BoundStatement::Query(q) => q.schema().fields().into(),
}
}
Expand Down

0 comments on commit cab8135

Please sign in to comment.