Skip to content
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

SQL: clients REST payload format control simplification #52587

Open
bpintea opened this issue Feb 20, 2020 · 3 comments
Open

SQL: clients REST payload format control simplification #52587

bpintea opened this issue Feb 20, 2020 · 3 comments
Labels
:Analytics/SQL SQL querying Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@bpintea
Copy link
Contributor

bpintea commented Feb 20, 2020

Currently (since #48261), the server will respond with CBOR to the JDBC,ODBC,CLI clients when the request object field binary_format is set to true, but also if absent. It does so taking precedence over the Accept HTTP header and the format query string/URL parameter.
(As a side note, currently both CLI and JDBC always set Accept: application/json, even along with "binary_format": true, which seems contradictory.)

If binary_format is present and false however, the choice is deferred to the other content format methods.

Since (1) the format type is decided based on the client's type and (2) there is already a clear default for the above mentioned clients, it might make sense to simply drop the binary_format parameter altogether and only base the decision on the client type, which is always provided by these clients. For the troubleshooting purposes when JSON would be desired, the clients could make use of the already existing controls (HTTP header or parameter).

This would simplify the interface and potentially keep the backwards-compatibility effort around the SQL API lower (besides being more HTTP standard friendly).

This assumes however that having an explicit format control embedded into the request object and prevent HTTP-based controls from interfering does not bring a clear benefit -- which might not be all true?

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

@rjernst rjernst added the Team:QL (Deprecated) Meta label for query languages team label May 4, 2020
@bpintea bpintea self-assigned this May 25, 2020
@bpintea bpintea removed their assignment Jan 26, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@wchaparro wchaparro removed the Team:QL (Deprecated) Meta label for query languages team label Jan 17, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 17, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

6 participants