OpenSearch/sql
Nik Everett 193f22b97f SQL: Support larger strings in binary protocol (elastic/x-pack-elasticsearch#3130)
While we're fairly sure we're going to remove the binary protocol in the
long run, we're also fairly sure we're going to release the first
version of SQL with the binary protocol. One big problem with it is that
it blows up when it attempts to serialize fairly long strings. These
long strings are actually quite common in the CLI. They are also
possible in JDBC. I say "fairly long strings" because exactly how long
the strings has to be is kind of funky. It is based on the number of
bytes that it takes to encode the string, and the strings are encoded in
a utf-8-like encoding of utf-16 encoded string documented here:
https://docs.oracle.com/javase/7/docs/api/java/io/DataOutput.html#writeUTF(java.lang.String)

Anyway, this fixes the protocol for these "fairly long strings" by
chunking the strings and adding an extra 4 byte integer before each
string to count the number of chunks. After that 4 byte integer the
strings are serialized using the "normal" DataInput/DataOutput encoding,
the funny utf-8-like encoding of the utf-16 encoded string.

relates elastic/x-pack-elasticsearch#3018

Original commit: elastic/x-pack-elasticsearch@11f0d59f20
2017-11-27 18:59:31 -05:00
..
cli SQL: Switch to URI parsing (elastic/x-pack-elasticsearch#3108) 2017-11-27 18:09:05 -05:00
cli-proto SQL: Throw exceptions on errors (elastic/x-pack-elasticsearch#3066) 2017-11-22 11:22:31 -05:00
jdbc SQL: Switch to URI parsing (elastic/x-pack-elasticsearch#3108) 2017-11-27 18:09:05 -05:00
jdbc-proto SQL: Throw exceptions on errors (elastic/x-pack-elasticsearch#3066) 2017-11-22 11:22:31 -05:00
server SQL: Add support for plain text output to /_sql endpoint (elastic/x-pack-elasticsearch#3124) 2017-11-27 18:10:13 -05:00
shared-client SQL: Rework SSL testing (elastic/x-pack-elasticsearch#3126) 2017-11-27 18:52:16 -05:00
shared-proto SQL: Support larger strings in binary protocol (elastic/x-pack-elasticsearch#3130) 2017-11-27 18:59:31 -05:00
test-utils Teach SQL to parse Elasticsearch's standard error responses (elastic/x-pack-elasticsearch#2764) 2017-11-14 21:31:35 -05:00
build.gradle SQL: Move all SQL projects into org.elasticsearch.sql package (elastic/x-pack-elasticsearch#3069) 2017-11-21 10:53:40 +01:00