You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of 0.16.0, Druid SQL queries made using JSON over HTTP to the Druid broker would by default return a JSON array of JSON objects (with "resultFormat": "object").
This is an alternative resultFormat proposal which is similar to the default object, but returns a JSON object wrapping the JSON result array.
Motivation
Two primary reasons for this proposal:
This would keep the successful response consistent with the error response, also containing a JSON object as shown here.
In addition, some serialization formats like JSON<->protobuf today don't support (un)marshaling a top-level JSON array, so a JSON object would be preferred (instead of manually concatenating the JSON array results) - more details can be found here.
The new resultFormat will be a JSON object containing a key, for example "data", and then have the resulting JSON array as the value. This is similar to the “error” response case, where we have "error", "errorMessage", etc., as the keys in the response object.
Description
As of
0.16.0
, Druid SQL queries made using JSON over HTTP to the Druid broker would by default return a JSON array of JSON objects (with"resultFormat": "object"
).This is an alternative
resultFormat
proposal which is similar to the defaultobject
, but returns a JSON object wrapping the JSON result array.Motivation
Two primary reasons for this proposal:
The new
resultFormat
will be a JSON object containing a key, for example"data"
, and then have the resulting JSON array as the value. This is similar to the “error” response case, where we have"error"
,"errorMessage"
, etc., as the keys in the response object.Example of current behavior:
Proposal format:
The text was updated successfully, but these errors were encountered: