diff --git a/src/frontend/src/binder/statement.rs b/src/frontend/src/binder/statement.rs index 1a94a6ce30d2f..027f78e7705a9 100644 --- a/src/frontend/src/binder/statement.rs +++ b/src/frontend/src/binder/statement.rs @@ -32,18 +32,18 @@ pub enum BoundStatement { impl BoundStatement { pub fn output_fields(&self) -> Vec { 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(), } }