Skip to content

Commit b2151b7

Browse files
committed
fix: test
1 parent 0008fb0 commit b2151b7

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/datanode/src/sql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ mod tests {
302302
// test inert into select
303303

304304
// type mismatch
305-
let sql = "insert into demo(cpu) select number from numbers limit 3";
305+
let sql = "insert into demo(ts) select number from numbers limit 3";
306306

307307
let stmt = match QueryLanguageParser::parse_sql(sql).unwrap() {
308308
QueryStatement::Sql(Statement::Insert(i)) => i,

src/datanode/src/tests/instance_test.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,9 @@ async fn test_execute_insert_by_select() {
222222
));
223223

224224
assert!(matches!(
225-
try_execute_sql(
226-
&instance,
227-
"insert into demo2(host) select memory from demo1"
228-
)
229-
.await
230-
.unwrap_err(),
225+
try_execute_sql(&instance, "insert into demo2(ts) select memory from demo1")
226+
.await
227+
.unwrap_err(),
231228
Error::ColumnTypeMismatch { .. }
232229
));
233230

src/datatypes/src/vectors/operations/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ macro_rules! cast_non_constant {
2323
let arrow_array = $vector.to_arrow_array();
2424
let casted = compute::cast(&arrow_array, &$to_type.as_arrow_type())
2525
.context(crate::error::ArrowComputeSnafu)?;
26-
Ok(Helper::try_into_vector(casted)?)
26+
Helper::try_into_vector(casted)
2727
}};
2828
}
2929

0 commit comments

Comments
 (0)