Proto commits in apache/calcite-avatica

These 23 commits are when the Protocol Buffers files have changed:

Commit:08f2a04
Author:Istvan Toth
Committer:Josh Elser

[CALCITE-4138] Metadata operations via Avatica turn empty string args to null Closes #123 Signed-off-by: Josh Elser <elserj@apache.org>

The documentation is generated from this commit.

Commit:e699a4d
Author:Julian Hyde
Committer:Julian Hyde

[CALCITE-1612] Release Avatica 1.10 Add release notes. Fix assembly descriptor and configuration, following upgrade of maven-assembly-plugin to 3.0. Update release instructions. We now require JDK 8 for release builds, because docker-maven-plugin requires Files.readAllLines.

Commit:557f15c
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1756] Differentiate between implicitly null and explicitly null TypedValues Noticed that a test should have been failing in the ARRAY work. The null TypedValue was getting lost in the serialization. We need to handle these two cases separately to ensure that the "intent" is preserved.

Commit:dd65a2b
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1050] Array support for Avatica As best as possible, works around the limitations of JDBC's Array class to handle arbitrarily nested Arrays. Nested-array support differs from DB to DB, so functionality is primarily driven from structure, rather than metadata. Also, fixes the implementation of Array.getArray(long, int).The arguments are given in terms of one-offset and number of elements, whereas the list.subList(int, int) call is expecting zero-offset and exclusive end-offset. Reduce the "API" changes to avoid downstream changes in Avatica. This "restores" some weirdness in the implementations, but simplifies the upgrade process (probably worth it). Closes apache/calcite-avatica#2

Commit:4a91a9e
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1353] Convert first_frame_max_size to an int32 A uint64 is wrong because -1 is a valid value and Java can only handle a max of 2*^2, not 2^64, elements. Closes apache/calcite-avatica#5

Commit:fc7b26c
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1717] Remove Calcite code and lift avatica * Update .travis.yml * Update source URLs in site * Fix Github references across markdown files * Update the README with the right travis badge * Blog post for the new repo Closes apache/calcite-avatica#1

Commit:08c966b
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1254] Implement Statement#executeLargeBatch() Further work on executeLargeBatch with the help of jhyde: * Remove usage of deprecated prepareAndExecute * saturated cast long to int * do not call deprecated methods internally * make DatabaseMetaData.supportsBatchUpdates return true * JdbcMeta calls executeLargeBatch if underlying DB supports it * clarify javadoc of Meta.closeStatement

Commit:987a257
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1243] Ensure signed fields are used in protobuf for specifying rows to return It was found that the protobuf definitions where specifying some fields in some messages as unsigned integers where Avatica was expecting negative values to be meaningful. We failed to notice this in Avatica because the Java bindings for protobuf are equivalent for signed and unsigned typed. This breaks clients in other languages though. Some confusing logic surrounding `maxRowCount` being used for two different meanings (both maximum number of rows for the statement and the maximum number of rows returned in the first frame) was also corrected since the values in the protocol buffers were being changed. The incorrect fields were deprecated, documented, and backwards-compatibally modified so that older clients can continue to operate without change. Clients in languages which do have differentiation between signedness in types will have to use the newer version of the client and server to get this fix.

Commit:eadc676
Author:Julian Hyde
Committer:Julian Hyde

Remove trailing spaces from all source files

Commit:e010b1b
Author:Josh Elser

[CALCITE-1205] Correct field name in TypedValue 'bytes_values' was incorrectly used instead of 'bytes_value'.

Commit:5dfa3f1
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1128] Implement JDBC batch update methods in remote driver This commit provides an implementation for: * Statement.addBatch(String) * PreparedStatement.addBatch() * PreparedStatement.executeBatch() The implementation is fairly straightforward except for the addition of a new server interface: ProtobufMeta. This is a new interface which the Meta implementation can choose to also implement to provide a "native" implementation on top of Protobuf objects instead of the Avatica POJOs. During the investigations Avatica performance pre-1.7.0, it was found that converting protobufs to POJOs was a very hot code path. This short-circuit helps us avoid extra objects on the heap and computation to create them in what should be a very hot code path for write-workloads. Closes apache/calcite#209

Commit:5cee486
Author:Josh Elser
Committer:Josh Elser

[CALCITE-1078] Detach avatica from the core calcite Maven project The "calcite-avatica" module is still called "calcite-avatica" but is contained in the directory "avatica/core", since avatica is now the parent directory for all of avatica. The present contents of the LICENSE file was incorrect, stating that all artifacts (notably the source tarball) bundled protobuf. This is incorrect. Protobuf was only included in the avatica (client) jar. As such, only that artifact should have the LICENSE file with the appropriate notice in it.

Commit:361096b
Author:Josh Elser
Committer:Julian Hyde

[CALCITE-1040] Differentiate better between arrays and scalars in protobuf The original implementation of ColumnValue tried to always use a repeated field to serialize the value of a column in a row. This was flawed for multiple reasons. Instead, go the "struct" approach like TypedValue. Since we're using protobuf, make the attempt to support the Calcite 1.5 structure (avoid removing the old field).

Commit:322b973
Author:Josh Elser
Committer:Josh Elser

[CALCITE-767] Create commit and rollback Avatica RPC endpoints Includes cleanup to Service pojos and protobuf translation code. Closes apache/calcite#177

Commit:cd58fe7
Author:Josh Elser

[CALCITE-983] Handle nulls in ErrorResponse's protobuf representation better Added some more unit tests to make sure null attributes aren't causing failures in ErrorResponse (and thus causing the client to choke). Also fixed a broken hashCode and added toString.

Commit:3be816f
Author:Josh Elser
Committer:Josh Elser

[CALCITE-989] Add server's address in each response If the clients knows what server processed a response, the client do perform their own load-balancing. Fix some server Handler class hierarchy to make more sense supporting both json and protobuf.

Commit:97df1ac
Author:Josh Elser
Committer:Julian Hyde

[CALCITE-903] Enable Avatica client to recover from missing server-side state (Josh Elser) Close apache/calcite#140

Commit:bf178d5
Author:Josh Elser
Committer:Julian Hyde

[CALCITE-913] Construct proper ColumnMetaData for arrays (Josh Elser)

Commit:5be93fb
Author:Josh Elser
Committer:Julian Hyde

[CALCITE-645] Implement AvaticaSqlException to pass server-side exception information to clients (Josh Elser) Created ErrorResponse to serve as the message to pass between client and server. Attempted to introduce information necessary to fill out SQLException. Some refactoring of the server Handlers was included to unify exception handling.

Commit:a63639b
Author:Bruno Dumon
Committer:Julian Hyde

[CALCITE-912] Add Avatica OpenConnectionRequest (Bruno Dumon) Goal: passing of connection properties (the 'info') from the remote avatica driver to the corresponding server-side connection. Changes include: * in Meta: explicit opening of connections: there is a new openConnection() call. Client decides on the connection id. Implicit creation of unknown connections is gone. * JdbcMeta: default connection is gone, all methods have been extended with a connection id. * correspondingly, the various Service.Request's now carry a connection id (will make fixing CALCITE-871 easy) * (unrelated, but was useful for testing) more meaningful error messages in remote driver

Commit:cee8e84
Author:YeongWei
Committer:Julian Hyde

[CALCITE-705] DML in Avatica, and split Execute out from Fetch request (Yeong Wei) Add support for DML statements (INSERT, UPDATE, DELETE), Statement.executeUpdate returns int update count. Add new 'Execute' request that binds parameters. This used to occur implicitly during first Fetch; Fetch no longer takes parameters. Add statement type. If signature is null then defaults to Meta.StatementType.SELECT. Add testRemoteStatementInsert for JSON and PROTOBUF serialization test. In JsonHandlerTest, replace testFetchRequestWithNumberParameter with testExecuteRequestWithNumberParameter. Cosmetic fix-ups by Julian Hyde. Close apache/incubator-calcite#145 Close apache/incubator-calcite#154

Commit:73e81ac
Author:Jan Van Besien
Committer:Julian Hyde

[CALCITE-905] getTables returns empty result in JdbcMeta (Jan Van Besien) Fix instructions for installing protobuf.

Commit:cb7c213
Author:Josh Elser
Committer:Julian Hyde

[CALCITE-840] Protocol buffer serialization over HTTP for Avatica Server (Josh Elser) Close apache/incubator-calcite#130