### Description

For a query with params like `"params": [{"x": 1}, {"y": 2}]` running in a JVM with assertions disabled results in:

```
  "error": {
    "root_cause": [
      {
        "type": "x_content_parse_exception",
        "reason": "Failed to build [params] after last required field arrived"
      }
    ],
    "type": "x_content_parse_exception",
    "reason": "[3:19] [esql/query] failed to parse field [params]",
    "caused_by": {
      "type": "x_content_parse_exception",
      "reason": "Failed to build [params] after last required field arrived",
      "caused_by": {
        "type": "array_index_out_of_bounds_exception",
        "reason": "Index 1 out of bounds for length 0"
      }
    }
  }
```

but with assertions enabled:

```
[2023-09-07T13:03:21,434][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [runTask-0] fatal error in thread [Thread-2], exiting java.lang.AssertionError: [params] must configure at least one constructor argument. If it doesn't have any it should use ObjectParser instead of ConstructingObjectParser. This is a bug in the parser declaration.
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ConstructingObjectParser$Target.finish(ConstructingObjectParser.java:543)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ConstructingObjectParser.parse(ConstructingObjectParser.java:166)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ConstructingObjectParser.apply(ConstructingObjectParser.java:158)
┬╗      at org.elasticsearch.xpack.esql.action.EsqlQueryRequest.parseParams(EsqlQueryRequest.java:181)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.AbstractObjectParser.lambda$declareField$0(AbstractObjectParser.java:174)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.lambda$declareField$10(ObjectParser.java:431)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.parseValue(ObjectParser.java:609)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.parseArray(ObjectParser.java:604)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.parseSub(ObjectParser.java:643)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.parse(ObjectParser.java:315)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.parse(ObjectParser.java:259)
┬╗      at org.elasticsearch.xcontent@8.11.0-SNAPSHOT/org.elasticsearch.xcontent.ObjectParser.apply(ObjectParser.java:382)
┬╗      at org.elasticsearch.xpack.esql.action.EsqlQueryRequest.fromXContent(EsqlQueryRequest.java:144)
┬╗      at org.elasticsearch.xpack.esql.action.RestEsqlQueryAction.prepareRequest(RestEsqlQueryAction.java:45)
```
x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RestEsqlTestCase.java
}
    public void testCSVNoHeaderMode() throws IOException {
        bulkLoadTestData(1);
        var builder = builder().query(fromIndex() + " | keep keyword, integer").build();
        Request request = prepareRequest();
        String mediaType = attachBody(builder, request);
        RequestOptions.Builder options = request.getOptions().toBuilder();
        options.addHeader("Content-Type", mediaType);
        options.addHeader("Accept", "text/csv; header=absent");
        request.setOptions(options);
        HttpEntity entity = performRequest(request, List.of());
        String actual = Streams.copyToString(new InputStreamReader(entity.getContent(), StandardCharsets.UTF_8));
        assertEquals("keyword0,0\r\n", actual);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/98719")
    public void testWarningHeadersOnFailedConversions() throws IOException {
        int count = randomFrom(10, 40, 60);
        bulkLoadTestData(count);
        Request request = prepareRequest();
        var query = fromIndex() + " | eval asInt = to_int(case(integer % 2 == 0, to_str(integer), keyword))";
        var mediaType = attachBody(new RequestObjectBuilder().query(query).build(), request);
        RequestOptions.Builder options = request.getOptions().toBuilder();
        options.setWarningsHandler(WarningsHandler.PERMISSIVE);
        options.addHeader("Content-Type", mediaType);
        options.addHeader("Accept", mediaType);
        request.setOptions(options);
        Response response = client().performRequest(request);
        assertThat(response.getStatusLine().getStatusCode(), is(200));
        int expectedWarnings = Math.min(count / 2, 20);
        var warnings = response.getWarnings();