-
Notifications
You must be signed in to change notification settings - Fork 723
Open
Open
Copy link
Description
🐛 Bug report
Reported by @cnasikas:
We’re using the JS
esClient.helpers.esql().toArrowReader()helper to stream Arrow IPC results. When the ES|QL query produces errors like unsupported field types likedate_range, Elasticsearch correctly returns a JSON error
(content-type: application/vnd.elasticsearch+json;compatible-with=9)
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"ES|QL type [date_range] is not supported by the Arrow format"}],"type":"illegal_argument_exception","reason":"ES|QL type [date_range] is not supported by the Arrow format"},"status":400}
but the helper still passes this response into AsyncRecordBatchStreamReader, which then throws a misleading Arrow metadata error ("Expected to read … metadata bytes").
To reproduce
still working on reproduction steps
Expected behavior
A more appropriate error should be thrown, and streaming should be cleanly terminated.
Node.js version
n/a
@elastic/elasticsearch version
9
Operating system
n/a
Any other relevant environment information
No response
Reactions are currently unavailable