-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement proper deserialization of EsqlQueryResponse
#8062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a general q? on the response mapping.
|
||
public sealed partial class EsqlQueryResponse | ||
{ | ||
public byte[] Data { get; init; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we gonna expose this more concretely in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mpdreamz The response is modelled like this in the specification:
export class Response {
body: EsqlColumns
}
export type EsqlColumns = ArrayBuffer
Depending on the "format" query parameter, this buffer might contain JSON, CSV, ... (and even a binary Arrow dataframe in the future). Internally, we call this the "raw API".
The plan is to provide helper functions on top of the raw API for different usecases. Not all clients will implement the same high level helpers, but for .NET I'll definitely want to add at least the "Object API" (aka simple deserialization into source classes) and the "Arrow Dataframe API".
Co-authored-by: Florian Bernd <git@flobernd.de>
Co-authored-by: Florian Bernd <git@flobernd.de>
Uses
CustomResponseBuilder
to property deserializeEsqlQueryResponse
.Additional changes:
RequestParameters
with thepartial
modifier.