SQL: binary communication implementation for drivers and the CLI#48261
SQL: binary communication implementation for drivers and the CLI#48261astefan merged 12 commits intoelastic:masterfrom
Conversation
Add request parameter to disable binary response and fallback to json for drivers only, for debugging purposes.
|
Pinging @elastic/es-search (:Search/SQL) |
matriv
left a comment
There was a problem hiding this comment.
Nice work! Left some comments though, but for some maybe I'm just confused.
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/RestSqlTestCase.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/RestSqlTestCase.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/BaseRestSqlTestCase.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/BaseRestSqlTestCase.java
Outdated
Show resolved
Hide resolved
...sql/qa/security/src/test/java/org/elasticsearch/xpack/sql/qa/security/RestSqlSecurityIT.java
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/SqlProtocolTestCase.java
Show resolved
Hide resolved
|
Shouldn't the 7.x label be |
I think so, 7.5.0 has already a build candidate: |
configuration for CLI.
matriv
left a comment
There was a problem hiding this comment.
Great work @astefan! And really nice testing!
I left some comments, most very minor. I'm a bit concerned about this though: https://github.com/elastic/elasticsearch/pull/48261/files#diff-fceb0a242e81eb82e7a233209889929fR65 if you could take another look.
x-pack/plugin/sql/sql-client/src/main/java/org/elasticsearch/xpack/sql/client/HttpClient.java
Show resolved
Hide resolved
...plugin/sql/sql-cli/src/test/java/org/elasticsearch/xpack/sql/cli/ConnectionBuilderTests.java
Outdated
Show resolved
Hide resolved
...ck/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/SqlQueryRequest.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/ConnectionBuilder.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/RestSqlTestCase.java
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/RestSqlTestCase.java
Show resolved
Hide resolved
.../sql/sql-client/src/test/java/org/elasticsearch/xpack/sql/client/HttpClientRequestTests.java
Outdated
Show resolved
Hide resolved
.../sql/sql-client/src/test/java/org/elasticsearch/xpack/sql/client/HttpClientRequestTests.java
Outdated
Show resolved
Hide resolved
.../sql/sql-client/src/test/java/org/elasticsearch/xpack/sql/client/HttpClientRequestTests.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/SqlProtocolTestCase.java
Show resolved
Hide resolved
|
@elasticmachine run elasticsearch-ci/1 |
costin
left a comment
There was a problem hiding this comment.
LGTM. The only concern I have is around the parameter name - binary is fairly vague and I would give it some more context (binary protocol, binary encoding,etc...).
| static final ParseField FIELD_MULTI_VALUE_LENIENCY = new ParseField("field_multi_value_leniency"); | ||
| static final ParseField INDEX_INCLUDE_FROZEN = new ParseField("index_include_frozen"); | ||
|
|
||
| static final ParseField BINARY_COMMUNICATION = new ParseField("binary"); |
There was a problem hiding this comment.
I find "binary" confusing - how about binary_format or binary_protocol?
There was a problem hiding this comment.
binary_format it is, I'll change it.
| * See {@code SqlTranslateRequest.toXContent} | ||
| */ | ||
| private Boolean columnar = Boolean.FALSE; | ||
| private Boolean binaryCommunication = null; |
There was a problem hiding this comment.
Move the defaults in the Protocol class as the other classes (same for columnar).
binary.format for jdbc.
) * Introduce binary_format request parameter (binary.format for JDBC) to disable binary communication between clients (jdbc/odbc) and server. * for CLI - "binary" command line parameter (or -b) is introduced. Default value is "true". * binary communication (cbor) is enabled by default * disabling request parameter introduced for debugging purposes only (cherry picked from commit f96a5ca)
This PR adds binary (CBOR) communication between server and drivers (JDBC/ODBC) and, also, the CLI. It, also, introduces a request parameter -
binary- with debugging purposes to disable the binary response and get back to JSON text format when needed. But, by default, when the parameter is not specifically set, the behavior is to encode the response in CBOR format.Implementation for #47785.