Skip to content

Commit 0b42adf

Browse files
committed
fmt
1 parent 62709fd commit 0b42adf

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/binder/insert.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ impl<T: Transaction, A: AsRef<[(&'static str, DataValue)]>> Binder<'_, '_, T, A>
109109
))
110110
}
111111

112-
pub(crate) fn bind_values(&mut self, rows: Vec<Vec<DataValue>>, schema_ref: SchemaRef) -> LogicalPlan {
112+
pub(crate) fn bind_values(
113+
&mut self,
114+
rows: Vec<Vec<DataValue>>,
115+
schema_ref: SchemaRef,
116+
) -> LogicalPlan {
113117
LogicalPlan::new(
114118
Operator::Values(ValuesOperator { rows, schema_ref }),
115119
Childrens::None,

src/binder/select.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ impl<'a: 'b, 'b, T: Transaction, A: AsRef<[(&'static str, DataValue)]>> Binder<'
159159
Ok(plan)
160160
}
161161

162-
fn bind_temp_values(&mut self, expr_rows: &Vec<Vec<Expr>>) -> Result<LogicalPlan, DatabaseError> {
162+
fn bind_temp_values(
163+
&mut self,
164+
expr_rows: &Vec<Vec<Expr>>,
165+
) -> Result<LogicalPlan, DatabaseError> {
163166
let values_len = expr_rows[0].len();
164167

165168
let mut inferred_types: Vec<Option<LogicalType>> = vec![None; values_len];
@@ -182,7 +185,9 @@ impl<'a: 'b, 'b, T: Transaction, A: AsRef<[(&'static str, DataValue)]>> Binder<'
182185

183186
// 3. 合并类型为最宽类型
184187
inferred_types[col_index] = match &inferred_types[col_index] {
185-
Some(existing) => Some(LogicalType::max_logical_type(existing, &value_type)?),
188+
Some(existing) => {
189+
Some(LogicalType::max_logical_type(existing, &value_type)?)
190+
}
186191
None => Some(value_type),
187192
};
188193

@@ -208,7 +213,7 @@ impl<'a: 'b, 'b, T: Transaction, A: AsRef<[(&'static str, DataValue)]>> Binder<'
208213
})
209214
.collect::<Result<_, DatabaseError>>()?;
210215

211-
Ok(self.bind_values(rows,Arc::new(column_ref)))
216+
Ok(self.bind_values(rows, Arc::new(column_ref)))
212217
}
213218

214219
fn bind_set_cast(

0 commit comments

Comments
 (0)