Skip to content

Commit 269e66b

Browse files
authored
fix(query): Fix cast array to vector allow pushdown vector index (#18387)
* fix(query): Fix cast array to vector allow pushdown vector index * fix tests
1 parent 4b876b9 commit 269e66b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

โ€Žsrc/query/sql/src/planner/semantic/type_check.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4438,10 +4438,11 @@ impl<'a> TypeChecker<'a> {
44384438
..
44394439
})] => {
44404440
let col_data_type = data_type.remove_nullable();
4441+
let target_type = target_type.remove_nullable();
44414442
if table_index.is_some()
44424443
&& matches!(col_data_type, DataType::Vector(_))
44434444
&& matches!(&**argument, ScalarExpr::ConstantExpr(_))
4444-
&& matches!(&**target_type, DataType::Vector(_))
4445+
&& matches!(&target_type, DataType::Vector(_))
44454446
&& LicenseManagerSwitch::instance()
44464447
.check_enterprise_enabled(
44474448
self.ctx.get_license_key(),
@@ -4514,6 +4515,7 @@ impl<'a> TypeChecker<'a> {
45144515
let Scalar::Array(arg_col) = arg.value else {
45154516
return None;
45164517
};
4518+
let arg_col = arg_col.remove_nullable();
45174519

45184520
let col_vector_type = col_data_type.as_vector().unwrap();
45194521
let col_dimension = col_vector_type.dimension() as usize;

0 commit comments

Comments
ย (0)