File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,9 +160,9 @@ impl USearchRule {
160160 remap_projections ( proj_exprs_slice, dist_alias_str, & table_ref)
161161 } ;
162162 let remapped_sort_exprs = remap_sort_exprs ( & sort. expr , dist_alias. as_deref ( ) ) ;
163- let needs_hidden_distance = remapped_sort_exprs. iter ( ) . any ( |e| {
164- matches ! ( & e. expr, Expr :: Column ( c) if c. relation. is_none( ) && c. name == "_distance" )
165- } ) && !projection_exposes_name ( & final_proj_exprs, "_distance" ) ;
163+ let needs_hidden_distance = remapped_sort_exprs. iter ( ) . any (
164+ |e| matches ! ( & e. expr, Expr :: Column ( c) if c. relation. is_none( ) && c. name == "_distance" ) ,
165+ ) && !projection_exposes_name ( & final_proj_exprs, "_distance" ) ;
166166
167167 let mut sort_input_exprs = final_proj_exprs. clone ( ) ;
168168 if needs_hidden_distance {
@@ -365,7 +365,8 @@ fn projection_exposes_name(exprs: &[Expr], name: &str) -> bool {
365365}
366366
367367fn build_outer_projection ( exprs : & [ Expr ] ) -> Vec < Expr > {
368- exprs. iter ( )
368+ exprs
369+ . iter ( )
369370 . filter_map ( |expr| match expr {
370371 Expr :: Alias ( a) => Some ( col ( a. name . as_str ( ) ) ) ,
371372 Expr :: Column ( c) => Some ( Expr :: Column ( c. clone ( ) ) ) ,
Original file line number Diff line number Diff line change @@ -531,7 +531,8 @@ async fn exec_split_provider_select_specific_columns() {
531531}
532532
533533/// SELECT specific columns without projecting the distance expression.
534- /// This is the production shape behind `vector_distance(...)`.
534+ /// This matches the split-provider direct ORDER BY shape used by callers that
535+ /// rewrite higher-level search helpers into the low-level distance UDF.
535536#[ tokio:: test]
536537async fn exec_split_provider_order_by_udf_direct ( ) {
537538 let ctx = make_split_provider_ctx ( "items::vector" ) . await ;
You can’t perform that action at this time.
0 commit comments