@@ -645,19 +645,20 @@ fn compile_physical_plan_request(
645645 )
646646 . map_err ( |error| ( StatusCode :: UNPROCESSABLE_ENTITY , error. to_string ( ) . into ( ) ) ) ?;
647647 let planner_selection_trace = compilation_request. planner_selection_trace . clone ( ) ;
648- let ( manifests, alternatives) = physical:: workload_cost:: compile_candidates_for_pricing (
649- candidates. clone ( ) ,
650- environment. clone ( ) ,
651- frontend,
652- ) ;
648+ let ( manifests, candidate_evaluations) =
649+ physical:: workload_cost:: compile_candidates_for_pricing (
650+ candidates. clone ( ) ,
651+ environment. clone ( ) ,
652+ frontend,
653+ ) ;
653654 let apply_timeout = Duration :: from_millis ( request. apply_timeout_ms ) ;
654655 // Quote preparation enumerates feasible bindings; it does not select the
655656 // default warm candidate, which may be unavailable while exact is valid.
656657 if manifests_only {
657658 if manifests. is_empty ( ) {
658659 return Err ( (
659660 StatusCode :: UNPROCESSABLE_ENTITY ,
660- serde_json:: json!( { "status" : "all_infeasible" , "alternatives " : alternatives ,
661+ serde_json:: json!( { "status" : "all_infeasible" , "candidates " : candidate_evaluations ,
661662 "logical_selection" : compilation_request. planner_selection_trace} ) ,
662663 ) ) ;
663664 }
@@ -666,7 +667,7 @@ fn compile_physical_plan_request(
666667 request. target_collector_ids ,
667668 apply_timeout,
668669 request. runtime_adaptation_evidence ,
669- ( manifests, alternatives , planner_selection_trace) ,
670+ ( manifests, candidate_evaluations , planner_selection_trace) ,
670671 ) ) ;
671672 }
672673 let compiled = match request. workload_cost_evidence {
@@ -688,7 +689,7 @@ fn compile_physical_plan_request(
688689 } ;
689690 let bundle = match compiled {
690691 Ok ( bundle) => bundle,
691- Err ( physical:: compiler:: CompileError :: Alternatives ( report) ) => {
692+ Err ( physical:: compiler:: CompileError :: Candidates ( report) ) => {
692693 return Err ( ( StatusCode :: UNPROCESSABLE_ENTITY , report) )
693694 }
694695 Err ( error) => return Err ( ( StatusCode :: UNPROCESSABLE_ENTITY , error. to_string ( ) . into ( ) ) ) ,
@@ -698,7 +699,7 @@ fn compile_physical_plan_request(
698699 request. target_collector_ids ,
699700 apply_timeout,
700701 request. runtime_adaptation_evidence ,
701- ( manifests, alternatives , planner_selection_trace) ,
702+ ( manifests, candidate_evaluations , planner_selection_trace) ,
702703 ) )
703704}
704705
@@ -735,9 +736,9 @@ fn workload_cost_manifests(
735736 }
736737 let explain = request. explain ;
737738 match compile_physical_plan_request ( request, true , frontend) {
738- Ok ( ( _, _, _, _, ( manifests, alternatives , planner_selection_trace) ) ) => {
739+ Ok ( ( _, _, _, _, ( manifests, candidates , planner_selection_trace) ) ) => {
739740 if explain {
740- Json ( serde_json:: json!( { "manifests" : manifests, "alternatives " : alternatives , "logical_selection" : planner_selection_trace} ) )
741+ Json ( serde_json:: json!( { "manifests" : manifests, "candidates " : candidates , "logical_selection" : planner_selection_trace} ) )
741742 . into_response ( )
742743 } else {
743744 Json ( manifests) . into_response ( )
@@ -866,12 +867,12 @@ mod api_tests {
866867 let manifests = body_json ( response) . await ;
867868 if explain {
868869 assert_eq ! ( manifests[ "manifests" ] . as_array( ) . unwrap( ) . len( ) , 1 ) ;
869- let alternatives = manifests[ "alternatives " ] . as_array ( ) . unwrap ( ) ;
870- assert_eq ! ( alternatives . len( ) , 2 ) ;
871- assert_eq ! ( alternatives [ 0 ] [ "status" ] , "bind_failed" ) ;
872- assert ! ( alternatives [ 0 ] [ "unavailable_reason" ] . is_string( ) ) ;
873- assert_eq ! ( alternatives [ 1 ] [ "status" ] , "bound" ) ;
874- assert ! ( alternatives [ 1 ] [ "physical_alternative_id " ] . is_string( ) ) ;
870+ let candidates = manifests[ "candidates " ] . as_array ( ) . unwrap ( ) ;
871+ assert_eq ! ( candidates . len( ) , 2 ) ;
872+ assert_eq ! ( candidates [ 0 ] [ "status" ] , "bind_failed" ) ;
873+ assert ! ( candidates [ 0 ] [ "unavailable_reason" ] . is_string( ) ) ;
874+ assert_eq ! ( candidates [ 1 ] [ "status" ] , "bound" ) ;
875+ assert ! ( candidates [ 1 ] [ "physical_candidate_id " ] . is_string( ) ) ;
875876 assert ! ( !manifests[ "logical_selection" ]
876877 . as_array( )
877878 . unwrap( )
@@ -889,8 +890,8 @@ mod api_tests {
889890 assert_eq ! ( response. headers( ) [ "content-type" ] , "application/json" ) ;
890891 let report = body_json ( response) . await ;
891892 assert_eq ! ( report[ "status" ] , "all_infeasible" ) ;
892- assert_eq ! ( report[ "alternatives " ] . as_array( ) . unwrap( ) . len( ) , 2 ) ;
893- assert ! ( report[ "alternatives " ]
893+ assert_eq ! ( report[ "candidates " ] . as_array( ) . unwrap( ) . len( ) , 2 ) ;
894+ assert ! ( report[ "candidates " ]
894895 . as_array( )
895896 . unwrap( )
896897 . iter( )
0 commit comments