Skip to content

Commit 0195beb

Browse files
committed
fix: improve error messages for type validation in col_in_list function
1 parent f1cab52 commit 0195beb

File tree

1 file changed

+3
-3
lines changed
  • src/filterx_engine/src/eval

1 file changed

+3
-3
lines changed

src/filterx_engine/src/eval/ops.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ fn col_in_list<'a>(vm: &'a mut Vm, left: Value, right: Value, op: &CmpOp) -> Fil
494494
for v in &right_list {
495495
if v.is_err() {
496496
let h = &mut vm.hint;
497-
h.white("List must be int type").print_and_exit();
497+
h.white("List must be int type, because left col's type is int.").print_and_exit();
498498
}
499499
}
500500
let mut right_values = Vec::with_capacity(right_list.len());
@@ -509,7 +509,7 @@ fn col_in_list<'a>(vm: &'a mut Vm, left: Value, right: Value, op: &CmpOp) -> Fil
509509
for v in &right_list {
510510
if v.is_err() {
511511
let h = &mut vm.hint;
512-
h.white("List must be float type").print_and_exit();
512+
h.white("List must be float type, because left col's type is float.").print_and_exit();
513513
}
514514
}
515515
let mut right_values = Vec::with_capacity(right_list.len());
@@ -524,7 +524,7 @@ fn col_in_list<'a>(vm: &'a mut Vm, left: Value, right: Value, op: &CmpOp) -> Fil
524524
for v in &right_list {
525525
if v.is_err() {
526526
let h = &mut vm.hint;
527-
h.white("List must be string type").print_and_exit();
527+
h.white("List must be string type, because left col's type is string.").print_and_exit();
528528
}
529529
}
530530
let mut right_values = Vec::with_capacity(right_list.len());

0 commit comments

Comments
 (0)