### Description

This is to investigate what we could do to support the data streams in SQL. The backing indices can be queried already, but to address them similarly as they're queried over QDSL one would need to construct a pattern learned out of band and not through SQL metadata discovery mechanisms.
x-pack/plugin/sql/qa/server/src/main/java/org/elasticsearch/xpack/sql/qa/rest/BaseRestSqlTestCase.java
} else {
            return value.doubleValue();
        }
    }
    public static Map<String, Object> toMap(Response response, String mode) throws IOException {
        Mode m = Mode.fromString(mode);
        try (InputStream content = response.getEntity().getContent()) {
            
            if (Mode.isDriver(m) || m == Mode.CLI) {
                return XContentHelper.convertToMap(CborXContent.cborXContent, content, false);
            } else {
                return XContentHelper.convertToMap(JsonXContent.jsonXContent, content, false);
            }
        }
    }
    public static Tuple<String, String> runSqlAsText(RequestObjectBuilder requestObject, String format) throws IOException {
        Request request = new Request("POST", SQL_QUERY_REST_ENDPOINT);
        request.addParameter("error_trace", "true");
        request.setEntity(new StringEntity(requestObject.toString(), ContentType.APPLICATION_JSON));
        RequestOptions.Builder options = request.getOptions().toBuilder();
        options.addHeader("Accept", format);
        request.setOptions(options);
        Response response = client().performRequest(request);
        return new Tuple<>(
            Streams.copyToString(new InputStreamReader(response.getEntity().getContent(), StandardCharsets.UTF_8)),
            response.getHeader("Cursor")
        );
    }
}