@@ -3767,10 +3767,8 @@ public void testTextEmbeddingResolveInferenceId() {
37673767 assumeTrue ("TEXT_EMBEDDING function required" , EsqlCapabilities .Cap .TEXT_EMBEDDING_FUNCTION .isEnabled ());
37683768
37693769 LogicalPlan plan = analyze (
3770- """
3771- FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" .formatted (
3772- TEXT_EMBEDDING_INFERENCE_ID
3773- ),
3770+ String .format (Locale .ROOT , """
3771+ FROM books METADATA _score | EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" , TEXT_EMBEDDING_INFERENCE_ID ),
37743772 "mapping-books.json"
37753773 );
37763774
@@ -3788,10 +3786,8 @@ public void testTextEmbeddingFunctionResolveType() {
37883786 assumeTrue ("TEXT_EMBEDDING function required" , EsqlCapabilities .Cap .TEXT_EMBEDDING_FUNCTION .isEnabled ());
37893787
37903788 LogicalPlan plan = analyze (
3791- """
3792- FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" .formatted (
3793- TEXT_EMBEDDING_INFERENCE_ID
3794- ),
3789+ String .format (Locale .ROOT , """
3790+ FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" , TEXT_EMBEDDING_INFERENCE_ID ),
37953791 "mapping-books.json"
37963792 );
37973793
@@ -3812,10 +3808,8 @@ public void testTextEmbeddingFunctionMissingInferenceIdError() {
38123808 VerificationException ve = expectThrows (
38133809 VerificationException .class ,
38143810 () -> analyze (
3815- """
3816- FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" .formatted (
3817- "unknow-inference-id"
3818- ),
3811+ String .format (Locale .ROOT , """
3812+ FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" , "unknow-inference-id" ),
38193813 "mapping-books.json"
38203814 )
38213815 );
@@ -3830,13 +3824,16 @@ public void testTextEmbeddingFunctionInvalidInferenceIdError() {
38303824 VerificationException ve = expectThrows (
38313825 VerificationException .class ,
38323826 () -> analyze (
3833- """
3834- FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" . formatted ( inferenceId ),
3827+ String . format ( Locale . ROOT , """
3828+ FROM books METADATA _score| EVAL embedding = TEXT_EMBEDDING("italian food recipe", "%s")""" , inferenceId ),
38353829 "mapping-books.json"
38363830 )
38373831 );
38383832
3839- assertThat (ve .getMessage (), containsString ("cannot use inference endpoint [%s] with task type" .formatted (inferenceId )));
3833+ assertThat (
3834+ ve .getMessage (),
3835+ containsString (String .format (Locale .ROOT , "cannot use inference endpoint [%s] with task type" , inferenceId ))
3836+ );
38403837 }
38413838
38423839 public void testTextEmbeddingFunctionWithoutModel () {
@@ -3855,9 +3852,11 @@ public void testKnnFunctionWithTextEmbedding() {
38553852 assumeTrue ("KNN function capability required" , EsqlCapabilities .Cap .KNN_FUNCTION_V5 .isEnabled ());
38563853 assumeTrue ("TEXT_EMBEDDING function required" , EsqlCapabilities .Cap .TEXT_EMBEDDING_FUNCTION .isEnabled ());
38573854
3858- LogicalPlan plan = analyze ("""
3859- from test | where KNN(float_vector, TEXT_EMBEDDING("italian food recipe", "%s"))
3860- """ .formatted (TEXT_EMBEDDING_INFERENCE_ID ), "mapping-dense_vector.json" );
3855+ LogicalPlan plan = analyze (
3856+ String .format (Locale .ROOT , """
3857+ from test | where KNN(float_vector, TEXT_EMBEDDING("italian food recipe", "%s"))""" , TEXT_EMBEDDING_INFERENCE_ID ),
3858+ "mapping-dense_vector.json"
3859+ );
38613860
38623861 Limit limit = as (plan , Limit .class );
38633862 Filter filter = as (limit .child (), Filter .class );
0 commit comments