You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2015/09/30 21:58:17 UTC

incubator-calcite git commit: [CALCITE-866] Break out Avatica documentation and add JSON reference (Josh Elser)

Repository: incubator-calcite
Updated Branches:
  refs/heads/master 1c292a9d5 -> 538a7df86


[CALCITE-866] Break out Avatica documentation and add JSON reference (Josh Elser)

Close apache/incubator-calcite#137


Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/538a7df8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/538a7df8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/538a7df8

Branch: refs/heads/master
Commit: 538a7df8636e7e76ef3a7ae8964065efbbefa634
Parents: 1c292a9
Author: Josh Elser <el...@apache.org>
Authored: Wed Sep 9 13:36:30 2015 -0400
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed Sep 30 11:13:20 2015 -0700

----------------------------------------------------------------------
 site/_data/docs.yml                  |   7 +-
 site/_docs/avatica.md                | 105 -----
 site/_docs/avatica_json_reference.md | 703 ++++++++++++++++++++++++++++++
 site/_docs/avatica_overview.md       | 106 +++++
 site/_docs/avatica_roadmap.md        |  51 +++
 site/_includes/docs_ul.html          |   7 +-
 6 files changed, 872 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_data/docs.yml
----------------------------------------------------------------------
diff --git a/site/_data/docs.yml b/site/_data/docs.yml
index d6641e0..edd26a3 100644
--- a/site/_data/docs.yml
+++ b/site/_data/docs.yml
@@ -24,10 +24,15 @@
 - title: Advanced
   docs:
   - adapter
-  - avatica
   - stream
   - lattice
 
+- title: Avatica
+  docs:
+  - avatica_overview
+  - avatica_roadmap
+  - avatica_json_reference
+
 - title: Reference
   docs:
   - reference

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_docs/avatica.md
----------------------------------------------------------------------
diff --git a/site/_docs/avatica.md b/site/_docs/avatica.md
deleted file mode 100644
index 835f115..0000000
--- a/site/_docs/avatica.md
+++ /dev/null
@@ -1,105 +0,0 @@
----
-layout: docs
-title: Avatica
-permalink: /docs/avatica.html
----
-
-<!--
-{% comment %}
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to you under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
--->
-
-Avatica is a framework for building JDBC and ODBC drivers for databases,
-and an RPC wire protocol.
-
-![Avatica Architecture](https://raw.githubusercontent.com/julianhyde/share/master/slides/avatica-architecture.png)
-
-Avatica's Java binding has very few dependencies.
-Even though it is part of Apache Calcite it does not depend on other parts of
-Calcite. It depends only on JDK 1.7+ and Jackson.
-
-Avatica's wire protocol is JSON over HTTP.
-The Java implementation uses Jackson to convert request/response command
-objects to/from JSON.
-
-Avatica-Server is a Java implementation of Avatica RPC.
-It embeds the Jetty HTTP server.
-
-Core concepts:
-
-* Meta is a local API sufficient to implement any Avatica provider
-* Factory creates implementations of the JDBC classes (Driver, Connection,
-  Statement, ResultSet) on top of a Meta
-* Service is an interface that implements the functions of Meta in terms
-  of request and response command objects
-
-## JDBC
-
-Avatica implements JDBC by means of Factory.
-Factory creates implementations of the JDBC classes (Driver, Connection,
-Statement, PreparedStatement, ResultSet) on top of a Meta.
-
-## ODBC
-
-Work has not started on Avatica ODBC.
-
-Avatica ODBC would use the same wire protocol and could use the same server
-implementation in Java. The ODBC client would be written in C or C++.
-
-Since the Avatica protocol abstracts many of the differences between providers,
-the same ODBC client could be used for different databases.
-
-## Project structure
-
-We know that it is important that client libraries have minimal dependencies.
-
-Avatica is currently part of Apache Calcite.
-It does not depend upon any other part of Calcite.
-At some point Avatica could become a separate project.
-
-Packages:
-
-* [org.apache.calcite.avatica]({{ site.apiRoot }}/org/apache/calcite/avatica/package-summary.html) Core framework
-* [org.apache.calcite.avatica.remote]({{ site.apiRoot }}/org/apache/calcite/avatica/remote/package-summary.html) JDBC driver that uses remote procedure calls
-* [org.apache.calcite.avatica.server]({{ site.apiRoot }}/org/apache/calcite/avatica/server/package-summary.html) HTTP server
-* [org.apache.calcite.avatica.util]({{ site.apiRoot }}/org/apache/calcite/avatica/util/package-summary.html) Utilities
-
-## Status
-
-### Implemented
-
-* Create connection, create statement, metadata, prepare, bind, execute, fetch
-* RPC using JSON over HTTP
-* Local implementation
-* Implementation over an existing JDBC driver
-* Composite RPCs (combining several requests into one round trip)
-  * Execute-Fetch
-  * Metadata-Fetch (metadata calls such as getTables return all rows)
-
-### Not implemented
-
-* ODBC
-* RPCs
-  * CloseStatement
-  * CloseConnection
-* Composite RPCs
-  * CreateStatement-Prepare
-  * CloseStatement-CloseConnection
-  * Prepare-Execute-Fetch (Statement.executeQuery should fetch first N rows)
-* Remove statements from statement table
-* DML (INSERT, UPDATE, DELETE)
-* Statement.execute applied to SELECT statement

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_docs/avatica_json_reference.md
----------------------------------------------------------------------
diff --git a/site/_docs/avatica_json_reference.md b/site/_docs/avatica_json_reference.md
new file mode 100644
index 0000000..d84aa59
--- /dev/null
+++ b/site/_docs/avatica_json_reference.md
@@ -0,0 +1,703 @@
+---
+layout: docs
+title: Avatica JSON Reference
+sidebar_title: JSON Reference
+permalink: /docs/avatica_json_reference.html
+requests:
+  - { name: "CatalogsRequest" }
+  - { name: "CloseConnectionRequest" }
+  - { name: "CloseStatementRequest" }
+  - { name: "ColumnsRequest" }
+  - { name: "ConnectionSyncRequest" }
+  - { name: "CreateStatementRequest" }
+  - { name: "DatabasePropertyRequest" }
+  - { name: "FetchRequest" }
+  - { name: "PrepareAndExecuteRequest" }
+  - { name: "PrepareRequest" }
+  - { name: "SchemasRequest" }
+  - { name: "TableTypesRequest" }
+  - { name: "TablesRequest" }
+  - { name: "TypeInfoRequest" }
+miscellaneous:
+  - { name: "ConnectionProperties" }
+  - { name: "TypedValue" }
+  - { name: "Signature" }
+  - { name: "Frame" }
+  - { name: "StatementHandle" }
+  - { name: "DatabaseProperty" }
+  - { name: "ColumnMetaData" }
+  - { name: "AvaticaParameter" }
+  - { name: "AvaticaType" }
+  - { name: "Rep" }
+  - { name: "CursorFactory" }
+  - { name: "Style" }
+responses:
+  - { name: "ResultSetResponse" }
+  - { name: "ExecuteResponse" }
+  - { name: "PrepareResponse" }
+  - { name: "FetchResponse" }
+  - { name: "CreateStatementResponse" }
+  - { name: "CloseStatementResponse" }
+  - { name: "CloseConnectionResponse" }
+  - { name: "ConnectionSyncResponse" }
+  - { name: "DatabasePropertyResponse" }
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+As Avatica uses JSON to serialize messages sent over an HTTP transport,
+the RPC layer is agnostic of the language used by a client. While the Avatica
+server is written in Java, this enables clients to interact with the server
+using any language instead of being limited to Java.
+
+A specification of the JSON request and response objects are documented
+below. Programmatic bindings for these JSON objects are only available
+in Java, so non-Java clients presently must re-implement language
+specific objects on their own. Efforts to use [Protocol Buffers](https://developers.google.com/protocol-buffers/)
+instead are underway that will provide native objects in many languages.
+
+## Index
+
+### Requests
+<ul>
+  {% for item in page.requests %}<li><a href="#{{ item.name | downcase }}">{{ item.name }}</a></li>{% endfor %}
+</ul>
+
+### Responses
+<ul>
+  {% for item in page.responses %}<li><a href="#{{ item.name | downcase }}">{{ item.name }}</a></li>{% endfor %}
+</ul>
+
+### Miscellaneous
+<ul>
+  {% for item in page.miscellaneous %}<li><a href="#{{ item.name | downcase }}">{{ item.name }}</a></li>{% endfor %}
+</ul>
+
+
+## Requests
+
+The collection of all JSON objects accepted as requests to Avatica. All Requests include a `request` attribute
+which uniquely identifies the concrete Request from all other Requests.
+
+### CatalogsRequest
+
+{% highlight json %}
+{
+  "request": "getCatalogs",
+}
+{% endhighlight %}
+
+There are no extra attributes on this Request.
+
+### CloseConnectionRequest
+
+{% highlight json %}
+{
+  "request": "closeConnection",
+  "connectionId": "000000-0000-0000-00000000"
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier of the connection to close.
+
+### CloseStatementRequest
+
+{% highlight json %}
+{
+  "request": "closeStatement",
+  "connectionId": "000000-0000-0000-00000000",
+  "statementId": 12345
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier of the connection to which the statement belongs.
+
+`statementId` (required integer) The identifier of the statement to close.
+
+### ColumnsRequest
+
+{% highlight json %}
+{
+  "request": "getColumns",
+  "catalog": "catalog",
+  "schemaPattern": "schema_pattern.*",
+  "tableNamePattern": "table_pattern.*",
+  "columnNamePattern": "column_pattern.*"
+}
+{% endhighlight %}
+
+`catalog` (optional string) The name of a catalog to limit returned columns.
+
+`schemaPattern` (optional string) A Java Pattern against schemas to limit returned columns.
+
+`tableNamePattern` (optional string) A Java Pattern against table names to limit returned columns.
+
+`columnNamePattern` (optional string) A Java Pattern against column names to limit returned columns.
+
+### ConnectionSyncRequest
+
+{% highlight json %}
+{
+  "request": "connectionSync",
+  "connectionId": "000000-0000-0000-00000000",
+  "connProps": ConnectionProperties
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier of the connection to synchronize.
+
+`connProps` (optional nested object) A <a href="#connectionproperties">ConnectionProperties</a> object to synchronize between the client and server.
+
+### CreateStatementRequest
+
+{% highlight json %}
+{
+  "request": "createStatement",
+  "connectionId": "000000-0000-0000-00000000"
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier of the connection to use in creating a statement.
+
+### DatabasePropertyRequest
+
+{% highlight json %}
+{
+  "request": "databaseProperties",
+}
+{% endhighlight %}
+
+There are no extra attributes on this Request.
+
+### FetchRequest
+
+{% highlight json %}
+{
+  "request": "fetch",
+  "connectionId": "000000-0000-0000-00000000",
+  "statementId": 12345,
+  "offset": 0,
+  "fetchMaxRowCount": 100,
+  "parameterValues": [TypedValue, TypedValue, ...]
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier of the connection to use.
+
+`statementId` (required integer) The identifier of the statement created using the above connection.
+
+`offset` (required integer) The positional offset into a result set to fetch.
+
+`fetchMatchRowCount` (required integer) The maximum number of rows to return in the response to this request.
+
+`parameterValues` (optional array of nested objects) The types of the object to set on the prepared statement in use.
+
+### PrepareAndExecuteRequest
+
+{% highlight json %}
+{
+  "request": "prepareAndExecute",
+  "connectionId": "000000-0000-0000-00000000",
+  "statementId": 12345,
+  "sql": "SELECT * FROM table",
+  "maxRowCount": 100,
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier for the connection to use.
+
+`statementId` (required integer) The identifier for the statement created by the above connection to use.
+
+`sql` (required string) A SQL statement
+
+`maxRowCount` (required long) The maximum number of rows returned in the response.
+
+### PrepareRequest
+
+{% highlight json %}
+{
+  "request": "prepare",
+  "connectionId": "000000-0000-0000-00000000",
+  "sql": "SELECT * FROM table",
+  "maxRowCount": 100,
+}
+{% endhighlight %}
+
+`connectionId` (required string) The identifier for the connection to use.
+
+`sql` (required string) A SQL statement
+
+`maxRowCount` (required long) The maximum number of rows returned in the response.
+
+### SchemasRequest
+
+{% highlight json %}
+{
+  "request": "getSchemas",
+  "catalog": "name",
+  "schemaPattern": "pattern.*"
+}
+{% endhighlight %}
+
+`catalog` (required string) The name of the catalog to fetch the schema from.
+
+`schemaPattern` (required string) A Java pattern of schemas to fetch.
+
+### TableTypesRequest
+
+{% highlight json %}
+{
+  "request": "getTableTypes",
+}
+{% endhighlight %}
+
+There are no extra attributes on this Request.
+
+### TablesRequest
+
+{% highlight json %}
+{
+  "request": "getTables",
+  "catalog": "catalog_name",
+  "schemaPattern": "schema_pattern.*",
+  "tableNamePattern": "table_name_pattern.*",
+  "typeList": [ "TABLE", "VIEW", ... ]
+}
+{% endhighlight %}
+
+`catalog` (optional string) The name of a catalog to restrict fetched tables.
+
+`schemaPattern` (optional string) A Java Pattern representing schemas to include in fetched tables.
+
+`tableNamePattern` (optional string) A Java Pattern representing table names to include in fetched tables.
+
+`typeList` (optional array of string) A list of table types used to restrict fetched tables.
+
+### TypeInfoRequest
+
+{% highlight json %}
+{
+  "request": "getTypeInfo",
+}
+{% endhighlight %}
+
+There are no extra attributes on this Request.
+
+## Responses
+
+The collection of all JSON objects returned as responses from Avatica. All Responses include a `response` attribute
+which uniquely identifies the concrete Response from all other Responses.
+
+### ResultSetResponse
+
+{% highlight json %}
+{
+  "response": "resultSet",
+  "connectionId": "000000-0000-0000-00000000",
+  "statementId": 12345,
+  "ownStatement": true,
+  "signature": Signature,
+  "firstFrame": Frame,
+  "updateCount": 10
+}
+{% endhighlight %}
+
+`connectionId` The identifier for the connection used to generate this response.
+
+`statementId` The identifier for the statement used to generate this response.
+
+`ownStatement` Whether the result set has its own dedicated statement. If true, the server must automatically close the
+statement when the result set is closed. This is used for JDBC metadata result sets, for instance.
+
+`signature` A non-optional nested object <a href="#signature">Signature</a>
+
+`firstFrame` A optional nested object <a href="#frame">Frame</a>
+
+`updateCount` A number which is always `-1` for normal result sets. Any other value denotes a "dummy" result set
+that only contains this count and no additional data.
+
+### ExecuteResponse
+
+{% highlight json %}
+{
+  "response": "Service$ExecuteResponse",
+  "resultSets": [ ResultSetResponse, ResultSetResponse, ... ]
+}
+{% endhighlight %}
+
+`resultSets` An array of <a href="#resultsetresponse">ResultSetResponse</a>s.
+
+### PrepareResponse
+
+{% highlight json %}
+{
+  "response": "prepare",
+  "statement": StatementHandle
+}
+{% endhighlight %}
+
+`statement` A <a href="#statementhandle">StatementHandle</a> object.
+
+### FetchResponse
+
+{% highlight json %}
+{
+  "response": "fetch",
+  "frame": Frame
+}
+{% endhighlight %}
+
+`frame` A <a href="#frame">Frame</a> containing the results of the fetch.
+
+### CreateStatementResponse
+
+{% highlight json %}
+{
+  "response": "createStatement",
+  "connectionId": "000000-0000-0000-00000000",
+  "statementId": 12345
+}
+{% endhighlight %}
+
+`connectionId` The identifier for the connection used to create the statement.
+
+`statementId` The identifier for the created statement.
+
+### CloseStatementResponse
+
+{% highlight json %}
+{
+  "response": "closeStatement",
+}
+{% endhighlight %}
+
+This response has no attributes.
+
+### CloseConnectionResponse
+
+{% highlight json %}
+{
+  "response": "closeConnection",
+}
+{% endhighlight %}
+
+There are no extra attributes on this Response.
+
+### ConnectionSyncResponse
+
+{% highlight json %}
+{
+  "response": "connectionSync",
+  "connProps": ConnectionProperties
+}
+{% endhighlight %}
+
+`connProps` The <a href="#connectionproperties">ConnectionProperties</a> that were synchronized.
+
+### DatabasePropertyResponse
+
+{% highlight json %}
+{
+  "response": "databaseProperties",
+  "map": { DatabaseProperty: Object, DatabaseProperty: Object, ... }
+}
+{% endhighlight %}
+
+`map` A map of <a href="#databaseproperty">DatabaseProperty</a> to value of that property. The value may be some
+primitive type or an array of primitive types.
+
+## Miscellaneous
+
+### ConnectionProperties
+
+{% highlight json %}
+{
+  "connProps": "connPropsImpl",
+  "autoCommit": true,
+  "readOnly": true,
+  "transactionIsolation": 0,
+  "catalog": "catalog",
+  "schema": "schema"
+}
+{% endhighlight %}
+
+`autoCommit` (optional boolean) A boolean denoting if autoCommit is enabled for transactions.
+
+`readOnly` (optional boolean) A boolean denoting if a JDBC connection is read-only.
+
+`transactionIsolation` (optional integer) An integer which denotes the level of transactions isolation per the JDBC
+specification. This value is analogous to the values define in `java.sql.Connection`.
+
+* 0 = Transactions are not supported
+* 1 = Dirty reads, non-repeatable reads and phantom reads may occur.
+* 2 = Dirty reads are prevented, but non-repeatable reads and phantom reads may occur.
+* 4 = Dirty reads and non-repeatable reads are prevented, but phantom reads may occur.
+* 8 = Dirty reads, non-repeatable reads, and phantom reads are all prevented.
+
+### TypedValue
+
+{% highlight json %}
+{
+  "type": "type_name",
+  "value": object
+}
+{% endhighlight %}
+
+`type` A name referring to the type of the object stored in `value`.
+
+`value` A JSON representation of a JDBC type.
+
+### Signature
+
+{% highlight json %}
+{
+  "columns": [ ColumnMetaData, ColumnMetaData, ... ],
+  "sql": "SELECT * FROM table",
+  "parameters": [ AvaticaParameter, AvaticaParameter, ... ],
+  "cursorFactory": CursorFactory
+}
+{% endhighlight %}
+
+`columns` An array of <a href="#columnmetadata">ColumnMetaData</a> objects denoting the schema of the result set.
+
+`sql` The SQL executed.
+
+`parameters` An array of <a href="#avaticaparameter">AvaticaParameter</a> objects denoting type-specific details.
+
+`cursorFactory` An <a href="#cursorfactory">CursorFactory</a> object representing the Java representation of the frame.
+
+### Frame
+
+{% highlight json %}
+{
+  "offset": 100,
+  "done": true,
+  "rows": [ [ val1, val2, ... ], ... ]
+}
+{% endhighlight %}
+
+`offset` The starting position of these `rows` in the encompassing result set.
+
+`done` A boolean denoting whether more results exist for this result set.
+
+`rows` An array of arrays corresponding to the rows and columns for the result set.
+
+### StatementHandle
+
+{% highlight json %}
+{
+  "connectionId": "000000-0000-0000-00000000",
+  "id": 12345,
+  "signature": Signature
+}
+{% endhighlight %}
+
+`connectionId` The identifier of the connection to which this statement belongs.
+
+`id` The identifier of the statement.
+
+`signature` A <a href="#signature">Signature</a> object for the statement.
+
+### DatabaseProperty
+
+One of:
+
+* "GET_STRING_FUNCTIONS"
+* "GET_NUMERIC_FUNCTIONS"
+* "GET_SYSTEM_FUNCTIONS"
+* "GET_TIME_DATE_FUNCTIONS"
+* "GET_S_Q_L_KEYWORDS"
+* "GET_DEFAULT_TRANSACTION_ISOLATION"
+
+### ColumnMetaData
+
+{% highlight json %}
+{
+  "ordinal": 0,
+  "autoIncrement": true,
+  "caseSensitive": true,
+  "searchable": false,
+  "currency": false,
+  "nullable": 0,
+  "signed": true,
+  "displaySize": 20,
+  "label": "Description",
+  "columnName": "col1",
+  "schemaName": "schema",
+  "precision": 10,
+  "scale": 2,
+  "tableName": "table",
+  "catalogName": "catalog",
+  "type": AvaticaType,
+  "readOnly": false,
+  "writable": true,
+  "definitelyWritable": true,
+  "columnClassName": "java.lang.String"
+}
+{% endhighlight %}
+
+`ordinal` A positional offset number.
+
+`autoIncrement` A boolean denoting whether the column is automatically incremented.
+
+`caseSensitive` A boolean denoting whether the column is case sensitive.
+
+`searchable` A boolean denoting whether this column supports all WHERE search clauses.
+
+`currency` A boolean denoting whether this column represents currency.
+
+`nullable` A number denoting whether this column supports null values.
+
+* 0 = No null values are allowed
+* 1 = Null values are allowed
+* 2 = It is unknown if null values are allowed
+
+`signed` A boolean denoting whether the column is a signed numeric.
+
+`displaySize` The character width of the column.
+
+`label` A description for this column.
+
+`columnName` The name of the column.
+
+`schemaName` The schema to which this column belongs.
+
+`precision` The maximum numeric precision supported by this column.
+
+`scale` The maximum numeric scale supported by this column.
+
+`tableName` The name of the table to which this column belongs.
+
+`catalogName` The name of the catalog to which this column belongs.
+
+`type` A nested <a href="#avaticatype">AvaticaType</a> representing the type of the column.
+
+`readOnly` A boolean denoting whether the column is read-only.
+
+`writable` A boolean denoting whether the column is possible to be updated.
+
+`definitelyWritable` A boolean denoting whether the column definitely can be updated.
+
+`columnClassName` The name of the Java class backing the column's type.
+
+### AvaticaParameter
+
+{% highlight json %}
+{
+  "signed": true,
+  "precision": 10,
+  "scale": 2,
+  "parameterType": 8,
+  "typeName": "integer",
+  "className": "java.lang.Integer",
+  "name": "number"
+}
+{% endhighlight %}
+
+`signed` A boolean denoting whether the column is a signed numeric.
+
+`precision` The maximum numeric precision supported by this column.
+
+`scale` The maximum numeric scale supported by this column.
+
+`parameterType` An integer corresponding to the JDBC Types class denoting the column's type.
+
+`typeName` The JDBC type name for this column.
+
+`className` The Java class backing the JDBC type for this column.
+
+`name` The name of the column.
+
+### AvaticaType
+
+{% highlight json %}
+{
+  "type": "scalar",
+  "id": "identifier",
+  "name": "column",
+  "rep": Rep,
+  "columns": [ ColumnMetaData, ColumnMetaData, ... ],
+  "component": AvaticaType
+}
+{% endhighlight %}
+
+`type` One of: `scalar`, `array`, `struct`.
+
+`id` A numeric value corresponding to the type of the object per the JDBC Types class.
+
+`name` The readable name of the JDBC type.
+
+`rep` A nested <a href="#rep">Rep</a> object used by Avatica to hold additional type information.
+
+`columns` For `STRUCT` types, a list of the columns contained in that `STRUCT`.
+
+`component` For `ARRAY` types, the type of the elements contained in that `ARRAY`.
+
+### Rep
+
+One of:
+
+* "PRIMITIVE_BOOLEAN"
+* "PRIMITIVE_BYTE"
+* "PRIMITIVE_CHAR"
+* "PRIMITIVE_SHORT"
+* "PRIMITIVE_INT"
+* "PRIMITIVE_LONG"
+* "PRIMITIVE_FLOAT"
+* "PRIMITIVE_DOUBLE"
+* "BOOLEAN"
+* "BYTE"
+* "CHARACTER"
+* "SHORT"
+* "INTEGER"
+* "LONG"
+* "FLOAT"
+* "DOUBLE"
+* "JAVA_SQL_TIME"
+* "JAVA_SQL_TIMESTAMP"
+* "JAVA_SQL_DATE"
+* "JAVA_UTIL_DATE"
+* "BYTE_STRING"
+* "STRING"
+* "NUMBER"
+* "OBJECT"
+
+### CursorFactory
+
+{% highlight json %}
+{
+  "style": Style,
+  "clazz": "java.lang.String",
+  "fieldNames": [ "column1", "column2", ... ]
+}
+{% endhighlight %}
+
+`style` A string denoting the <a href="#style">Style</a> of the contained objects.
+
+### Style
+
+One of:
+
+* "OBJECT"
+* "RECORD"
+* "RECORD_PROJECTION"
+* "ARRAY"
+* "LIST"
+* "MAP"

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_docs/avatica_overview.md
----------------------------------------------------------------------
diff --git a/site/_docs/avatica_overview.md b/site/_docs/avatica_overview.md
new file mode 100644
index 0000000..54860cf
--- /dev/null
+++ b/site/_docs/avatica_overview.md
@@ -0,0 +1,106 @@
+---
+layout: docs
+title: Avatica Overview
+sidebar_title: Overview
+permalink: /docs/avatica_overview.html
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+Avatica is a framework for building JDBC and ODBC drivers for databases,
+and an RPC wire protocol.
+
+![Avatica Architecture](https://raw.githubusercontent.com/julianhyde/share/master/slides/avatica-architecture.png)
+
+Avatica's Java binding has very few dependencies.
+Even though it is part of Apache Calcite it does not depend on other parts of
+Calcite. It depends only on JDK 1.7+ and Jackson.
+
+Avatica's wire protocol is JSON over HTTP.
+The Java implementation uses Jackson to convert request/response command
+objects to/from JSON.
+
+Avatica-Server is a Java implementation of Avatica RPC.
+It embeds the Jetty HTTP server.
+
+Core concepts:
+
+* Meta is a local API sufficient to implement any Avatica provider
+* Factory creates implementations of the JDBC classes (Driver, Connection,
+  Statement, ResultSet) on top of a Meta
+* Service is an interface that implements the functions of Meta in terms
+  of request and response command objects
+
+## JDBC
+
+Avatica implements JDBC by means of Factory.
+Factory creates implementations of the JDBC classes (Driver, Connection,
+Statement, PreparedStatement, ResultSet) on top of a Meta.
+
+## ODBC
+
+Work has not started on Avatica ODBC.
+
+Avatica ODBC would use the same wire protocol and could use the same server
+implementation in Java. The ODBC client would be written in C or C++.
+
+Since the Avatica protocol abstracts many of the differences between providers,
+the same ODBC client could be used for different databases.
+
+## Project structure
+
+We know that it is important that client libraries have minimal dependencies.
+
+Avatica is currently part of Apache Calcite.
+It does not depend upon any other part of Calcite.
+At some point Avatica could become a separate project.
+
+Packages:
+
+* [org.apache.calcite.avatica]({{ site.apiRoot }}/org/apache/calcite/avatica/package-summary.html) Core framework
+* [org.apache.calcite.avatica.remote]({{ site.apiRoot }}/org/apache/calcite/avatica/remote/package-summary.html) JDBC driver that uses remote procedure calls
+* [org.apache.calcite.avatica.server]({{ site.apiRoot }}/org/apache/calcite/avatica/server/package-summary.html) HTTP server
+* [org.apache.calcite.avatica.util]({{ site.apiRoot }}/org/apache/calcite/avatica/util/package-summary.html) Utilities
+
+## Status
+
+### Implemented
+
+* Create connection, create statement, metadata, prepare, bind, execute, fetch
+* RPC using JSON over HTTP
+* Local implementation
+* Implementation over an existing JDBC driver
+* Composite RPCs (combining several requests into one round trip)
+  * Execute-Fetch
+  * Metadata-Fetch (metadata calls such as getTables return all rows)
+
+### Not implemented
+
+* ODBC
+* RPCs
+  * CloseStatement
+  * CloseConnection
+* Composite RPCs
+  * CreateStatement-Prepare
+  * CloseStatement-CloseConnection
+  * Prepare-Execute-Fetch (Statement.executeQuery should fetch first N rows)
+* Remove statements from statement table
+* DML (INSERT, UPDATE, DELETE)
+* Statement.execute applied to SELECT statement

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_docs/avatica_roadmap.md
----------------------------------------------------------------------
diff --git a/site/_docs/avatica_roadmap.md b/site/_docs/avatica_roadmap.md
new file mode 100644
index 0000000..4caebd4
--- /dev/null
+++ b/site/_docs/avatica_roadmap.md
@@ -0,0 +1,51 @@
+---
+layout: docs
+title: Avatica Roadmap
+sidebar_title: Roadmap
+permalink: /docs/avatica_roadmap.html
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+## Status
+
+### Implemented
+
+* Create connection, create statement, metadata, prepare, bind, execute, fetch
+* RPC using JSON over HTTP
+* Local implementation
+* Implementation over an existing JDBC driver
+* Composite RPCs (combining several requests into one round trip)
+  * Execute-Fetch
+  * Metadata-Fetch (metadata calls such as getTables return all rows)
+
+### Not implemented
+
+* ODBC
+* RPCs
+  * CloseStatement
+  * CloseConnection
+* Composite RPCs
+  * CreateStatement-Prepare
+  * CloseStatement-CloseConnection
+  * Prepare-Execute-Fetch (Statement.executeQuery should fetch first N rows)
+* Remove statements from statement table
+* DML (INSERT, UPDATE, DELETE)
+* Statement.execute applied to SELECT statement

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/538a7df8/site/_includes/docs_ul.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html
index 557ef07..768259c 100644
--- a/site/_includes/docs_ul.html
+++ b/site/_includes/docs_ul.html
@@ -14,8 +14,13 @@
 
   {% for p in site.docs %}
     {% capture p_url %}{{site.baseurl}}{{p.url}}{% endcapture %}
+    {% if p.sidebar_title != nil %}
+      {% assign anchor_text = p.sidebar_title %}
+    {% else %}
+      {% assign anchor_text = p.title %}
+    {% endif %}
     {% if p_url == item_url %}
-      <li class="{{ c }}"><a href="{{ p_url }}">{{ p.title }}</a></li>
+      <li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li>
       {% break %}
     {% endif %}
   {% endfor %}