Skip to content

Commit 0bfbe47

Browse files
committed
Fix forbidden API usage
1 parent 5f3f9d5 commit 0bfbe47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PreOptimizerTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.elasticsearch.xpack.esql.plan.logical.Eval;
2828
import org.elasticsearch.xpack.esql.plan.logical.Filter;
2929

30+
import java.nio.charset.StandardCharsets;
3031
import java.util.ArrayList;
3132
import java.util.List;
3233

@@ -180,7 +181,7 @@ public TextEmbeddingResults<?> embeddingResults(String input) {
180181
}
181182

182183
private byte[] bytes(String input) {
183-
return input.getBytes();
184+
return input.getBytes(StandardCharsets.UTF_8);
184185
}
185186

186187
public float[] embedding(String input) {

0 commit comments

Comments
 (0)