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/06/01 19:56:15 UTC

[01/19] incubator-calcite git commit: Update history and version number

Repository: incubator-calcite
Updated Branches:
  refs/heads/master 53b4b0960 -> 3e50232b6


Update history and version number


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

Branch: refs/heads/master
Commit: 4307b8053b77c2d67ad7de2a613f7af1df2379dc
Parents: 53b4b09
Author: Julian Hyde <jh...@apache.org>
Authored: Thu May 21 12:41:50 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu May 21 13:01:56 2015 -0700

----------------------------------------------------------------------
 README         |   2 +-
 README.md      |   2 +-
 doc/history.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/howto.md   |   5 ++-
 4 files changed, 117 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/4307b805/README
----------------------------------------------------------------------
diff --git a/README b/README
index 37e52b4..e06064c 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Apache Calcite release 1.2.0 (incubating)
+Apache Calcite release 1.3.0 (incubating)
 
 This is a source or binary distribution of Apache Calcite.
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/4307b805/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index be6d841..877bc8f 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ with the following Maven coordinates:
 <dependency>
   <groupId>org.apache.calcite</groupId>
   <artifactId>calcite-core</artifactId>
-  <version>1.2.0-incubating</version>
+  <version>1.3.0-incubating</version>
 </dependency>
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/4307b805/doc/history.md
----------------------------------------------------------------------
diff --git a/doc/history.md b/doc/history.md
index b4ee1cb..abb8372 100644
--- a/doc/history.md
+++ b/doc/history.md
@@ -19,6 +19,118 @@ limitations under the License.
 For a full list of releases, see
 <a href="https://github.com/apache/incubator-calcite/releases">github</a>.
 
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.3.0-incubating">1.3.0-incubating</a> / 2015-05-21
+
+Mainly bug-fixes, but this release adds support for
+<a href="https://issues.apache.org/jira/browse/CALCITE-505">modifiable views</a>
+and
+<a href="https://issues.apache.org/jira/browse/CALCITE-704">filtered aggregate functions</a>
+and various improvements to Avatica.
+
+New features
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-505">CALCITE-505</a>]
+  Support modifiable view
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-704">CALCITE-704</a>]
+  `FILTER` clause for aggregate functions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-522">CALCITE-522</a>]
+  In remote JDBC driver, transmit static database properties as a map
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-661">CALCITE-661</a>]
+  Remote fetch in Calcite JDBC driver
+* Support Date, Time, Timestamp parameters
+
+API changes
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-722">CALCITE-722</a>]
+  Rename markdown files to lower-case
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-697">CALCITE-697</a>]
+  Obsolete class `RelOptQuery`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-693">CALCITE-693</a>]
+  Allow clients to control creation of `RelOptCluster`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-691">CALCITE-691</a>]
+  Allow projects to supply alternate SQL parser
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-675">CALCITE-675</a>]
+  Enable `AggregateProjectMergeRule` in standard rule set
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-679">CALCITE-679</a>]
+  Factory method for `SemiJoin`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-674">CALCITE-674</a>]
+  Add a `SWAP_OUTER` static instance to `JoinCommuteRule` (Maryann Xue)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-735">CALCITE-735</a>]
+  `Primitive.DOUBLE.min` should be large and negative
+
+Bug-fixes and internal changes
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-688">CALCITE-688</a>]
+  `splitCondition` does not behave correctly when one side of the condition
+  references columns from different inputs
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-259">CALCITE-259</a>]
+  Using sub-queries in `CASE` statement against JDBC tables generates invalid
+  Oracle SQL (Yeong Wei)
+* In sample code in README.md, rename optiq to calcite (Ethan)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-720">CALCITE-720</a>]
+  `VolcanoPlanner.ambitious` comment doc is inconsistent (Santiago M. Mola)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-729">CALCITE-729</a>]
+  `IndexOutOfBoundsException` in `ROLLUP` query on JDBC data source
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-733">CALCITE-733</a>]
+  Multiple distinct-`COUNT` query gives wrong results
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-730">CALCITE-730</a>]
+  `ClassCastException` in table from `CloneSchema`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-728">CALCITE-728</a>]
+  Test suite hangs on Windows
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-723">CALCITE-723</a>]
+  Document lattices
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-515">CALCITE-515</a>]
+  Add Apache headers to markdown files
+* Upgrade quidem
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-716">CALCITE-716</a>]
+  Scalar sub-query and aggregate function in `SELECT` or `HAVING` clause gives
+  `AssertionError`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-694">CALCITE-694</a>]
+  Scan `HAVING` clause for sub-queries and `IN`-lists (Hsuan-Yi Chu)
+* Upgrade hydromatic-resource-maven-plugin
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-710">CALCITE-710</a>]
+  Identical conditions in the `WHERE` clause cause `AssertionError` (Sean
+  Hsuan-Yi Chu)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-695">CALCITE-695</a>]
+  Do not add `SINGLE_VALUE` aggregate function to a sub-query that will never
+  return more than one row (Hsuan-Yi Chu)
+* Add tests for scalar sub-queries, including test cases for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-709">CALCITE-709</a>]
+  Errors with `LIMIT` inside scalar sub-query
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-702">CALCITE-702</a>]
+  Add validator test for monotonic expressions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-699">CALCITE-699</a>]
+  In Avatica, synchronize access to Calendar
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-700">CALCITE-700</a>]
+  Pass time zone into tests
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-698">CALCITE-698</a>]
+  For `GROUP BY ()`, `areColumnsUnique()` should return true for any key
+* Disable tests that fail under JDK 1.7 due to
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
+* Add "getting started" to HOWTO
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-692">CALCITE-692</a>]
+  Add back sqlline as a dependency
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-677">CALCITE-677</a>]
+  `RemoteDriverTest.testTypeHandling` fails east of Greenwich
+* Disable test for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
+  Make `RemoteDriverTest.testStatementLifecycle` thread-safe
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-686">CALCITE-686</a>]
+  `SqlNode.unparse` produces invalid SQL
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-507">CALCITE-507</a>]
+  Update HOWTO.md with running integration tests
+* Add H2 integration test
+* Add PostgreSQL integration test
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-590">CALCITE-590</a>]
+  Update MongoDB test suite to calcite-test-dataset
+* Add `CalciteAssert.assertArrayEqual` for more user-friendly asserts
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-585">CALCITE-585</a>]
+  Avatica JDBC methods should throw `SQLFeatureNotSupportedException` (Ng Jiunn
+  Jye)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-671">CALCITE-671</a>]
+  `ByteString` does not deserialize properly as a `FetchRequest` parameter value
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-676">CALCITE-676</a>]
+  `AssertionError` in `GROUPING SETS` query
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-678">CALCITE-678</a>]
+  `SemiJoinRule` mixes up fields when `Aggregate.groupSet` is not field #0
+
 ## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.2.0-incubating">1.2.0-incubating</a> / 2015-04-07
 
 A short release, less than a month after 1.1.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/4307b805/doc/howto.md
----------------------------------------------------------------------
diff --git a/doc/howto.md b/doc/howto.md
index 60a4cae..16b722a 100644
--- a/doc/howto.md
+++ b/doc/howto.md
@@ -29,8 +29,8 @@ Unpack the source distribution `.tar.gz` or `.zip` file,
 then build using maven:
 
 ```bash
-$ tar xvfz calcite-1.2.0-incubating-source.tar.gz
-$ cd calcite-1.2.0-incubating
+$ tar xvfz calcite-1.3.0-incubating-source.tar.gz
+$ cd calcite-1.3.0-incubating
 $ mvn install
 ```
 
@@ -417,6 +417,7 @@ Create a release branch named after the release, e.g. `branch-1.1`, and push it
 ```bash
 $ git checkout -b branch-X.Y
 $ git push -u origin branch-X.Y
+```
 
 We will use the branch for the entire the release process. Meanwhile,
 we do not allow commits to the master branch. After the release is


[18/19] incubator-calcite git commit: Calcite DOAP

Posted by jh...@apache.org.
Calcite DOAP


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

Branch: refs/heads/master
Commit: cd9c90858ada88c5cdfb3e2bdd11dee78d8445cf
Parents: 5c049bc
Author: Julian Hyde <jh...@apache.org>
Authored: Wed May 27 19:27:04 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 1 00:01:55 2015 -0700

----------------------------------------------------------------------
 site/doap_calcite.rdf | 59 ++++++++++++++++++++++++++++++++++++++++++++++
 site/doap_orc.rdf     | 56 -------------------------------------------
 2 files changed, 59 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cd9c9085/site/doap_calcite.rdf
----------------------------------------------------------------------
diff --git a/site/doap_calcite.rdf b/site/doap_calcite.rdf
new file mode 100644
index 0000000..cb9f469
--- /dev/null
+++ b/site/doap_calcite.rdf
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+         xmlns="http://usefulinc.com/ns/doap#" 
+         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+         xmlns:asfext="http://projects.apache.org/ns/asfext#"
+         xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<!--
+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.
+-->
+  <Project rdf:about="https://calcite.incubator.apache.org">
+    <created>2015-05-27</created>
+    <license rdf:resource="http://spdx.org/licenses/Apache-2.0" />
+    <name>Apache Calcite</name>
+    <homepage rdf:resource="https://calcite.incubator.apache.org" />
+    <asfext:pmc rdf:resource="https://calcite.incubator.apache.org" />
+    <shortdesc>A dynamic data management framework.</shortdesc>
+    <description>Calcite is a framework for writing data management
+      systems.  It converts queries, represented in relational algebra,
+      into an efficient executable form using pluggable query
+      transformation rules. There is an optional SQL parser and JDBC
+      driver. Calcite does not store data or have a preferred execution
+      engine. Data formats, execution algorithms, planning rules,
+      operator types, metadata, and cost model are added at runtime as
+      plugins.</description>
+    <bug-database rdf:resource="https://issues.apache.org/jira/browse/CALCITE" />
+    <mailing-list rdf:resource="https://calcite.incubator.apache.org/develop" />
+    <download-page rdf:resource="https://calcite.incubator.apache.org/downloads" />
+    <programming-language>Java</programming-language>
+    <category rdf:resource="http://projects.apache.org/category/big-data" />
+    <category rdf:resource="http://projects.apache.org/category/hadoop" />
+    <category rdf:resource="http://projects.apache.org/category/sql" />
+    <repository>
+      <GitRepository>
+        <location rdf:resource="https://git-wip-us.apache.org/repos/asf/incubator-calcite.git"/>
+        <browse rdf:resource="https://github.com/apache/incubator-calcite"/>
+      </GitRepository>
+    </repository>
+    <maintainer>
+      <foaf:Person>
+        <foaf:name>Julian Hyde</foaf:name>
+          <foaf:mbox rdf:resource="mailto:jhyde@apache.org"/>
+      </foaf:Person>
+    </maintainer>
+  </Project>
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cd9c9085/site/doap_orc.rdf
----------------------------------------------------------------------
diff --git a/site/doap_orc.rdf b/site/doap_orc.rdf
deleted file mode 100644
index 428a012..0000000
--- a/site/doap_orc.rdf
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl"?>
-<rdf:RDF xml:lang="en"
-         xmlns="http://usefulinc.com/ns/doap#" 
-         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
-         xmlns:asfext="http://projects.apache.org/ns/asfext#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/">
-<!--
-    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.
--->
-  <Project rdf:about="https://orc.apache.org">
-    <created>2015-05-12</created>
-    <license rdf:resource="http://spdx.org/licenses/Apache-2.0" />
-    <name>Apache Orc</name>
-    <homepage rdf:resource="https://orc.apache.org" />
-    <asfext:pmc rdf:resource="https://orc.apache.org" />
-    <shortdesc>A high-performance columnar file format for Hadoop workloads.</shortdesc>
-    <description>ORC is a self-describing type-aware columnar file format designed for
-Hadoop workloads. It is optimized for large streaming reads, but with
-integrated support for finding required rows quickly. Storing data in
-a columnar format lets the reader read, decompress, and process only
-the values that are required for the current query.</description>
-    <bug-database rdf:resource="https://issues.apache.org/jira/browse/orc" />
-    <mailing-list rdf:resource="https://orc.apache.org/develop" />
-    <download-page rdf:resource="https://orc.apache.org/downloads" />
-    <programming-language>Java</programming-language>
-    <programming-language>C++</programming-language>
-    <category rdf:resource="http://projects.apache.org/category/big-data" />
-    <category rdf:resource="http://projects.apache.org/category/hadoop" />
-    <repository>
-      <GitRepository>
-        <location rdf:resource="https://git-wip-us.apache.org/repos/asf/orc.git"/>
-        <browse rdf:resource="https://github.com/apache/orc"/>
-      </GitRepository>
-    </repository>
-    <maintainer>
-      <foaf:Person>
-        <foaf:name>Owen O'Malley</foaf:name>
-          <foaf:mbox rdf:resource="mailto:omalley@apache.org"/>
-      </foaf:Person>
-    </maintainer>
-  </Project>
-</rdf:RDF>


[04/19] incubator-calcite git commit: Upgrade tpcds

Posted by jh...@apache.org.
Upgrade tpcds


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

Branch: refs/heads/master
Commit: bb91b5e8ef3dc90cfe7de92ac7294c31516e3a25
Parents: fcab7a8
Author: Julian Hyde <jh...@apache.org>
Authored: Fri May 22 13:36:49 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed May 27 17:47:15 2015 -0700

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/bb91b5e8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f92c82b..81bd926 100644
--- a/pom.xml
+++ b/pom.xml
@@ -210,7 +210,7 @@ limitations under the License.
       <dependency>
         <groupId>net.hydromatic</groupId>
         <artifactId>tpcds</artifactId>
-        <version>0.3</version>
+        <version>0.4</version>
       </dependency>
       <dependency>
         <groupId>net.sf.opencsv</groupId>


[19/19] incubator-calcite git commit: [CALCITE-732] Implement multiple distinct-COUNT using GROUPING SETS

Posted by jh...@apache.org.
[CALCITE-732] Implement multiple distinct-COUNT using GROUPING SETS


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

Branch: refs/heads/master
Commit: 3e50232b681e8dadb921580ee6f3e0376dd0f664
Parents: cd9c908
Author: Julian Hyde <jh...@apache.org>
Authored: Fri May 22 10:11:06 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 1 00:01:55 2015 -0700

----------------------------------------------------------------------
 .../org/apache/calcite/rel/core/Aggregate.java  |  27 ++-
 .../apache/calcite/rel/core/AggregateCall.java  |   9 +-
 .../AggregateExpandDistinctAggregatesRule.java  | 210 ++++++++++++++++-
 .../apache/calcite/sql/SqlOperatorBinding.java  |   7 +
 .../apache/calcite/sql/type/ReturnTypes.java    |   2 +-
 .../apache/calcite/util/ImmutableBitSet.java    |  16 +-
 .../apache/calcite/util/ImmutableIntList.java   |  10 +
 .../apache/calcite/test/RelOptRulesTest.java    |  69 ++++++
 .../calcite/util/ImmutableBitSetTest.java       |  17 +-
 .../org/apache/calcite/test/RelOptRulesTest.xml | 228 +++++++++++++++----
 core/src/test/resources/sql/agg.oq              |  34 +++
 11 files changed, 559 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java b/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
index a483595..b95e44c 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
@@ -40,6 +40,7 @@ import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.calcite.sql.validate.SqlValidatorException;
 import org.apache.calcite.util.ImmutableBitSet;
 import org.apache.calcite.util.IntList;
+import org.apache.calcite.util.Pair;
 import org.apache.calcite.util.Util;
 
 import com.google.common.base.Preconditions;
@@ -197,6 +198,17 @@ public abstract class Aggregate extends SingleRel {
   }
 
   /**
+   * Returns a list of calls to aggregate functions together with their output
+   * field names.
+   *
+   * @return list of calls to aggregate functions and their output field names
+   */
+  public List<Pair<AggregateCall, String>> getNamedAggCalls() {
+    final int offset = getGroupCount() + getIndicatorCount();
+    return Pair.zip(aggCalls, Util.skip(getRowType().getFieldNames(), offset));
+  }
+
+  /**
    * Returns the number of grouping fields.
    * These grouping fields are the leading fields in both the input and output
    * records.
@@ -422,6 +434,7 @@ public abstract class Aggregate extends SingleRel {
   public static class AggCallBinding extends SqlOperatorBinding {
     private final List<RelDataType> operands;
     private final int groupCount;
+    private final boolean filter;
 
     /**
      * Creates an AggCallBinding
@@ -430,15 +443,15 @@ public abstract class Aggregate extends SingleRel {
      * @param aggFunction  Aggregate function
      * @param operands     Data types of operands
      * @param groupCount   Number of columns in the GROUP BY clause
+     * @param filter       Whether the aggregate function has a FILTER clause
      */
-    public AggCallBinding(
-        RelDataTypeFactory typeFactory,
-        SqlAggFunction aggFunction,
-        List<RelDataType> operands,
-        int groupCount) {
+    public AggCallBinding(RelDataTypeFactory typeFactory,
+        SqlAggFunction aggFunction, List<RelDataType> operands, int groupCount,
+        boolean filter) {
       super(typeFactory, aggFunction);
       this.operands = operands;
       this.groupCount = groupCount;
+      this.filter = filter;
       assert operands != null
           : "operands of aggregate call should not be null";
       assert groupCount >= 0
@@ -450,6 +463,10 @@ public abstract class Aggregate extends SingleRel {
       return groupCount;
     }
 
+    @Override public boolean hasFilter() {
+      return filter;
+    }
+
     public int getOperandCount() {
       return operands.size();
     }

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java b/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
index 0589e58..2b56522 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
@@ -23,6 +23,7 @@ import org.apache.calcite.sql.SqlAggFunction;
 import org.apache.calcite.sql.type.SqlTypeUtil;
 import org.apache.calcite.util.mapping.Mappings;
 
+import com.google.common.base.Objects;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 
@@ -114,7 +115,7 @@ public class AggregateCall {
           SqlTypeUtil.projectTypes(input.getRowType(), argList);
       final Aggregate.AggCallBinding callBinding =
           new Aggregate.AggCallBinding(typeFactory, aggFunction, types,
-              groupCount);
+              groupCount, filterArg >= 0);
       type = aggFunction.inferReturnType(callBinding);
     }
     return create(aggFunction, distinct, argList, filterArg, type, name);
@@ -182,7 +183,9 @@ public class AggregateCall {
    * @param name New name (may be null)
    */
   public AggregateCall rename(String name) {
-    // no need to copy argList - already immutable
+    if (Objects.equal(this.name, name)) {
+      return this;
+    }
     return new AggregateCall(aggFunction, distinct, argList, filterArg, type,
         name);
   }
@@ -236,7 +239,7 @@ public class AggregateCall {
     return new Aggregate.AggCallBinding(
         aggregateRelBase.getCluster().getTypeFactory(), aggFunction,
         SqlTypeUtil.projectTypes(rowType, argList),
-        filterArg >= 0 ? 0 : aggregateRelBase.getGroupCount());
+        aggregateRelBase.getGroupCount(), filterArg >= 0);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java b/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java
index 96a031a..81733f0 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java
@@ -16,6 +16,7 @@
  */
 package org.apache.calcite.rel.rules;
 
+import org.apache.calcite.plan.RelOptCluster;
 import org.apache.calcite.plan.RelOptRule;
 import org.apache.calcite.plan.RelOptRuleCall;
 import org.apache.calcite.plan.RelOptUtil;
@@ -25,13 +26,18 @@ import org.apache.calcite.rel.core.AggregateCall;
 import org.apache.calcite.rel.core.JoinRelType;
 import org.apache.calcite.rel.core.RelFactories;
 import org.apache.calcite.rel.logical.LogicalAggregate;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
 import org.apache.calcite.rel.type.RelDataTypeField;
 import org.apache.calcite.rex.RexBuilder;
 import org.apache.calcite.rex.RexInputRef;
 import org.apache.calcite.rex.RexNode;
 import org.apache.calcite.rex.RexUtil;
+import org.apache.calcite.sql.SqlAggFunction;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
+import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.ImmutableIntList;
 import org.apache.calcite.util.Pair;
 import org.apache.calcite.util.Util;
 
@@ -40,12 +46,14 @@ import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeSet;
 
 /**
  * Planner rule that expands distinct aggregates
@@ -68,20 +76,41 @@ public final class AggregateExpandDistinctAggregatesRule extends RelOptRule {
 
   /** The default instance of the rule; operates only on logical expressions. */
   public static final AggregateExpandDistinctAggregatesRule INSTANCE =
-      new AggregateExpandDistinctAggregatesRule(LogicalAggregate.class,
+      new AggregateExpandDistinctAggregatesRule(LogicalAggregate.class, true,
           RelFactories.DEFAULT_JOIN_FACTORY);
 
-  private final RelFactories.JoinFactory joinFactory;
+  /** Instance of the rule that operates only on logical expressions and
+   * generates a join. */
+  public static final AggregateExpandDistinctAggregatesRule JOIN =
+      new AggregateExpandDistinctAggregatesRule(LogicalAggregate.class, false,
+          RelFactories.DEFAULT_JOIN_FACTORY);
+  public static final BigDecimal TWO = BigDecimal.valueOf(2L);
+
+  public final boolean useGroupingSets;
+  public final RelFactories.JoinFactory joinFactory;
+  public final RelFactories.AggregateFactory aggregateFactory =
+      RelFactories.DEFAULT_AGGREGATE_FACTORY;
+  public final RelFactories.ProjectFactory projectFactory =
+      RelFactories.DEFAULT_PROJECT_FACTORY;
 
   //~ Constructors -----------------------------------------------------------
 
   public AggregateExpandDistinctAggregatesRule(
       Class<? extends LogicalAggregate> clazz,
+      boolean useGroupingSets,
       RelFactories.JoinFactory joinFactory) {
     super(operand(clazz, any()));
+    this.useGroupingSets = useGroupingSets;
     this.joinFactory = joinFactory;
   }
 
+  @Deprecated // to be removed before 2.0
+  public AggregateExpandDistinctAggregatesRule(
+      Class<? extends LogicalAggregate> clazz,
+      RelFactories.JoinFactory joinFactory) {
+    this(clazz, false, joinFactory);
+  }
+
   //~ Methods ----------------------------------------------------------------
 
   public void onMatch(RelOptRuleCall call) {
@@ -113,6 +142,11 @@ public final class AggregateExpandDistinctAggregatesRule extends RelOptRule {
       return;
     }
 
+    if (useGroupingSets) {
+      rewriteUsingGroupingSets(call, aggregate, argLists);
+      return;
+    }
+
     // Create a list of the expressions which will yield the final result.
     // Initially, the expressions point to the input field.
     final List<RelDataTypeField> aggFields =
@@ -149,9 +183,9 @@ public final class AggregateExpandDistinctAggregatesRule extends RelOptRule {
     if (newAggCallList.isEmpty()) {
       rel = null;
     } else {
-      rel =
-          LogicalAggregate.create(aggregate.getInput(), aggregate.indicator,
-              groupSet, aggregate.getGroupSets(), newAggCallList);
+      rel = aggregateFactory.createAggregate(aggregate.getInput(),
+          aggregate.indicator,
+          groupSet, aggregate.getGroupSets(), newAggCallList);
     }
 
     // For each set of operands, find and rewrite all calls which have that
@@ -165,6 +199,172 @@ public final class AggregateExpandDistinctAggregatesRule extends RelOptRule {
     call.transformTo(rel);
   }
 
+  private void rewriteUsingGroupingSets(RelOptRuleCall ruleCall,
+      Aggregate aggregate, Set<Pair<List<Integer>, Integer>> argLists) {
+    final Set<ImmutableBitSet> groupSetTreeSet =
+        new TreeSet<>(ImmutableBitSet.ORDERING);
+    groupSetTreeSet.add(aggregate.getGroupSet());
+    for (Pair<List<Integer>, Integer> argList : argLists) {
+      groupSetTreeSet.add(
+          ImmutableBitSet.of(argList.left)
+              .setIf(argList.right, argList.right >= 0)
+              .union(aggregate.getGroupSet()));
+    }
+
+    final ImmutableList<ImmutableBitSet> groupSets =
+        ImmutableList.copyOf(groupSetTreeSet);
+    final ImmutableBitSet fullGroupSet = ImmutableBitSet.union(groupSets);
+
+    final List<AggregateCall> distinctAggCalls = new ArrayList<>();
+    for (Pair<AggregateCall, String> call : aggregate.getNamedAggCalls()) {
+      if (!call.left.isDistinct()) {
+        distinctAggCalls.add(call.left.rename(call.right));
+      }
+    }
+
+    final RelNode distinct =
+        aggregateFactory.createAggregate(aggregate.getInput(),
+            groupSets.size() > 1, fullGroupSet, groupSets, distinctAggCalls);
+    final int groupCount = fullGroupSet.cardinality();
+    final int indicatorCount = groupSets.size() > 1 ? groupCount : 0;
+
+    final RelOptCluster cluster = aggregate.getCluster();
+    final RexBuilder rexBuilder = cluster.getRexBuilder();
+    final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
+    final RelDataType booleanType =
+        typeFactory.createTypeWithNullability(
+            typeFactory.createSqlType(SqlTypeName.BOOLEAN), false);
+    final List<Pair<RexNode, String>> predicates = new ArrayList<>();
+    final Map<ImmutableBitSet, Integer> filters = new HashMap<>();
+    /** Function to register an filter for a group set. */
+    class Registrar {
+      RexNode group = null;
+      int register(ImmutableBitSet groupSet) {
+        if (group == null) {
+          group = makeGroup(groupCount - 1);
+        }
+        final RexNode node =
+            rexBuilder.makeCall(SqlStdOperatorTable.EQUALS, group,
+                rexBuilder.makeExactLiteral(
+                    toNumber(remap(fullGroupSet, groupSet))));
+        predicates.add(Pair.of(node, toString(groupSet)));
+        return groupCount + indicatorCount + distinctAggCalls.size()
+            + predicates.size() - 1;
+      }
+
+      private RexNode makeGroup(int i) {
+        final RexInputRef ref =
+            rexBuilder.makeInputRef(booleanType, groupCount + i);
+        final RexNode kase =
+            rexBuilder.makeCall(SqlStdOperatorTable.CASE, ref,
+                rexBuilder.makeExactLiteral(BigDecimal.ZERO),
+                rexBuilder.makeExactLiteral(TWO.pow(i)));
+        if (i == 0) {
+          return kase;
+        } else {
+          return rexBuilder.makeCall(SqlStdOperatorTable.PLUS,
+              makeGroup(i - 1), kase);
+        }
+      }
+
+      private BigDecimal toNumber(ImmutableBitSet bitSet) {
+        BigDecimal n = BigDecimal.ZERO;
+        for (int key : bitSet) {
+          n = n.add(TWO.pow(key));
+        }
+        return n;
+      }
+
+      private String toString(ImmutableBitSet bitSet) {
+        final StringBuilder buf = new StringBuilder("$i");
+        for (int key : bitSet) {
+          buf.append(key).append('_');
+        }
+        return buf.substring(0, buf.length() - 1);
+      }
+    }
+    final Registrar registrar = new Registrar();
+    for (ImmutableBitSet groupSet : groupSets) {
+      filters.put(groupSet, registrar.register(groupSet));
+    }
+
+    RelNode r = distinct;
+    if (!predicates.isEmpty()) {
+      List<Pair<RexNode, String>> nodes = new ArrayList<>();
+      for (RelDataTypeField f : r.getRowType().getFieldList()) {
+        final RexNode node = rexBuilder.makeInputRef(f.getType(), f.getIndex());
+        nodes.add(Pair.of(node, f.getName()));
+      }
+      nodes.addAll(predicates);
+      r = RelOptUtil.createProject(r, nodes, false);
+    }
+
+    int x = groupCount + indicatorCount;
+    final List<AggregateCall> newCalls = new ArrayList<>();
+    for (AggregateCall call : aggregate.getAggCallList()) {
+      final int newFilterArg;
+      final List<Integer> newArgList;
+      final SqlAggFunction aggregation;
+      if (!call.isDistinct()) {
+        aggregation = SqlStdOperatorTable.MIN;
+        newArgList = ImmutableIntList.of(x++);
+        newFilterArg = filters.get(aggregate.getGroupSet());
+      } else {
+        aggregation = call.getAggregation();
+        newArgList = remap(fullGroupSet, call.getArgList());
+        newFilterArg =
+            filters.get(
+                ImmutableBitSet.of(call.getArgList())
+                    .setIf(call.filterArg, call.filterArg >= 0)
+                    .union(aggregate.getGroupSet()));
+      }
+      final AggregateCall newCall =
+          AggregateCall.create(aggregation, false, newArgList, newFilterArg,
+              aggregate.getGroupCount(), distinct, null, call.name);
+      newCalls.add(newCall);
+    }
+
+    final RelNode newAggregate =
+        aggregateFactory.createAggregate(r, aggregate.indicator,
+            remap(fullGroupSet, aggregate.getGroupSet()),
+            remap(fullGroupSet, aggregate.getGroupSets()), newCalls);
+    ruleCall.transformTo(
+        RelOptUtil.createCastRel(newAggregate, aggregate.getRowType(), true,
+            projectFactory));
+  }
+
+  private static ImmutableBitSet remap(ImmutableBitSet groupSet,
+      ImmutableBitSet bitSet) {
+    final ImmutableBitSet.Builder builder = ImmutableBitSet.builder();
+    for (Integer bit : bitSet) {
+      builder.set(remap(groupSet, bit));
+    }
+    return builder.build();
+  }
+
+  private static ImmutableList<ImmutableBitSet> remap(ImmutableBitSet groupSet,
+      Iterable<ImmutableBitSet> bitSets) {
+    final ImmutableList.Builder<ImmutableBitSet> builder =
+        ImmutableList.builder();
+    for (ImmutableBitSet bitSet : bitSets) {
+      builder.add(remap(groupSet, bitSet));
+    }
+    return builder.build();
+  }
+
+  private static List<Integer> remap(ImmutableBitSet groupSet,
+      List<Integer> argList) {
+    ImmutableIntList list = ImmutableIntList.of();
+    for (int arg : argList) {
+      list = list.add(remap(groupSet, arg));
+    }
+    return list;
+  }
+
+  private static int remap(ImmutableBitSet groupSet, int arg) {
+    return arg < 0 ? -1 : groupSet.indexOf(arg);
+  }
+
   /**
    * Converts an aggregate relational expression that contains just one
    * distinct aggregate function (or perhaps several over the same arguments)

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java b/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
index e767049..3e3b6f6 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
@@ -68,6 +68,13 @@ public abstract class SqlOperatorBinding {
   }
 
   /**
+   * Returns whether the operator is an aggregate function with a filter.
+   */
+  public boolean hasFilter() {
+    return false;
+  }
+
+  /**
    * @return bound operator
    */
   public SqlOperator getOperator() {

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
index d9fcdcd..7095ac6 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
@@ -130,7 +130,7 @@ public abstract class ReturnTypes {
         @Override public RelDataType
         inferReturnType(SqlOperatorBinding opBinding) {
           final RelDataType type = super.inferReturnType(opBinding);
-          if (opBinding.getGroupCount() == 0) {
+          if (opBinding.getGroupCount() == 0 || opBinding.hasFilter()) {
             return opBinding.getTypeFactory()
                 .createTypeWithNullability(type, true);
           } else {

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/util/ImmutableBitSet.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/util/ImmutableBitSet.java b/core/src/main/java/org/apache/calcite/util/ImmutableBitSet.java
index 75d66de..d35a446 100644
--- a/core/src/main/java/org/apache/calcite/util/ImmutableBitSet.java
+++ b/core/src/main/java/org/apache/calcite/util/ImmutableBitSet.java
@@ -317,7 +317,9 @@ public class ImmutableBitSet
       b.append(i);
       for (i = nextSetBit(i + 1); i >= 0; i = nextSetBit(i + 1)) {
         int endOfRun = nextClearBit(i);
-        do { b.append(", ").append(i); }
+        do {
+          b.append(", ").append(i);
+        }
         while (++i < endOfRun);
       }
     }
@@ -742,11 +744,23 @@ public class ImmutableBitSet
     return union(ImmutableBitSet.of(i));
   }
 
+  /** Returns a bit set the same as this but with a given bit set if condition
+   * is true. */
+  public ImmutableBitSet setIf(int bit, boolean condition) {
+    return condition ? set(bit) : this;
+  }
+
   /** Returns a bit set the same as this but with a given bit cleared. */
   public ImmutableBitSet clear(int i) {
     return except(ImmutableBitSet.of(i));
   }
 
+  /** Returns a bit set the same as this but with a given bit cleared if
+   * condition is true. */
+  public ImmutableBitSet clearIf(int i, boolean condition) {
+    return condition ? except(ImmutableBitSet.of(i)) : this;
+  }
+
   /** Returns a {@link BitSet} that has the same contents as this
    * {@code ImmutableBitSet}. */
   public BitSet toBitSet() {

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/main/java/org/apache/calcite/util/ImmutableIntList.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/util/ImmutableIntList.java b/core/src/main/java/org/apache/calcite/util/ImmutableIntList.java
index 867c8f3..3dcfae6 100644
--- a/core/src/main/java/org/apache/calcite/util/ImmutableIntList.java
+++ b/core/src/main/java/org/apache/calcite/util/ImmutableIntList.java
@@ -221,6 +221,16 @@ public class ImmutableIntList extends FlatLists.AbstractFlatList<Integer> {
     return -1;
   }
 
+  /** Returns a copy of this list with one element added. */
+  public ImmutableIntList add(int element) {
+    if (ints.length == 0) {
+      return of(element);
+    }
+    final int[] newInts = Arrays.copyOf(this.ints, ints.length + 1);
+    newInts[ints.length] = element;
+    return new ImmutableIntList(newInts);
+  }
+
   /** Returns a list that contains the values lower to upper - 1.
    *
    * <p>For example, {@code range(1, 3)} contains [1, 2]. */

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java b/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
index 41017c8..0c72361 100644
--- a/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
+++ b/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
@@ -427,6 +427,75 @@ public class RelOptRulesTest extends RelOptTestBase {
             + " from sales.emp group by deptno");
   }
 
+  /** Tests implementing multiple distinct count the old way, using a join. */
+  @Test public void testDistinctCountMultipleViaJoin() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.JOIN)
+        .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select deptno, count(distinct ename), count(distinct job, ename),\n"
+            + "  count(distinct deptno, job), sum(sal)\n"
+            + " from sales.emp group by deptno");
+  }
+
+  /** Tests implementing multiple distinct count the new way, using GROUPING
+   *  SETS. */
+  @Test public void testDistinctCountMultiple() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.INSTANCE)
+        .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select deptno, count(distinct ename), count(distinct job)\n"
+            + " from sales.emp group by deptno");
+  }
+
+  @Test public void testDistinctCountMultipleNoGroup() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.INSTANCE)
+        .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select count(distinct ename), count(distinct job)\n"
+            + " from sales.emp");
+  }
+
+  @Test public void testDistinctCountMixedJoin() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.JOIN)
+        .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select deptno, count(distinct ename), count(distinct job, ename),\n"
+            + "  count(distinct deptno, job), sum(sal)\n"
+            + " from sales.emp group by deptno");
+  }
+
+  @Test public void testDistinctCountMixed() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.INSTANCE)
+        .addRuleInstance(ProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select deptno, count(distinct deptno, job) as cddj, sum(sal) as s\n"
+            + " from sales.emp group by deptno");
+  }
+
+  @Test public void testDistinctCountMixed2() {
+    final HepProgram program = HepProgram.builder()
+        .addRuleInstance(AggregateExpandDistinctAggregatesRule.INSTANCE)
+        .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
+        .addRuleInstance(ProjectMergeRule.INSTANCE)
+        .build();
+    checkPlanning(program,
+        "select deptno, count(distinct ename) as cde,\n"
+            + "  count(distinct job, ename) as cdje,\n"
+            + "  count(distinct deptno, job) as cddj,\n"
+            + "  sum(sal) as s\n"
+            + " from sales.emp group by deptno");
+  }
+
   @Test public void testDistinctCountGroupingSets1() {
     final HepProgram program = HepProgram.builder()
         .addRuleInstance(AggregateExpandDistinctAggregatesRule.INSTANCE)

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
index 605817c..da34dc7 100644
--- a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
+++ b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
@@ -428,18 +428,23 @@ public class ImmutableBitSetTest {
 
   @Test public void testSet() {
     final ImmutableBitSet bitSet = ImmutableBitSet.of(29, 4, 1969);
-    assertThat(bitSet.set(30),
-        equalTo(ImmutableBitSet.of(29, 4, 1969, 30)));
-    assertThat(bitSet.set(29),
-        equalTo(bitSet));
+    final ImmutableBitSet bitSet2 = ImmutableBitSet.of(29, 4, 1969, 30);
+    assertThat(bitSet.set(30), equalTo(bitSet2));
+    assertThat(bitSet.set(30).set(30), equalTo(bitSet2));
+    assertThat(bitSet.set(29), equalTo(bitSet));
+    assertThat(bitSet.setIf(30, false), equalTo(bitSet));
+    assertThat(bitSet.setIf(30, true), equalTo(bitSet2));
   }
 
   @Test public void testClear() {
     final ImmutableBitSet bitSet = ImmutableBitSet.of(29, 4, 1969);
-    assertThat(bitSet.clear(29),
-        equalTo(ImmutableBitSet.of(4, 1969)));
+    final ImmutableBitSet bitSet2 = ImmutableBitSet.of(4, 1969);
+    assertThat(bitSet.clear(29), equalTo(bitSet2));
+    assertThat(bitSet.clear(29).clear(29), equalTo(bitSet2));
     assertThat(bitSet.clear(29).clear(4).clear(29).clear(1969),
         equalTo(ImmutableBitSet.of()));
+    assertThat(bitSet.clearIf(29, false), equalTo(bitSet));
+    assertThat(bitSet.clearIf(29, true), equalTo(bitSet2));
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml b/core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
index dea51a9..bec6c76 100644
--- a/core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
+++ b/core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
@@ -1576,11 +1576,7 @@ LogicalProject(DEPTNO=[CASE($2, null, $0)], JOB=[CASE($3, null, $1)], EXPR$2=[$4
     </TestCase>
     <TestCase name="testPullFilterThroughAggregate">
         <Resource name="sql">
-            <![CDATA[select empno, sal, deptno from (
-  select empno, sal, deptno
-   from emp
-   where sal > 5000)
-  group by empno, sal, deptno]]>
+            <![CDATA[select empno, sal, deptno from (  select empno, sal, deptno  from emp  where sal > 5000)group by empno, sal, deptno]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -1601,11 +1597,7 @@ LogicalFilter(condition=[>($1, 5000)])
     </TestCase>
     <TestCase name="testPullFilterThroughAggregateGroupingSets">
         <Resource name="sql">
-            <![CDATA[select empno, sal, deptno from (
-  select empno, sal, deptno
-   from emp
-   where sal > 5000)
-  group by rollup(empno, sal, deptno)]]>
+            <![CDATA[select empno, sal, deptno from (  select empno, sal, deptno  from emp  where sal > 5000)group by rollup(empno, sal, deptno)]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -2972,13 +2964,7 @@ LogicalProject(X=[$0], EXPR$1=[$4], Y=[$1])
     </TestCase>
     <TestCase name="testPullAggregateThroughUnion">
         <Resource name="sql">
-            <![CDATA[select deptno, job from
- (select deptno, job from emp as e1
- group by deptno,job
-  union all
- select deptno, job from emp as e2
- group by deptno,job)
- group by deptno,job]]>
+            <![CDATA[select deptno, job from (select deptno, job from emp as e1 group by deptno,job  union all select deptno, job from emp as e2 group by deptno,job) group by deptno,job]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -3084,13 +3070,12 @@ LogicalAggregate(group=[{0}], EXPR$1=[COUNT(DISTINCT $1)], EXPR$2=[SUM($2)])
         </Resource>
         <Resource name="planAfter">
             <![CDATA[
-LogicalProject(DEPTNO=[$0], EXPR$1=[$3], EXPR$2=[$1])
-  LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $2)], joinType=[inner])
-    LogicalAggregate(group=[{7}], EXPR$2=[SUM($5)])
-      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
-    LogicalAggregate(group=[{1}], EXPR$1=[COUNT($0)])
-      LogicalAggregate(group=[{1, 7}])
-        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+LogicalProject(DEPTNO=[$0], EXPR$1=[$1], EXPR$2=[CAST($2):INTEGER NOT NULL])
+  LogicalAggregate(group=[{0}], EXPR$1=[COUNT($1) FILTER $5], EXPR$2=[MIN($4) FILTER $6])
+    LogicalProject(DEPTNO=[$0], ENAME=[$1], i$DEPTNO=[$2], i$ENAME=[$3], EXPR$2=[$4], $i0_1=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 3)], $i0=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 1)])
+      LogicalProject(DEPTNO=[$1], ENAME=[$0], i$DEPTNO=[$3], i$ENAME=[$2], EXPR$2=[$4])
+        LogicalAggregate(group=[{1, 7}], groups=[[{1, 7}, {7}]], indicator=[true], EXPR$2=[SUM($5)])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
 ]]>
         </Resource>
     </TestCase>
@@ -3133,14 +3118,11 @@ LogicalProject(DEPTNO=[$0], JOB=[$1], EXPR$2=[$4], EXPR$3=[$5])
         </Resource>
         <Resource name="planAfter">
             <![CDATA[
-LogicalProject(DEPTNO=[CASE($2, null, $0)], JOB=[CASE($3, null, $1)], EXPR$2=[$9], EXPR$3=[$4])
-  LogicalJoin(condition=[AND(IS NOT DISTINCT FROM($0, $5), IS NOT DISTINCT FROM($1, $6), IS NOT DISTINCT FROM($2, $7), IS NOT DISTINCT FROM($3, $8))], joinType=[inner])
-    LogicalAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], indicator=[true], EXPR$3=[SUM($3)])
-      LogicalProject(DEPTNO=[$7], JOB=[$2], ENAME=[$1], SAL=[$5])
-        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
-    LogicalAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], indicator=[true], EXPR$2=[COUNT($2)])
-      LogicalAggregate(group=[{0, 1, 2}])
-        LogicalProject(DEPTNO=[$7], JOB=[$2], ENAME=[$1])
+LogicalProject(DEPTNO=[CASE($2, null, $0)], JOB=[CASE($3, null, $1)], EXPR$2=[$4], EXPR$3=[CAST($5):INTEGER NOT NULL])
+  LogicalAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], indicator=[true], EXPR$2=[COUNT($2) FILTER $7], EXPR$3=[MIN($6) FILTER $8])
+    LogicalProject(DEPTNO=[$0], JOB=[$1], ENAME=[$2], i$DEPTNO=[$3], i$JOB=[$4], i$ENAME=[$5], EXPR$3=[$6], $i0_1_2=[=(+(+(CASE($3, 0, 1), CASE($4, 0, 2)), CASE($5, 0, 4)), 7)], $i0_1=[=(+(+(CASE($3, 0, 1), CASE($4, 0, 2)), CASE($5, 0, 4)), 3)])
+      LogicalAggregate(group=[{0, 1, 2}], groups=[[{0, 1, 2}, {0, 1}]], indicator=[true], EXPR$3=[SUM($3)])
+        LogicalProject(DEPTNO=[$7], JOB=[$2], ENAME=[$1], SAL=[$5])
           LogicalTableScan(table=[[CATALOG, SALES, EMP]])
 ]]>
         </Resource>
@@ -3361,10 +3343,8 @@ LogicalProject(EXPR$0=[$0], EXPR$1=[$1])
     </TestCase>
     <TestCase name="testPushAggregateThroughJoin1">
         <Resource name="sql">
-            <![CDATA[select e.empno,d.deptno
- from (select * from sales.emp where empno = 10) as e
- join sales.dept as d on e.empno = d.deptno
- group by e.empno,d.deptno]]>
+            <![CDATA[select e.empno,d.deptno 
+from (select * from sales.emp where empno = 10) as e join sales.dept as d on e.empno = d.deptno group by e.empno,d.deptno]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -3390,11 +3370,8 @@ LogicalJoin(condition=[=($0, $1)], joinType=[inner])
     </TestCase>
     <TestCase name="testPushAggregateThroughJoin2">
         <Resource name="sql">
-            <![CDATA[select e.empno,d.deptno
- from (select * from sales.emp where empno = 10) as e
- join sales.dept as d on e.empno = d.deptno
- and e.deptno + e.empno = d.deptno + 5
- group by e.empno,d.deptno]]>
+            <![CDATA[select e.empno,d.deptno 
+from (select * from sales.emp where empno = 10) as e join sales.dept as d on e.empno = d.deptno and e.deptno + e.empno = d.deptno + 5 group by e.empno,d.deptno]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -3423,10 +3400,8 @@ LogicalAggregate(group=[{0, 10}])
     </TestCase>
     <TestCase name="testPushAggregateThroughJoin3">
         <Resource name="sql">
-            <![CDATA[select e.empno,d.deptno
- from (select * from sales.emp where empno = 10) as e
- join sales.dept as d on e.empno < d.deptno
- group by e.empno,d.deptno]]>
+            <![CDATA[select e.empno,d.deptno 
+from (select * from sales.emp where empno = 10) as e join sales.dept as d on e.empno < d.deptno group by e.empno,d.deptno]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -3451,10 +3426,8 @@ LogicalAggregate(group=[{0, 9}])
     </TestCase>
     <TestCase name="testPushAggregateThroughJoin4">
         <Resource name="sql">
-            <![CDATA[select e.empno,sum(sal)
- from (select * from sales.emp where empno = 10) as e
- join sales.dept as d on e.empno = d.deptno
- group by e.empno,d.deptno]]>
+            <![CDATA[select e.empno,sum(sal) 
+from (select * from sales.emp where empno = 10) as e join sales.dept as d on e.empno = d.deptno group by e.empno,d.deptno]]>
         </Resource>
         <Resource name="planBefore">
             <![CDATA[
@@ -3501,4 +3474,161 @@ LogicalProject(EXPR$0=[1])
 ]]>
         </Resource>
     </TestCase>
+    <TestCase name="testDistinctCountMultipleViaJoin">
+        <Resource name="sql">
+            <![CDATA[select deptno, count(distinct ename), count(distinct job, ename),
+  count(distinct deptno, job), sum(sal)
+ from sales.emp group by deptno]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{0}], EXPR$1=[COUNT(DISTINCT $1)], EXPR$2=[COUNT(DISTINCT $2, $1)], EXPR$3=[COUNT(DISTINCT $0, $2)], EXPR$4=[SUM($3)])
+  LogicalProject(DEPTNO=[$7], ENAME=[$1], JOB=[$2], SAL=[$5])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalProject(DEPTNO=[$0], EXPR$1=[$3], EXPR$2=[$5], EXPR$3=[$7], EXPR$4=[$1])
+  LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $6)], joinType=[inner])
+    LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $4)], joinType=[inner])
+      LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $2)], joinType=[inner])
+        LogicalAggregate(group=[{7}], EXPR$4=[SUM($5)])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+        LogicalAggregate(group=[{1}], EXPR$1=[COUNT($0)])
+          LogicalAggregate(group=[{1, 7}])
+            LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+      LogicalAggregate(group=[{2}], EXPR$2=[COUNT($1, $0)])
+        LogicalAggregate(group=[{1, 2, 7}])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+    LogicalAggregate(group=[{1}], EXPR$3=[COUNT($1, $0)])
+      LogicalAggregate(group=[{2, 7}])
+        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testDistinctCountMultiple">
+        <Resource name="sql">
+            <![CDATA[select deptno, count(distinct ename), count(distinct job)
+ from sales.emp group by deptno]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{0}], EXPR$1=[COUNT(DISTINCT $1)], EXPR$2=[COUNT(DISTINCT $2)])
+  LogicalProject(DEPTNO=[$7], ENAME=[$1], JOB=[$2])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalAggregate(group=[{0}], EXPR$1=[COUNT($1) FILTER $6], EXPR$2=[COUNT($2) FILTER $7])
+  LogicalProject(DEPTNO=[$0], ENAME=[$1], JOB=[$2], i$DEPTNO=[$3], i$ENAME=[$4], i$JOB=[$5], $i0_1=[=(+(+(CASE($3, 0, 1), CASE($4, 0, 2)), CASE($5, 0, 4)), 3)], $i0_2=[=(+(+(CASE($3, 0, 1), CASE($4, 0, 2)), CASE($5, 0, 4)), 5)], $i0=[=(+(+(CASE($3, 0, 1), CASE($4, 0, 2)), CASE($5, 0, 4)), 1)])
+    LogicalProject(DEPTNO=[$2], ENAME=[$0], JOB=[$1], i$DEPTNO=[$5], i$ENAME=[$3], i$JOB=[$4])
+      LogicalAggregate(group=[{1, 2, 7}], groups=[[{1, 7}, {2, 7}, {7}]], indicator=[true])
+        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testDistinctCountMultipleNoGroup">
+        <Resource name="sql">
+            <![CDATA[select count(distinct ename), count(distinct job)
+ from sales.emp]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{}], EXPR$0=[COUNT(DISTINCT $0)], EXPR$1=[COUNT(DISTINCT $1)])
+  LogicalProject(ENAME=[$1], JOB=[$2])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalAggregate(group=[{}], EXPR$0=[COUNT($0) FILTER $4], EXPR$1=[COUNT($1) FILTER $5])
+  LogicalProject(ENAME=[$0], JOB=[$1], i$ENAME=[$2], i$JOB=[$3], $i0=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 1)], $i1=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 2)], $=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 0)])
+    LogicalAggregate(group=[{1, 2}], groups=[[{1}, {2}, {}]], indicator=[true])
+      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testDistinctCountMixed">
+        <Resource name="sql">
+            <![CDATA[select deptno, count(distinct deptno, job) as cddj, sum(sal) as s
+ from sales.emp group by deptno]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{0}], CDDJ=[COUNT(DISTINCT $0, $1)], S=[SUM($2)])
+  LogicalProject(DEPTNO=[$7], JOB=[$2], SAL=[$5])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalProject(DEPTNO=[$0], CDDJ=[$1], S=[CAST($2):INTEGER NOT NULL])
+  LogicalAggregate(group=[{0}], CDDJ=[COUNT($0, $1) FILTER $5], S=[MIN($4) FILTER $6])
+    LogicalProject(DEPTNO=[$0], JOB=[$1], i$DEPTNO=[$2], i$JOB=[$3], S=[$4], $i0_1=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 3)], $i0=[=(+(CASE($2, 0, 1), CASE($3, 0, 2)), 1)])
+      LogicalAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}]], indicator=[true], S=[SUM($2)])
+        LogicalProject(DEPTNO=[$7], JOB=[$2], SAL=[$5])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testDistinctCountMixedJoin">
+        <Resource name="sql">
+            <![CDATA[select deptno, count(distinct ename), count(distinct job, ename),
+  count(distinct deptno, job), sum(sal)
+ from sales.emp group by deptno]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{0}], EXPR$1=[COUNT(DISTINCT $1)], EXPR$2=[COUNT(DISTINCT $2, $1)], EXPR$3=[COUNT(DISTINCT $0, $2)], EXPR$4=[SUM($3)])
+  LogicalProject(DEPTNO=[$7], ENAME=[$1], JOB=[$2], SAL=[$5])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalProject(DEPTNO=[$0], EXPR$1=[$3], EXPR$2=[$5], EXPR$3=[$7], EXPR$4=[$1])
+  LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $6)], joinType=[inner])
+    LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $4)], joinType=[inner])
+      LogicalJoin(condition=[IS NOT DISTINCT FROM($0, $2)], joinType=[inner])
+        LogicalAggregate(group=[{7}], EXPR$4=[SUM($5)])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+        LogicalAggregate(group=[{1}], EXPR$1=[COUNT($0)])
+          LogicalAggregate(group=[{1, 7}])
+            LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+      LogicalAggregate(group=[{2}], EXPR$2=[COUNT($1, $0)])
+        LogicalAggregate(group=[{1, 2, 7}])
+          LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+    LogicalAggregate(group=[{1}], EXPR$3=[COUNT($1, $0)])
+      LogicalAggregate(group=[{2, 7}])
+        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
+    <TestCase name="testDistinctCountMixed2">
+        <Resource name="sql">
+            <![CDATA[select deptno, count(distinct ename) as cde,
+  count(distinct job, ename) as cdje,
+  count(distinct deptno, job) as cddj,
+  sum(sal) as s
+ from sales.emp group by deptno]]>
+        </Resource>
+        <Resource name="planBefore">
+            <![CDATA[
+LogicalAggregate(group=[{0}], CDE=[COUNT(DISTINCT $1)], CDJE=[COUNT(DISTINCT $2, $1)], CDDJ=[COUNT(DISTINCT $0, $2)], S=[SUM($3)])
+  LogicalProject(DEPTNO=[$7], ENAME=[$1], JOB=[$2], SAL=[$5])
+    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+        <Resource name="planAfter">
+            <![CDATA[
+LogicalProject(DEPTNO=[$0], CDE=[$1], CDJE=[$2], CDDJ=[$3], S=[CAST($4):INTEGER NOT NULL])
+  LogicalAggregate(group=[{0}], CDE=[COUNT($1) FILTER $8], CDJE=[COUNT($2, $1) FILTER $7], CDDJ=[COUNT($0, $2) FILTER $9], S=[MIN($6) FILTER $10])
+    LogicalProject(DEPTNO=[$2], ENAME=[$0], JOB=[$1], i$DEPTNO=[$5], i$ENAME=[$3], i$JOB=[$4], S=[$6], $i0_1_2=[=(+(+(CASE($5, 0, 1), CASE($3, 0, 2)), CASE($4, 0, 4)), 7)], $i0_1=[=(+(+(CASE($5, 0, 1), CASE($3, 0, 2)), CASE($4, 0, 4)), 3)], $i0_2=[=(+(+(CASE($5, 0, 1), CASE($3, 0, 2)), CASE($4, 0, 4)), 5)], $i0=[=(+(+(CASE($5, 0, 1), CASE($3, 0, 2)), CASE($4, 0, 4)), 1)])
+      LogicalAggregate(group=[{1, 2, 7}], groups=[[{1, 2, 7}, {1, 7}, {2, 7}, {7}]], indicator=[true], S=[SUM($5)])
+        LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+]]>
+        </Resource>
+    </TestCase>
 </Root>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/3e50232b/core/src/test/resources/sql/agg.oq
----------------------------------------------------------------------
diff --git a/core/src/test/resources/sql/agg.oq b/core/src/test/resources/sql/agg.oq
index 0936b0e..802f1dc 100644
--- a/core/src/test/resources/sql/agg.oq
+++ b/core/src/test/resources/sql/agg.oq
@@ -726,6 +726,40 @@ group by deptno;
 
 !ok
 
+# Multiple distinct count and non-distinct aggregates
+select deptno,
+ count(distinct job) as dj,
+ count(job) as j,
+ count(distinct mgr) as m,
+ sum(sal) as s
+from "scott".emp
+group by deptno;
++--------+----+---+---+----------+
+| DEPTNO | DJ | J | M | S        |
++--------+----+---+---+----------+
+|     10 |  3 | 3 | 2 |  8750.00 |
+|     20 |  3 | 5 | 4 | 10875.00 |
+|     30 |  3 | 6 | 2 |  9400.00 |
++--------+----+---+---+----------+
+(3 rows)
+
+!ok
+
+# Multiple distinct count and non-distinct aggregates, no GROUP BY
+select count(distinct job) as dj,
+ count(job) as j,
+ count(distinct mgr) as m,
+ sum(sal) as s
+from "scott".emp;
++----+----+---+----------+
+| DJ | J  | M | S        |
++----+----+---+----------+
+|  5 | 14 | 6 | 29025.00 |
++----+----+---+----------+
+(1 row)
+
+!ok
+
 # [CALCITE-729] IndexOutOfBoundsException in ROLLUP query on JDBC data source
 !use jdbc_scott
 select deptno, job, count(*) as c



[13/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/history.md
----------------------------------------------------------------------
diff --git a/site/_docs/history.md b/site/_docs/history.md
new file mode 100644
index 0000000..4488546
--- /dev/null
+++ b/site/_docs/history.md
@@ -0,0 +1,1656 @@
+---
+layout: docs
+title: History
+permalink: "/docs/history.html"
+---
+
+<!--
+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.
+-->
+
+For a full list of releases, see
+<a href="https://github.com/apache/incubator-calcite/releases">github</a>.
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.3.0-incubating">1.3.0-incubating</a> / 2015-05-30
+{: #v1-3-0}
+
+Mainly bug-fixes, but this release adds support for
+<a href="https://issues.apache.org/jira/browse/CALCITE-505">modifiable views</a>
+and
+<a href="https://issues.apache.org/jira/browse/CALCITE-704">filtered aggregate functions</a>
+and various improvements to Avatica.
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-505">CALCITE-505</a>]
+  Support modifiable view
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-704">CALCITE-704</a>]
+  `FILTER` clause for aggregate functions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-522">CALCITE-522</a>]
+  In remote JDBC driver, transmit static database properties as a map
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-661">CALCITE-661</a>]
+  Remote fetch in Calcite JDBC driver
+* Support Date, Time, Timestamp parameters
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-722">CALCITE-722</a>]
+  Rename markdown files to lower-case
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-697">CALCITE-697</a>]
+  Obsolete class `RelOptQuery`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-693">CALCITE-693</a>]
+  Allow clients to control creation of `RelOptCluster`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-691">CALCITE-691</a>]
+  Allow projects to supply alternate SQL parser
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-675">CALCITE-675</a>]
+  Enable `AggregateProjectMergeRule` in standard rule set
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-679">CALCITE-679</a>]
+  Factory method for `SemiJoin`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-674">CALCITE-674</a>]
+  Add a `SWAP_OUTER` static instance to `JoinCommuteRule` (Maryann Xue)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-735">CALCITE-735</a>]
+  `Primitive.DOUBLE.min` should be large and negative
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-688">CALCITE-688</a>]
+  `splitCondition` does not behave correctly when one side of the condition
+  references columns from different inputs
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-259">CALCITE-259</a>]
+  Using sub-queries in `CASE` statement against JDBC tables generates invalid
+  Oracle SQL (Yeong Wei)
+* In sample code in README.md, rename optiq to calcite (Ethan)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-720">CALCITE-720</a>]
+  `VolcanoPlanner.ambitious` comment doc is inconsistent (Santiago M. Mola)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-729">CALCITE-729</a>]
+  `IndexOutOfBoundsException` in `ROLLUP` query on JDBC data source
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-733">CALCITE-733</a>]
+  Multiple distinct-`COUNT` query gives wrong results
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-730">CALCITE-730</a>]
+  `ClassCastException` in table from `CloneSchema`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-728">CALCITE-728</a>]
+  Test suite hangs on Windows
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-723">CALCITE-723</a>]
+  Document lattices
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-515">CALCITE-515</a>]
+  Add Apache headers to markdown files
+* Upgrade quidem
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-716">CALCITE-716</a>]
+  Scalar sub-query and aggregate function in `SELECT` or `HAVING` clause gives
+  `AssertionError`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-694">CALCITE-694</a>]
+  Scan `HAVING` clause for sub-queries and `IN`-lists (Hsuan-Yi Chu)
+* Upgrade hydromatic-resource-maven-plugin
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-710">CALCITE-710</a>]
+  Identical conditions in the `WHERE` clause cause `AssertionError` (Sean
+  Hsuan-Yi Chu)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-695">CALCITE-695</a>]
+  Do not add `SINGLE_VALUE` aggregate function to a sub-query that will never
+  return more than one row (Hsuan-Yi Chu)
+* Add tests for scalar sub-queries, including test cases for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-709">CALCITE-709</a>]
+  Errors with `LIMIT` inside scalar sub-query
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-702">CALCITE-702</a>]
+  Add validator test for monotonic expressions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-699">CALCITE-699</a>]
+  In Avatica, synchronize access to Calendar
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-700">CALCITE-700</a>]
+  Pass time zone into tests
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-698">CALCITE-698</a>]
+  For `GROUP BY ()`, `areColumnsUnique()` should return true for any key
+* Disable tests that fail under JDK 1.7 due to
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
+* Add "getting started" to HOWTO
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-692">CALCITE-692</a>]
+  Add back sqlline as a dependency
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-677">CALCITE-677</a>]
+  `RemoteDriverTest.testTypeHandling` fails east of Greenwich
+* Disable test for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
+  Make `RemoteDriverTest.testStatementLifecycle` thread-safe
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-686">CALCITE-686</a>]
+  `SqlNode.unparse` produces invalid SQL
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-507">CALCITE-507</a>]
+  Update HOWTO.md with running integration tests
+* Add H2 integration test
+* Add PostgreSQL integration test
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-590">CALCITE-590</a>]
+  Update MongoDB test suite to calcite-test-dataset
+* Add `CalciteAssert.assertArrayEqual` for more user-friendly asserts
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-585">CALCITE-585</a>]
+  Avatica JDBC methods should throw `SQLFeatureNotSupportedException` (Ng Jiunn
+  Jye)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-671">CALCITE-671</a>]
+  `ByteString` does not deserialize properly as a `FetchRequest` parameter value
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-676">CALCITE-676</a>]
+  `AssertionError` in `GROUPING SETS` query
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-678">CALCITE-678</a>]
+  `SemiJoinRule` mixes up fields when `Aggregate.groupSet` is not field #0
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.2.0-incubating">1.2.0-incubating</a> / 2015-04-07
+{: #v1-2-0}
+
+A short release, less than a month after 1.1.
+
+There have been many changes to Avatica, hugely improving its coverage of the
+JDBC API and overall robustness. A new provider, `JdbcMeta`, allows
+you to remote an existing JDBC driver.
+
+[<a href="https://issues.apache.org/jira/browse/CALCITE-606">CALCITE-606</a>]
+improves how the planner propagates traits such as collation and
+distribution among relational expressions.
+
+[<a href="https://issues.apache.org/jira/browse/CALCITE-613">CALCITE-613</a>]
+and [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
+improve implicit and explicit conversions in SQL.
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-366">CALCITE-366</a>]
+  Support Aggregate push down in bushy joins (Jesus Camacho Rodriguez)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-613">CALCITE-613</a>]
+  Implicitly convert character values in comparisons
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
+  Implement `CAST` between date-time types
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-634">CALCITE-634</a>]
+  Allow `ORDER BY` aggregate function in `SELECT DISTINCT`, provided that it
+  occurs in `SELECT` clause (Sean Hsuan-Yi Chu)
+* In linq4j, implement `firstOrDefault`, `single`, and `singleOrDefault` methods
+  (Daniel Cooper)
+* JDBC adapter
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-631">CALCITE-631</a>]
+    Push theta joins down to JDBC adapter (Ng Jiunn Jye)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-657">CALCITE-657</a>]
+    `NullPointerException` when executing `JdbcAggregate.implement`
+    method (Yuri Au Yong)
+* Metadata
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-659">CALCITE-659</a>]
+    Missing types in `averageTypeValueSize` method in `RelMdSize`
+    (Jesus Camacho Rodriguez)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-650">CALCITE-650</a>]
+    Add metadata for average size of a tuple in `SemiJoin` (Jesus
+    Camacho Rodriguez)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-649">CALCITE-649</a>]
+    Extend `splitCondition` method in `RelOptUtil` to handle multiple
+    joins on the same key (Jesus Camacho Rodriguez)
+
+Avatica features and bug fixes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-670">CALCITE-670</a>]
+  `AvaticaPreparedStatement` should support `execute()` and
+  `executeUpdate()` (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-641">CALCITE-641</a>]
+  Implement logging throughout Avatica server (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-646">CALCITE-646</a>]
+  `AvaticaStatement.execute` method broken over remote JDBC (Yeong Wei
+  and Julian Hyde)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-660">CALCITE-660</a>]
+  Improve Avatica date support
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-655">CALCITE-655</a>]
+  Implement `ConnectionSync` RPC (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-654">CALCITE-654</a>]
+  Tighten up `AvaticaStatement.execute` semantics (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-658">CALCITE-658</a>]
+  Cleanup dependency usage (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-652">CALCITE-652</a>]
+  Move server pieces of `avatica` into `avatica-server` (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-651">CALCITE-651</a>]
+  In `JdbcMeta`, convert property definitions to an enum (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-640">CALCITE-640</a>]
+  Avatica server should expire stale connections/statements (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-639">CALCITE-639</a>]
+  Open up permissions on avatica server components (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-637">CALCITE-637</a>]
+  Implement Avatica `CloseConnection` RPC (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-636">CALCITE-636</a>]
+  Connection isolation for Avatica clients (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-626">CALCITE-626</a>]
+  Implement `CloseStatement` RPC (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-630">CALCITE-630</a>]
+  Flesh out `AvaticaParameter.setObject` (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-627">CALCITE-627</a>]
+  Add Avatica support for `getTableTypes`, `getColumns` (Xavier FH Leong)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-618">CALCITE-618</a>]
+  Add Avatica support for `getTables` (Julian Hyde and Nick Dimiduk)
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-617">CALCITE-617</a>]
+  Check at initialization time in `CachingInvocationHandler` that MD provider
+  is not null (Jesus Camacho Rodriguez)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-638">CALCITE-638</a>]
+  SQL standard `REAL` is 4 bytes, `FLOAT` is 8 bytes
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-672">CALCITE-672</a>]
+  SQL `ANY` type should be nullable (Jinfeng Ni)
+* Disable tests, pending
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-673">CALCITE-673</a>]
+  Timeout executing joins against MySQL
+* Fix traits in MongoDB adapter, and `NullPointerException` in `JdbcTest`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-662">CALCITE-662</a>]
+  Query validation fails when an `ORDER BY` clause is used with `WITH CLAUSE`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-606">CALCITE-606</a>]
+  Fix trait propagation and add test case
+* Remove checkstyle Eclipse properties from git tracking
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-644">CALCITE-644</a>]
+  Increase check style line limit to 100 chars (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-648">CALCITE-648</a>]
+  Update `ProjectMergeRule` description for new naming convention (Jinfeng Ni)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-625">CALCITE-625</a>]
+  `README.md` linking to the wrong page of `optiq-csv` (hongbin ma)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-632">CALCITE-632</a>]
+  Sort order returned by `SUPERCLASS_COMPARATOR` in
+  `ReflectiveRelMetadataProvider` is inconsistent (Jesus Camacho
+  Rodriguez)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-335">CALCITE-335</a>]
+  Remove uses of linq4j `Functions.adapt`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-592">CALCITE-592</a>]
+  Upgrade to Guava 14.0.1
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-596">CALCITE-596</a>]
+  JDBC adapter incorrectly reads null values as 0 (Ng Jiunn Jye)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-633">CALCITE-633</a>]
+  `WITH ... ORDER BY` cannot find table
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-614">CALCITE-614</a>]
+  `IN` clause in `CASE` in `GROUP BY` gives `AssertionError`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-619">CALCITE-619</a>]
+  Slim down dependencies in parent POM
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.1.0-incubating">1.1.0-incubating</a> / 2015-03-13
+{: #v1-1-0}
+
+This Calcite release makes it possible to exploit physical properties
+of relational expressions to produce more efficient plans, introducing
+collation and distribution as traits, `Exchange` relational operator,
+and several new forms of metadata.
+
+We add experimental support for streaming SQL.
+
+This release drops support for JDK 1.6; Calcite now requires 1.7 or
+later.
+
+We have introduced static `create` methods for many sub-classes of
+`RelNode`. We strongly suggest that you use these rather than
+calling constructors directly.
+
+New features
+
+* SQL
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-602">CALCITE-602</a>]
+    Streaming queries (experimental)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-588">CALCITE-588</a>]
+    Allow `TableMacro` to consume maps and collections
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-583">CALCITE-583</a>]
+    Operator `||` mishandles `ANY` type (Sean Hsuan-Yi Chu)
+* Planner rule improvements
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-445">CALCITE-445</a>]
+    Pull up filters rejected by a `ProjectableFilterableTable`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-600">CALCITE-600</a>]
+    Use `SetOpFactory` in rules containing `Union` operator (Jesus
+    Camacho Rodriguez)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-603">CALCITE-603</a>]
+    Metadata providers for size, memory, parallelism
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-607">CALCITE-607</a>]
+      Change visibility of constructor in metadata providers for size,
+      memory, parallelism (Jesus Camacho Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-608">CALCITE-608</a>]
+      Exception is thrown when `RelMdDistribution` for `Project`
+      operator is called (Jesus Camacho Rodriguez)
+* Collation and distribution as traits
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-88">CALCITE-88</a>]
+    Add collation as a trait and a kind of `RelNode` metadata
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-569">CALCITE-569</a>]
+    `ArrayIndexOutOfBoundsException` when deducing collation (Aman Sinha)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-581">CALCITE-581</a>]
+    Add `LogicalSort` relational expression, and make `Sort` abstract
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-526">CALCITE-526</a>]
+    Add `EnumerableMergeJoin`, which exploits sorted inputs
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-71">CALCITE-71</a>]
+    Provide a way to declare that tables are sorted
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-576">CALCITE-576</a>]
+    Make `RelCollation` trait and `AbstractRelNode.getCollationList` consistent
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-254">CALCITE-254</a>]
+    Propagate `RelCollation` on aliased columns in `JoinRule`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-569">CALCITE-569</a>]
+    `ArrayIndexOutOfBoundsException` when deducing collation
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-594">CALCITE-594</a>]
+    Add `RelDistribution` trait and `Exchange` relational expression
+
+API changes
+
+* Many sub-classes of `RelNode` now have a static `create` method
+  which automatically sets up traits such as collation and
+  distribution. The constructors are not marked deprecated, but we
+  strongly suggest that you use the `create` method if it exists.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-591">CALCITE-591</a>]
+  Drop support for Java 1.6 (and JDBC 4.0)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-587">CALCITE-587</a>]
+  Upgrade `jetty-server` to 9.2.7.v20150116 and port avatica-server `HttpServer`
+  (Trevor Hartman)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-577">CALCITE-577</a>]
+  Revert temporary API changes introduced in
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-575">CALCITE-575</a>]
+* Add means to create `Context` instances by wrapping objects and by chaining
+  contexts
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-599">CALCITE-599</a>]
+  `EquiJoin` in wrong package (Jesus Camacho Rodriguez)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-573">CALCITE-573</a>]
+  Use user-given names in `RelOptUtil.createProject` and `createRename`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-572">CALCITE-572</a>]
+  Remove `Project.flags` (methods are deprecated, to be removed before 2.0)
+
+Bug-fixes and internal changes
+
+* Remove the `LICENSE` file of calcite-example-csv (the former
+  optiq-csv) and move its history into main history
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-615">CALCITE-615</a>]
+  AvaticaParameter should be Jackson serializable (Nick Dimiduk)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-612">CALCITE-612</a>]
+  Update AvaticaStatement to handle cancelled queries (Parth Chandra)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-605">CALCITE-605</a>]
+  Reduce dependency on third-party maven repositories
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-611">CALCITE-611</a>]
+  Method `setAggChildKeys` should take into account indicator columns of
+  `Aggregate` operator (Jesus Camacho Rodriguez)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-566">CALCITE-566</a>]
+  `ReduceExpressionsRule` requires planner to have an `Executor`
+* Refactor `TableScanNode.create` method
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-593">CALCITE-593</a>]
+  Validator in `Frameworks` should expand identifiers (Jinfeng Ni)
+* Australian time-zones changed in `tzdata2014f`, Java 1.8.0_31
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-580">CALCITE-580</a>]
+  Average aggregation on an `Integer` column throws `ClassCastException`
+* In Travis, ask Surefire to print results to screen
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-586">CALCITE-586</a>]
+  Prevent JSON serialization of `Signature.internalParameters`
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.0.0-incubating">1.0.0-incubating</a> / 2015-01-31
+{: #v1-0-0}
+
+Calcite's first major release.
+
+Since the previous release we have re-organized the into the `org.apache.calcite`
+namespace. To make migration of your code easier, we have described the
+<a href="https://issues.apache.org/jira/secure/attachment/12681620/mapping.txt">mapping from old to new class names</a>
+as an attachment to
+[<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>].
+
+The release adds SQL support for `GROUPING SETS`, `EXTEND`, `UPSERT` and sequences;
+a remote JDBC driver;
+improvements to the planner engine and built-in planner rules;
+improvements to the algorithms that implement the relational algebra,
+including an interpreter that can evaluate queries without compilation;
+and fixes about 30 bugs.
+
+New features
+
+* SQL
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-494">CALCITE-494</a>]
+    Support `NEXT`/`CURRENT VALUE FOR` syntax for using sequences
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-492">CALCITE-492</a>]
+    Support `UPSERT` statement in parser
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-493">CALCITE-493</a>]
+    Add `EXTEND` clause, for defining columns and their types at query/DML time
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-497">CALCITE-497</a>]
+    Support optional qualifier for column name references
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-356">CALCITE-356</a>]
+    Allow column references of the form `schema.table.column`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-462">CALCITE-462</a>]
+    Allow table functions in `LATERAL` expression
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-282">CALCITE-282</a>]
+    Add `{fn QUARTER(date)}` function (Benoy Antony)
+  * Grouping sets
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-370">CALCITE-370</a>]
+      Support `GROUPING SETS`, `CUBE`, `ROLLUP` in SQL and algebra
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-512">CALCITE-512</a>]
+      Add `GROUP_ID`,`GROUPING_ID`, `GROUPING` functions
+* Planner rule improvements
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-92">CALCITE-92</a>]
+    Optimize away `Project` that merely renames fields
+  * Detect and merge duplicate predicates `AND(x, y, x)` to `AND(x, y)` in more
+    circumstances
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-557">CALCITE-557</a>]
+    Speed up planning by never creating `AbstractConverter`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-545">CALCITE-545</a>]
+    When a projected expression can only have one value, replace with that
+    constant
+  * Grouping sets
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-542">CALCITE-542</a>]
+      Support for `Aggregate` with grouping sets in `RelMdColumnOrigins` (Jesus
+      Camacho Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-533">CALCITE-533</a>]
+      Support for grouping sets in `FilterAggregateTransposeRule` (Jesus Camacho
+      Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-532">CALCITE-532</a>]
+      Support for grouping sets in `AggregateFilterTransposeRule` (Jesus Camacho
+      Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-513">CALCITE-513</a>]
+      Support for grouping sets in `AggregateProjectMergeRule` (Jesus Camacho
+      Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-510">CALCITE-510</a>]
+      Support for grouping sets in `AggregateExpandDistinctAggregatesRule` (Jesus
+      Camacho Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-502">CALCITE-502</a>]
+      Support for grouping sets in `AggregateUnionTransposeRule` (Jesus Camacho
+      Rodriguez)
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-503">CALCITE-503</a>]
+      Tests to check rules on `Aggregate` operator without grouping sets (Jesus
+      Camacho Rodriguez)
+* Algorithms
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-451">CALCITE-451</a>]
+    Implement theta join, inner and outer, in enumerable convention
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
+    Update `Correlate` mechanics and implement `EnumerableCorrelate` (aka nested
+    loops join)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-544">CALCITE-544</a>]
+    Implement `Union` in interpreter
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-562">CALCITE-562</a>]
+    Implement inner `Join` in interpreter and improve handling of scalar expressions
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-543">CALCITE-543</a>]
+    Implement `Aggregate` (including `GROUPING SETS`) in interpreter (Jacques
+    Nadeau)
+  * In progress towards
+    [<a href="https://issues.apache.org/jira/browse/CALCITE-558">CALCITE-558</a>]
+    add `BINDABLE` convention (but `ENUMERABLE` is still the default), and add
+    `ArrayBindable` and `Scalar` interfaces
+* Remote driver
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-93">CALCITE-93</a>]
+    Calcite RPC server
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-94">CALCITE-94</a>]
+    Remote JDBC driver
+  * Make `JsonHandler` and `JsonService` thread-safe
+
+API changes
+
+* The great code re-org
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>]
+    Re-organize package structure
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-419">CALCITE-419</a>]
+    Naming convention for planner rules
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-306">CALCITE-306</a>]
+    Standardize code style for "import package.*;"
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-474">CALCITE-474</a>]
+    Clean up rule naming in order to support enabling/disabling rules
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-460">CALCITE-460</a>]
+    Add `ImmutableBitSet` and replace uses of `BitSet`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-479">CALCITE-479</a>]
+    Migrate `RelNode.getChildExps` to `RelNode.accept(RexShuttle)`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-527">CALCITE-527</a>]
+    Drop `rowType` field and constructor/copy argument of `Calc`
+* Add linq4j and example-csv modules
+  * Remove unused packages in linq4j, and fix checkstyle issues in linq4j and csv
+  * Add calcite-linq4j and calcite-example-csv as POM sub-modules
+  * Import 'optiq-csv' project as 'example/csv/', and add Apache headers
+  * Import 'linq4j' project, and add Apache headers
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-478">CALCITE-478</a>]
+    Move CSV tutorial (Siva Narayanan)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-464">CALCITE-464</a>]
+  Make parser accept configurable max length for SQL identifier
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-465">CALCITE-465</a>]
+  Remove `OneRow` and `Empty` relational expressions; `Values` will suffice
+
+Bug-fixes and internal changes
+
+* Build improvements
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-541">CALCITE-541</a>]
+    Update maven-source-plugin to 2.4 to get speedup in jdk 1.8
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-537">CALCITE-537</a>]
+    Skip overwrite of `NOTICE`, `DEPENDENCIES`, and `LICENSE` files
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-538">CALCITE-538</a>]
+    Generate `Parser.jj` only at first build
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-539">CALCITE-539</a>]
+    Avoid rewrite of `org-apache-calcite-jdbc.properties`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-540">CALCITE-540</a>]
+    Create git.properties file only at first build. This saves time in
+    development at a cost of stale `git.properties`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-536">CALCITE-536</a>]
+    Add `@PackageMarker` to `package-info.java` so maven-compiler skips
+    compilation when the sources are unchanged
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-535">CALCITE-535</a>]
+    Support skip overwrite in hydromatic-resource
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-582">CALCITE-582</a>]
+  `EnumerableTableScan` broken when table has single column
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-575">CALCITE-575</a>]
+  Variant of `ProjectRemoveRule` that considers a project trivial only if its
+  field names are identical (John Pullokkaran)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-571">CALCITE-571</a>]
+  `ReduceExpressionsRule` tries to reduce `SemiJoin` condition to non-equi
+  condition
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-568">CALCITE-568</a>]
+  Upgrade to a version of `pentaho-aggdesigner` that does not pull in
+  `servlet-api`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-567">CALCITE-567</a>]
+  Make `quidem` dependency have scope "test"
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-570">CALCITE-570</a>]
+  `ReduceExpressionsRule` throws "duplicate key" exception
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-561">CALCITE-561</a>]
+  Upgrade parent POM
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-458">CALCITE-458</a>]
+  ArrayIndexOutOfBoundsException when using just a single column in interpreter
+* Fix spurious extra row from `FULL JOIN`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-554">CALCITE-554</a>]
+  Outer join over NULL keys generates wrong result
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
+  Teach `CalciteAssert` to respect multiple settings
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-516">CALCITE-516</a>]
+  `GROUP BY` on a `CASE` expression containing `IN` predicate fails (Aman Sinha)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-552">CALCITE-552</a>]
+  Upgrade tpcds (which depends on an old version of guava)
+* Copy identifier when fully-qualifying, so column aliases have the right case
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-548">CALCITE-548</a>]
+  Extend `induce` method to return `CUBE` and `ROLLUP` (Jesus Camacho Rodriguez)
+  * Simplify `Group.induce` by assuming that group sets are sorted
+* Test case for
+  [<a  href="https://issues.apache.org/jira/browse/CALCITE-212">CALCITE-212</a>]
+  Join condition with `OR`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-550">CALCITE-550</a>]
+  Case-insensitive matching of sub-query columns fails
+  * Add more unit tests (Jinfeng Ni)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-448">CALCITE-448</a>]
+  `FilterIntoJoinRule` creates filters containing invalid `RexInputRef`
+* When registering a `RelNode`, be tolerant if it is equivalent to a `RelNode`
+  with different traits
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-547">CALCITE-547</a>]
+  Set nullability while inferring return type of `item(any,...)` operator
+* In Travis CI, enable containers, and cache `.m2` directory
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-534">CALCITE-534</a>]
+  Missing implementation of `ResultSetMetaData.getColumnClassName` (Knut
+  Forkalsrud)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-506">CALCITE-506</a>]
+  Update `EnumerableRelImplementor.stash` so it is suitable for all kinds of
+  classes
+* Merge join algorithm for `Enumerable`s
+* Efficient `Enumerable` over random-access list
+* Add a test that calls all functions with arguments of all types that they
+  claim to accept
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-511">CALCITE-511</a>]
+  `copy` method in `LogicalAggregate` not copying the indicator value properly
+* Add a model that has lattices and works against HSQLDB
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-509">CALCITE-509</a>]
+  `RelMdColumnUniqueness` uses `ImmutableBitSet.Builder` twice, gets
+  `NullPointerException`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-488">CALCITE-488</a>]
+  `Enumerable<Holder>` does not work if where `Holder` is a custom class
+  with a single field; Calcite tries to treat it as `SCALAR` due to premature
+  `JavaRowFormat.optimize`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-352">CALCITE-352</a>]
+  Throw exception if `ResultSet.next()` is called after `close()`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-403">CALCITE-403</a>]
+  `Enumerable` gives `NullPointerException` with `NOT` on nullable expression
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-469">CALCITE-469</a>]
+  Update example/csv README.md instructions
+* Document `WITH`, `LATERAL`, `GROUPING SETS`, `CUBE`, `ROLLUP`;
+  add descriptions for all built-in functions and operators
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-470">CALCITE-470</a>]
+  Print warning when column type hint is not understood;
+  Update `EMPS.deptno` column Integer &rarr; int
+* Fix `Linq4j.product`; the cartesian product of 0 attributes is one row of 0
+  attributes
+* Update link optiq-mat-plugin &rarr; mat-calcite-plugin
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-467">CALCITE-467</a>]
+  Incorrect namespace in `package-info.java`
+* Add headers, to appease the RAT
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-446">CALCITE-446</a>]
+  CSV adapter should read from directory relative to the model file
+* Add examples of scannable and filterable tables, matching
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
+  Simpler SPI to query Table
+* Fix `JdbcTest.testVersion` now that version is 1.0
+* Update release HOWTO
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-0.9.2-incubating">0.9.2-incubating</a> / 2014-11-05
+{: #v0-9-2}
+
+A fairly minor release, and last release before we rename all of the
+packages and lots of classes, in what we expect to call 1.0. If you
+have an existing application, it's worth upgrading to this first,
+before you move on to 1.0.
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
+  Simpler SPI to query `Table`
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-447">CALCITE-447</a>]
+  Change semi-join rules to make use of factories
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-442">CALCITE-442</a>
+  Add `RelOptRuleOperand` constructor that takes a predicate
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-397">CALCITE-397</a>]
+  `SELECT DISTINCT *` on reflective schema gives `ClassCastException` at runtime
+* Various lattice improvements.
+* sqlline: Looking for class-path in inconsistent locations.
+* Re-order test suite, so that fast tests are run first.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-444">CALCITE-444</a>]
+  Filters wrongly pushed into full outer join
+* Make it more convenient to unit test `RelMetadataQuery`, and add some more
+  tests for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-443">CALCITE-443</a>]
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-443">CALCITE-443</a>]
+  `getPredicates` from a Union is not correct
+* Update references to web sites, git repositories, jira, mailing lists,
+  travis CI now that [INFRA-8413] is fixed
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-434">CALCITE-435</a>]
+  `FilterAggregateTransposeRule` loses conditions that cannot be pushed
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-435">CALCITE-435</a>]
+  `LoptOptimizeJoinRule` incorrectly re-orders outer joins
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-439">CALCITE-439</a>]
+  `SqlValidatorUtil.uniquify()` may not terminate under some conditions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-438">CALCITE-438</a>]
+  Push predicates through `SemiJoinRel`
+* Add test case for `LIKE ... ESCAPE`.
+* HOWTO: Modify release instructions.
+* Update `DiffRepository` documentation.
+* Add tests for windowed aggregates without `ORDER BY`. (Works already.)
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-0.9.1-incubating">0.9.1-incubating</a> / 2014-10-02
+{: #v0-9-1}
+
+This is the first release as Calcite. (The project was previously called Optiq.)
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-430">CALCITE-430</a>]
+  Rename project from Optiq to Calcite
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-426">CALCITE-426</a>]
+  Pool JDBC data sources, to make it easier to pool connections
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-416">CALCITE-416</a>]
+  Execute logical `RelNode`s using an interpreter
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-376">CALCITE-376</a>]
+  Move `SqlRun` into its own artifact,
+  <a href="https://github.com/julianhyde/quidem">Quidem</a>.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-269">CALCITE-269</a>]
+  MongoDB result sets larger than 16MB
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-373">CALCITE-373</a>]
+  `NULL` values in `NOT IN` sub-queries
+* SQL functions:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-422">CALCITE-422</a>]
+    Add `REGR_SXX` and `REGR_SYY` regression functions
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-421">CALCITE-421</a>]
+    Add `COVAR_POP` and `COVAR_SAMP` aggregate functions
+* Planner rules:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-425">CALCITE-425</a>]
+    Add `FilterAggregateTransposeRule`, that pushes a filter through an
+    aggregate
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-399">CALCITE-399</a>]
+    Factorize common `AND` factors out of `OR` predicates
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-404">CALCITE-404</a>]
+    `MergeProjectRule` should not construct `RexProgram`s for simple mappings
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-394">CALCITE-394</a>]
+    Add `RexUtil.toCnf()`, to convert expressions to conjunctive normal form
+    (CNF)
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-389">CALCITE-389</a>]
+    `MergeFilterRule` should flatten `AND` condition
+* Lattices:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-428">CALCITE-428</a>]
+    Use optimization algorithm to suggest which tiles of a lattice to
+    materialize
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-410">CALCITE-410</a>]
+    Allow lattice tiles to satisfy a query by rolling up
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-406">CALCITE-406</a>]
+    Add tile and measure elements to lattice model element
+  * Now, a lattice can materialize an aggregate-join and use it in a subsequent
+    query.
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-402">CALCITE-402</a>]
+    Lattice should create materializations on demand
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-344">CALCITE-344</a>]
+    Lattice data structure
+* Field trimmer:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-408">CALCITE-408</a>]
+    Make `FieldTrimmer` work with `RelNode` base classes
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-388">CALCITE-388</a>]
+    Handle semi-joins in field trimmer
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-395">CALCITE-395</a>]
+    Make `FieldTrimmer.trimFields(SetOp)` generate `ProjectRel` instead of
+    `CalcRel`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-393">CALCITE-393</a>]
+    If no fields are projected from a table, field trimmer should project a
+    dummy expression
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-413">CALCITE-413</a>]
+  Add `RelDataTypeSystem` plugin, allowing different max precision of a
+  `DECIMAL`
+* In `Planner`, query de-correlation no longer requires state in a
+  `SqlToRelConverter`.
+* Factories:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-392">CALCITE-392</a>]
+    `RelFieldTrimmer` should use factory to create new rel nodes
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-382">CALCITE-382</a>]
+    Refactoring rules to use factories
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-398">CALCITE-398</a>]
+    Move `CalcRel.createProject` methods to `RelOptUtil`
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-396">CALCITE-396</a>]
+    Change return type of `JoinFactory.createJoin()`; add `SemiJoinFactory`
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-386">CALCITE-386</a>]
+  Fix NOTICE
+* Add tests inspired by Derby bugs.
+* Add recent presentation to README.md.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-427">CALCITE-427</a>]
+  Off-by-one issues in `RemoveDistinctAggregateRule`,
+  `AggregateFilterTransposeRule`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-414">CALCITE-414</a>]
+  Bad class name in `sqlline` shell script
+* Bad package name in `package-info.java` was causing errors in Eclipse.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-412">CALCITE-412</a>]
+  `RelFieldTrimmer`: when trimming `SortRel`, the collation and trait set don't
+  match
+* Add test case for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-411">CALCITE-411</a>]
+  Duplicate column aliases
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-407">CALCITE-407</a>]
+  `RemoveTrivialProjectRule` drops child node's traits
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-409">CALCITE-409</a>]
+  `PushFilterPastProjectRule` should not push filters past windowed aggregates
+* Fix tests on Windows.
+* Don't load `FoodMartQuerySet` unless we have to. It's big.
+* Enable connection pooling in test suite.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-384">CALCITE-384</a>]
+  Add `apache-` prefix to tarball and directory within tarball
+* Freeze hive fmpp > freemarker plugin dependency.
+* Upgrade Janino
+* Removed hardcoded foodmart schema information
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-387">CALCITE-387</a>]
+  CompileException when cast TRUE to nullable boolean
+* Temporary fix for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-390">CALCITE-390</a>]
+  Transitive inference (`RelMdPredicates`) doesn't handle semi-join
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-385">CALCITE-385</a>]
+  Change comment style for Java headers
+* Disable test that is inconistent between JDK 1.7 and 1.8.
+* Fix `git-commit-id-plugin` error when running in Travis-CI.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-381">CALCITE-381</a>]
+  Remove plugin versions from the `<plugins>` tag in root pom
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-383">CALCITE-383</a>]
+  Each jar should have a `git.properties` file describing its exact version
+* Fix `mvn site` on JDK 1.8 and enable in Travis-CI.
+* Status icon based on master branch, not whichever branch happened to build
+  most recently.
+* HOWTO:
+  * Document how to build from git, and how to get jars from maven repo.
+  * Optiq web site
+  * Template emails for Apache votes
+  * Update JIRA cases following release
+  * Instructions for making and verifying a release
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-0.9.0-incubating">0.9.0-incubating</a> / 2014-08-19
+{: #v0-9-0}
+
+This is the first release under the Apache incubator process.
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-371">CALCITE-371</a>]
+  Implement `JOIN` whose `ON` clause contains mixed equi and theta
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-369">CALCITE-369</a>]
+  Add `EnumerableSemiJoinRel`, implementation of semi-join in enumerable
+  convention
+* Add class `Strong`, for detecting null-rejecting predicates.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-368">CALCITE-368</a>]
+  Add SemiJoinRule, planner rule to convert project-join-aggregate into semi-join
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-367">CALCITE-367</a>]
+  `PushFilterPastJoinRule` should strengthen join type
+* Add `EquiJoinRel`, base class for joins known to be equi-joins.
+* Implement `CAST(<string> AS <datetime>)` and
+  `<datetime> + <interval>`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-360">CALCITE-360</a>]
+  Introduce a rule to infer predicates from equi-join conditions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-349">CALCITE-349</a>]
+  Add heuristic join-optimizer that can generate bushy joins
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-346">CALCITE-346</a>]
+  Add commutative join rule
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-347">CALCITE-347</a>]
+  In `SqlRun`, add `!plan` command
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-314">CALCITE-314</a>]
+  Allow simple UDFs based on methods
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-327">CALCITE-327</a>]
+  Rules should use base class to find rule match & use factory for object
+  creation
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-316">CALCITE-316</a>]
+  In `SqlRun`, match output regardless of order if `ORDER BY` not present
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-300">CALCITE-300</a>]
+  Support multiple parameters in `COUNT(DISTINCT x, y, ...)`
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-343">CALCITE-343</a>]
+  RelDecorrelator should build its own mappings, not inherit from SqlToRelConverter
+* Remove deprecated methods.
+* Convert `Hook` to use Guava `Function` (was linq4j `Function1`).
+* Add fluent method `withHook`, to more easily add hooks in tests.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-321">CALCITE-321</a>]
+  Add support for overriding implementation of `CompoundIdentifier` in
+  `SqlParser`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-322">CALCITE-322</a>]
+  Add support for `SqlExplain`, `SqlOrderBy` and `SqlWith` to support
+  `SqlShuttle` use.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-323">CALCITE-323</a>]
+  Override `SqlUnresolvedFunction.inferReturnType()` to return `ANY` type
+  so framework implementors can support late bound function implementations.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-324">CALCITE-324</a>]
+  Add `ViewExpander` for `Planner` in `Frameworks`. Expose additional
+  properties of `ViewTable` to allow subclassing.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-247">CALCITE-247</a>]
+  Add `Context` and `FrameworkConfig`
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-380">CALCITE-380</a>]
+  Downgrade to Guava 11.0.2
+* Move several .md files into new 'doc' directory, to keep the root directory simple.
+* Add DISCLAIMER
+* Update history and HOWTO
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-377">CALCITE-377</a>]
+  UnregisteredDriver should catch, log and re-throw NoClassDefFoundError
+* Inherit maven-release-plugin from Apache POM.
+* Test case for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-373">CALCITE-373</a>]
+  NOT IN and NULL values
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-372">CALCITE-372</a>]
+  Change `LoptOptimizeJoinRule` &amp; `PushFilterPast`* rules to use factory
+* Upgrade `maven-checkstyle-plugin`.
+* Add class `Holder`, a mutable slot that can contain one object.
+* Remove the 2-minute wait at the top of the hour for tests of
+  `CURRENT_TIME`, etc.
+* Tune `ImmutableIntList`'s iterators.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-364">CALCITE-364</a>]
+  Validator rejects valid `WITH ... ORDER BY` query
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-363">CALCITE-363</a>]
+  Use `dependencyManagement` and `pluginManagement` in POM files
+* Add `FilterFactory`.
+* Add `README` file, incubation disclaimers, and how-to build and running tests.
+* Add `KEYS` and start how-to for making snapshots and releases.
+* Capital case component names; inherit license info from Apache parent POM.
+* Only run `apache-rat` and `git-commit-id-plugin` in "release" maven profile.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-348">CALCITE-348</a>]
+  Add Apache RAT as maven plugin
+* Change license headers from "Julian Hyde" to "ASF"; add headers where missing.
+* Fix build breakage on JDK 1.6 due to missing method `BitSet.previousClearBit`.
+* Refactor test infrastructure to allow testing against heuristic bushy-join
+  optimizer.
+* Add methods and tests for BitSets, and re-organize tests.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-354">CALCITE-354</a>]
+  Change maven groupId to "org.apache.optiq"
+* Specify return type when calling `RexBuilder.makeCall`, if possible.
+* Eliminate duplicate conditions in `RexProgramBuilder.addCondition`, not
+  `RexBuilder.makeCall` as previously.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-345">CALCITE-345</a>]
+  `AssertionError` in `RexToLixTranslator` comparing to date literal
+* Restore `PushFilterPastJoinRule` to `RelDecorrelator`; interim pending
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-343">CALCITE-343</a>]
+  fix.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-340">CALCITE-340</a>]
+  Fix bug in `SqlToRelConverter` when push expressions in join conditions into
+  `ProjectRel`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-313">CALCITE-313</a>]
+  Query decorrelation fails
+* While unifying a `RelNode` tree with a materialized view expression,
+  switch representation to `MutableRel`s.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-305">CALCITE-305</a>]
+  Unit test failure on release candidates
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-325">CALCITE-325</a>]
+  Use Java list instead of Guava list to avoid null checks in case of
+  `SqlTypeExplicitPrecedenceList`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-326">CALCITE-326</a>]
+  Fix `RelOptUtil` `ANY` type check.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-303">CALCITE-303</a>]
+  Migrate issue URLs
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-331">CALCITE-331</a>]
+  Precision/scale compatibility checks should always succeed for `ANY` type
+* In `SqlRun`, allow `!plan` after `!ok` for same SQL statement.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-318">CALCITE-318</a>]
+  Add unit test for `SqlRun`
+* Fix a bug where composite `SELECT DISTINCT` would return duplicate rows.
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.8">0.8</a> / 2014-06-27
+{: #v0-8}
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-310">CALCITE-310</a>]
+   Implement LEAD, LAG and NTILE windowed aggregates
+* Reduce `COUNT(not-null-expression)` to `COUNT()`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-292">CALCITE-292</a>]
+   Improve windowed aggregate return types
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-302">CALCITE-302</a>]
+   Use heuristic rule to plan queries with large numbers of joins
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-283">CALCITE-283</a>]
+  Add TPC-DS data generator
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-294">CALCITE-294</a>]
+  Implement DENSE_RANK windowed aggregate function
+* SqlRun utility
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-290">CALCITE-290</a>]
+    Add `SqlRun`, an idempotent utility for running SQL test scripts
+  * Add "!skip" command to SqlRun.
+  * Add MySQL formatting mode to SqlRun.
+
+API changes
+
+* Re-organize planner initialization,
+  to make it easier to use heuristic join order.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-301">CALCITE-301</a>]
+  Add `Program` interface, a planner phase more general than current `RuleSet`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-263">CALCITE-263</a>]
+  Add operand type that will cause a rule to fire when a new subset is created
+* Clean up and document SqlKind.
+  * Add `IS_NOT_TRUE` and `IS_NOT_FALSE` `SqlKind` enums.
+  * Add `SqlKind.IS_NOT_NULL` enum value, and use where possible,
+    including for `IS_NOT_UNKNOWN` operator.
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-312">CALCITE-312</a>]
+  Trim non-required fields before `WindowRel`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-311">CALCITE-311</a>]
+  Wrong results when filtering the results of windowed aggregation
+* More tests for `WITH ... ORDER BY`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-309">CALCITE-309</a>]
+  `WITH ... ORDER BY` query gives `AssertionError`
+* Enable `MultiJoinRel` and some other planner rule tests.
+* Add `ImmutableNullableList` and `UnmodifiableArrayList`,
+  and remove calls to `Arrays.asList`.
+* Add method `IntPair.zip`.
+* Reimplement regular and windowed aggregates
+* Switch from github to Apache JIRA for issues tracking.
+  * In release history, update issue URLs from github to Apache JIRA
+* The Apache mailing list is now the official mailing list. Add presentations.
+* Add test for overloaded UDF.
+* Add tests for `NOT IN` where sub-query returns NULL values.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-288">CALCITE-288</a>]
+  Add tests for windowed aggregation based on Postgres reference queries
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-286">CALCITE-286</a>]
+  Error casting MongoDB date
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-284">CALCITE-284</a>]
+  Window functions range defaults to `CURRENT ROW`
+* [<a href=https://issues.apache.org/jira/browse/CALCITE-285">CALCITE-285</a>]
+  Window functions throw exception without `ORDER BY`
+* Test case for
+  [<a href=““https://issues.apache.org/jira/browse/CALCITE-285”>CALCITE-285</a>].
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-281">CALCITE-281</a>]
+  `EXTRACT` function's SQL return type is `BIGINT` but implemented as Java `int`
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.7">0.7</a> / 2014-05-13
+{: #v0-7}
+
+New features
+
+* Implement table functions.
+* Arrays and multi-sets:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-267">CALCITE-267</a>]
+    Improve support for ARRAY data type
+  * Better type information for JDBC Array; nested array now possible.
+  * Implement `JOIN LATERAL` and `JOIN UNNEST`.
+  * Implement the `UNNEST` relational operator, and various improvements
+    to `ARRAY` and `MULTISET` data types.
+  * Represent `ARRAY` columns as Java lists.
+  * Implement `CARDINALITY(ARRAY)` SQL operator.
+* Implement scalar sub-query in `SELECT` clause.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-273">CALCITE-273</a>]
+  Support column alias in WITH queries (common table expressions)
+* Windowed aggregates:
+  * Aggregate over constants, e.g. `SUM(1) OVER (ROWS 10 PRECEDING)`;
+  * `UNBOUNDED PRECEDING` window range;
+  * Windowed aggregates computed over primitive scalars.
+* Fix return type inference for aggregate calls. If the `GROUP BY` clause is
+  empty, `SUM` may return null.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-37">CALCITE-37</a>]
+  Document JSON model file format (as <a href="model.md">model.md</a>).
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-238">CALCITE-238</a>]
+  Add adapter that generates TPC-H data
+* Improve exception message in `AvaticaConnection`; add
+  `ExceptionMessageTest`.
+* Implement micro-benchmarks via
+  <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a>.
+
+API changes
+
+* Provide an option to create root schema without the "metadata" schema.
+* Schema SPI:
+  * [<a href="https://issues.apache.org/jira/browse/CALCITE-175">CALCITE-175</a>]
+    Modify Schema SPI to allow caching
+  * Get sub-schemas defined by a Schema SPI, and cache their `OptiqSchema`
+    wrappers. (Tobi Vollebregt and Julian Hyde)
+* SqlAdvisor callable from client via JDBC.
+
+Bug-fixes and internal changes
+
+* Add Apache incubator proposal.
+* Rename RELEASE.md to HISTORY.md.
+* Upgrade maven-release-plugin.
+* Upgrade to linq4j-0.3.
+* Code generation improvements:
+ * Move code-generation optimizer to linq4j;
+ * Improve translation of strict functions;
+ * Mark most methods in `SqlFunctions` as `@Deterministic`;
+ * Support `static final` constants generated by linq4j.
+ * Avoid excessive box and unbox of primitives when using `Object[]` storage.
+ * In JDBC result set, avoid row computation on each accessor call.
+* Test composite join conditions in various flavors of outer join.
+* Use `fromTrait` of the just previously converted `RelNode` instead
+  of the original `RelNode`.
+* Disable a MongoDB test, pending
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-270">CALCITE-270</a>].
+* Hush warnings from `SplunkAdapterTest` if Splunk is not available.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-252">CALCITE-252</a>]
+  Scalar sub-query that returns 0 rows should become NULL value
+* `SplunkAdapterTest` now uses the same Foodmart database as `JdbcTest`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-242">CALCITE-242</a>]
+  SplunkAdapterTest fails
+* Remove some obsolete classes.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-205">CALCITE-205</a>]
+  Suspicious map.get in VolcanoPlanner.reregister
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.6">0.6</a> / 2014-04-11
+{: #v0-6}
+
+New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-214">CALCITE-214</a>]
+  Modify Frameworks to allow Schema to be re-used
+  Obsoletes `name` field of `ReflectiveSchema`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-237">CALCITE-237</a>]
+  Allow user-defined aggregate functions (UDAs) to be defined in a model
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-227">CALCITE-227</a>]
+  Extend `EXTRACT` function to support `DATE`, `TIME` and `TIMESTAMP` values
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-222">CALCITE-222</a>]
+  User-defined table macros
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-179">CALCITE-179</a>]
+  Optiq on Windows
+  * Add `sqlline.bat` and fix issues running `sqlline` under Cygwin.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-195">CALCITE-195</a>]
+  Push aggregation into MongoDB adapter
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-193">CALCITE-193</a>]
+  Implement OFFSET and LIMIT in MongoDB adapter
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-164">CALCITE-164</a>]
+  Improve query performance of optiq over MongoDB
+* Add Phoenix (HBase) SQL dialect (Bruno Dumon)
+
+API changes
+
+* Obsolete `RexImpTable.AggregateImplementor` and rename `AggImplementor2`.
+  (**This is a breaking change**.)
+* Convert `CombinedParser.jj` into freemarker template to allow
+  custom parser implementations. (Venki Korukanti)
+* Extend `Planner` to pass a custom `ConvertletTable` and custom SQL parser.
+* In `Frameworks`, add a way to specify list of `TraitDef`s that will be used
+  by planner. (Jinfeng Ni)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-198">CALCITE-198</a>]
+  Use `RexExecutor` to evaluate projections and filters
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-219">CALCITE-219</a>]
+  Parse `ALTER scope SET option = value` statement
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-215">CALCITE-215</a>]
+  A Schema should not have to remember its name and parent
+  (**This is a breaking change**.)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-180">CALCITE-180</a>]
+  Common base class for TableFunction, ScalarFunction
+  (**This is a breaking change**.)
+* Add methods for dealing with symbols; deprecate
+  `SqlLiteral.booleanValue(SqlNode)`, `SqlLiteral.symbolValue(SqlNode)`.
+* Add `RelOptPlanner.clear()`; now it is safe to call `transform` twice.
+  (Jinfeng Ni)
+* Remove APIs deprecated for 0.5.
+* Move around some operator classes and singletons.
+
+Bug-fixes and internal changes
+
+* Upgrade to linq4j-0.2.
+* `FETCH` and `LIMIT` are ignored during SQL-to-RelNode translation.
+  (Venki Korukanti)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-245">CALCITE-245</a>]
+  Off-by-one translation of ON clause of JOIN
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-191">CALCITE-191</a>]
+  Rotate time/date/timestamp vals to local timezone
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-244">CALCITE-244</a>]
+  `RelOptTableImpl.create` always expects `QueryableTable` type in
+  `OptiqSchema.TableEntry`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-225">CALCITE-225</a>]
+  Optiq doesn't correctly decorrelate queries
+* Clean up package-info.  Remove duplicates in test packages so they
+  don't conflict with those in non-test packages.
+* Add `Pair.adjacents(Iterable)`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-199">CALCITE-199</a>]
+  Various `ANY` type conditions aren't correctly being considered
+  (Jacques Nadeau)
+* Add files to `.gitignore` that shouldn't be checked in when using
+  Eclipse. (Jacques Nadeau)
+* Add class `ControlFlowException`, and make it base class of
+  existing control-flow exception classes.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-232">CALCITE-232</a>]
+  Sum and avg of empty set should be null as per SQL specification
+* Add `SqlUnresolvedFunction`, to improve how return type of
+  user-defined functions is resolved. (Vladimir Sitnikov)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-228">CALCITE-228</a>]
+  Error while compiling generated Java code when using UDF in expression
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-226">CALCITE-226</a>]
+  User-defined functions should work without explicit schema prefix
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-229">CALCITE-229</a>]
+  Join between different JDBC schemas not implementable
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-230">CALCITE-230</a>]
+  RemoveSortRule derives trait set from sort, should derive it from sort's child
+* Test view and sub-query with `ORDER BY` and `LIMIT`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-223">CALCITE-223</a>]
+  Add `NOTICE` and `LICENSE` files in all generated JAR files
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-209">CALCITE-209</a>]
+  Consistent strategy for line-endings in tests
+  Convert uses of `NL` in tests to Linux newline "\n".
+  This makes string constants simpler.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-218">CALCITE-218</a>]
+  Functions case sensitive when using `Lex.MYSQL`
+* Add tests that a query with aggregate expressions in the `SELECT`
+  clause is considered an aggregate query, even if there is no `GROUP BY`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-216">CALCITE-216</a>]
+  Inconsistent use of provided operator table causes inability to
+  add aggregate functions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-200">CALCITE-200</a>]
+  Javadoc generation fails under JDK 1.8
+* Add class `XmlOutput` (based on `org.eigenbase.xom.XMLOutput`) and remove
+  dependency on eigenbase-xom.
+* Performance: Don't create stack-trace for exceptions used for control-flow.
+  (Vladimir Sitnikov)
+* Performance: Tune `RexProgramBuilder` by using `Pair` rather than `String` as
+  expression key. (Vladimir Sitnikov)
+* Fix NPE using TRIM function with JDBC. (Bruno Dumon)
+* Add dependency on
+  <a href="https://github.com/julianhyde/hydromatic-resource">hydromatic-resource-maven-plugin</a>
+  and obsolete our copy of the resource framework.
+* Fix race condition in `SpaceList`.
+* In planner, use `RelTrait.subsumes` rather than `equals` in an assert.
+  (Jinfeng Ni)
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.5">0.5</a> / 2014-03-14
+{: #v0-5}
+
+New features
+
+* Allow `quoting`, `quotedCasing`, `unquotedCasing`, and `caseSensitive`
+  properties to be specified explicitly (Vladimir Sitnikov)
+* Recognize more kinds of materializations, including filter-on-project (where
+  project contains expressions) and some kinds of aggregation.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-128">CALCITE-128</a>]
+  Support `WITH` queries (common table expressions)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-53">CALCITE-53</a>]
+  Allow `WHEN` clause in simple `CASE` expression to have multiple values
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-156">CALCITE-156</a>]
+  Optiq should recognize 'SYSTEM TABLE', 'JOIN', 'INDEX' as table types
+* Support querying ARRAY columns from JDBC source. (Gabriel Reid)
+
+API changes
+
+* Add
+  `ProjectRelBase.copy(RelTraitSet, RelNode, List<RexNode>, RelDataType)`
+  and make `ProjectRelBase.copy(RelTraitSet, RelNode)` final.
+  (**This is a breaking change** for sub-classes of `ProjectRelBase`.)
+* Change `RexBuilder.makeRangeReference` parameter type.
+* `RexBuilder.makeInputRef` replaces `RelOptUtil.createInputRef`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-160">CALCITE-160</a>]
+  Allow comments in schema definitions
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-147">CALCITE-147</a>]
+  Create a new kind of `SqlCall` that keeps operands in fields, not an operands
+  array
+  * Very widely used parse tree nodes with complex operands, including
+    `SqlSelect`, `SqlJoin`, `SqlInsert`, and a new node type `SqlOrderBy`, are
+    now sub-classes of `SqlCall` but not `SqlBasicCall`.
+  * (**This is a breaking change** to code that assumes that, say,
+    `SqlSelect` has an `operands` field.)
+* Convert all enum constants to upper-case.
+  (**This is a breaking change**.)
+
+Bug-fixes and internal changes
+
+* Generate optiq-core-VERSION-tests.jar not parent-VERSION-tests.jar.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-176">CALCITE-176</a>]
+  ORDER BY expression doesn't work with SELECT \*
+* Fix VARCHAR casts sent to hsqldb source (Bruno Dumon)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-143">CALCITE-143</a>]
+  Remove dependency on eigenbase-resgen
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-173">CALCITE-173</a>]
+  Case-insensitive table names are not supported for `Casing.UNCHANGED`
+* `DATE.getLimit` now returns `Calendar` in GMT time zone (Vladimir Sitnikov)
+* Set `en_US` locale in tests that match against error numbers, dates
+  (Vladimir Sitnikov)
+* Use 1 test thread per CPU to avoid thread starvation on dual core CPUs
+  (Vladimir Sitnikov)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-174">CALCITE-174</a>]
+  Move hsqldb to test scope
+* Add unit tests for `RexExecutorImpl`.
+* Correct JSON model examples in Javadoc comments. (Karel Vervaeke)
+* Move test reference logs from `src/test/java` to `src/test/resources`
+  (reduces the number of 'untracked files' reported by git)
+* Tune `Util.SpaceList`, fix race condition, and move into new utility class
+  `Spaces`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-163">CALCITE-163</a>]
+  Equi-join warning
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-157">CALCITE-157</a>]
+  Handle `SQLFeatureNotSupported` when calling `setQueryTimeout`
+  (Karel Vervaeke)
+* Fix Optiq on Windows. (All tests and checkstyle checks pass.)
+* In checkstyle, support Windows-style file separator, otherwise build fails in
+  Windows due to suppressions not used. (Vladimir Sitnikov)
+* Enable MongoDB tests when `-Dcalcite.test.mongodb=true`.
+* Cleanup cache exception-handling and an assert.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-153">CALCITE-153</a>]
+  Error using MongoDB adapter: Failed to set setXIncludeAware(true)
+* Disable spark engine unless Spark libraries are on the class path and
+  `spark=true` is specified in the connect string.
+* Fix path to `mongo-zips-model.json` in HOWTO. (Mariano Luna)
+* Fix bug deriving the type of a join-key.
+* Fix the value of `ONE_MINUS_EPSILON`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-158">CALCITE-158</a>]
+  Optiq fails when call `Planner.transform()` multiple times, each with
+  different ruleset
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-148">CALCITE-148</a>]
+ Less verbose description of collation. Also, optimize `RelTraitSet` creation
+ and amortize `RelTraitSet.toString()`.
+* Add generics to SQL parser.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-145">CALCITE-145</a>]
+  Unexpected upper-casing of keywords when using java lexer
+* Remove duplicate `maven-source-plugin`.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-141">CALCITE-141</a>]
+  Downgrade to guava-11.0.2. (This is necessary for Hadoop compatibility.
+  Later versions of Guava can also be used.)
+* Upgrade to spark-0.9.0. (Because this version of spark is available from
+  maven-central, we can make optiq-spark part of the regular build, and remove
+  the spark profile.)
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.18">0.4.18</a> / 2014-02-14
+{: #v0-4-18}
+
+API and functionality changes
+
+* Configurable lexical policy
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-33">CALCITE-33</a>]
+      SQL parser should allow different identifier quoting
+    * [<a href="https://issues.apache.org/jira/browse/CALCITE-34">CALCITE-34</a>]
+      Policy for case-sensitivity of identifiers should be configurable
+    * New connect-string parameter "lex", with allowable values
+      "ORACLE", "MYSQL", "SQL_SERVER", "JAVA" sets policy to be like those
+      databases, in terms of quote string, whether quoted and unquoted
+      identifiers are converted to upper/lower case, and whether
+      identifiers are matched case-sensitively. "JAVA" is case-sensitive,
+      even for unquoted identifiers. It should be possible
+      for each connection to have its own settings for these. Objects
+      shared between sessions (views, materialized views) might
+      require more work.
+    * Added various internals to make it easy for developers to do the
+      right thing. When you need to look up a schema, table or
+      column/field name, you should use a catalog reader, and it will
+      apply the right case-sensitivity policy.
+    * Enable optiq consumer to utilize different lexical settings in
+      Frameworks/Planner. (Jacques Nadeau)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-135">CALCITE-115</a>]
+  Add a PARSE_TREE hook point with SqlNode parameter
+* Change planner rules to use `ProjectFactory` for creating
+  projects. (John Pullokkaran)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-131">CALCITE-131</a>]
+  Add interfaces for metadata (statistics)
+  (**This is a breaking change**.)
+* Update Avatica to allow `Cursor` & `Accessor` implementations to throw
+  `SQLException`. (Jacques Nadeau)
+* Separate cost model (`RelOptCostFactory`) from planner. Allow
+  `VolcanoPlanner` to be sub-classed with different cost factory.
+    * Remove references to VolcanoCost from RelSubset, so clients can
+      use a different `RelOptCost`. (Harish Butani)
+    * Make `VolcanoCost` immutable.
+* Break `SqlTypeStrategies` into `OperandTypes`, `ReturnTypes` and
+  `InferTypes`, and rename its static members to upper-case, per
+  checkstyle. (**This is a breaking change**.)
+* Add a mechanism for defining configuration parameters and have them
+  appear in the responses to `AvaticaDatabaseMetaData` methods.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-113">CALCITE-113</a>]
+  User-defined scalar functions
+* Add rules to short-cut a query if `LIMIT 0` is present. Also remove
+  sort, aggregation, join if their inputs are known to be empty, and
+  propagate the fact that the relational expressions are known to be
+  empty up the tree. (We already do this for union, filter, project.)
+* `RexNode` and its sub-classes are now immutable.
+
+Bug-fixes and internal changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-61">CALCITE-16</a>]
+  Upgrade to janino-2.7
+* Upgrade to guava-15.0 (guava-14.0.1 still allowed), sqlline-1.1.7,
+  maven-surefire-plugin-2.16, linq4j-0.1.13.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-136">CALCITE-136</a>]
+  Support Hive dialect
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-138">CALCITE-138</a>]
+  SqlDataTypeSpec.clone handles collection types wrong
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-137">CALCITE-137</a>]
+  If a subset is created that is subsumed by an existing subset, its
+  'best' is not assigned
+    * If best rel in a Volcano subset doesn't have metadata, see if
+      other rels have metadata.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-127">CALCITE-127</a>]
+  EnumerableCalcRel can't support 3+ AND conditions (Harish Butani)
+* Fix push-down of datetime literals to JDBC data sources.
+* Add `Util.startsWith(List, List)` and `Util.hashCode(double)`.
+* Add maven-checkstyle-plugin, enable in "verify" phase, and fix exceptions.
+* Fix `SqlValidator` to rely on `RelDataType` to do field name matching.  Fix
+  `RelDataTypeImpl` to correctly use the case sensitive flag rather than
+  ignoring it.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-119">CALCITE-119</a>]
+  Comparing Java type long with SQL type INTEGER gives wrong answer
+* Enable multi-threaded testing, and fix race conditions.
+    * Two of the race conditions involved involving trait caches. The
+      other was indeterminacy in type system when precision was not
+      specified but had a default; now we canonize TIME to TIME(0), for
+      instance.
+* Convert files to `us-ascii`.
+* Work around
+  [<a href="http://jira.codehaus.org/browse/JANINO-169">JANINO-169</a>].
+* Refactor SQL validator testing infrastructure so SQL parser is
+  configurable.
+* Add `optiq-mat-plugin` to README.
+* Fix the check for duplicate subsets in a rule match.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-112">CALCITE-112</a>]
+  Java boolean column should be treated as SQL boolean
+* Fix escaped unicode characters above 0x8000. Add tests for unicode
+  strings.
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.17">0.4.17</a> / 2014-01-13
+{: #v0-4-17}
+
+API changes
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-106">CALCITE-106</a>]
+  Make `Schema` and `Table` SPIs simpler to implement, and make them
+  re-usable across connections
+  (**This is a breaking change**.)
+* Make it easier to define sub-classes of rule operands. The new class
+  `RelOptRuleOperandChildren` contains the children of an operand and
+  the policy for dealing with them. Existing rules now use the new
+  methods to construct operands: `operand()`, `leaf()`, `any()`, `none()`,
+  `unordered()`. The previous methods are now deprecated and will be
+  removed before 0.4.18. (**This is a breaking change**.)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-101">CALCITE-101</a>]
+  Enable phased access to the Optiq engine
+* List-handling methods in `Util`: add methods `skipLast`, `last`, `skip`;
+  remove `subList`, `butLast`.
+* Convert `SqlIdentifier.names` from `String[]` to `ImmutableList<String>`.
+* Rename `OptiqAssert.assertThat()` to `that()`, to avoid clash with junit's
+  `Assert.assertThat()`.
+* Usability improvements for `RelDataTypeFactory.FieldInfoBuilder`. It
+  now has a type-factory, so you can just call `build()`.
+* Rework `HepProgramBuilder` into a fluent API.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-105">CALCITE-105</a>]
+  Externalize RelNode to and from JSON
+
+Tuning
+
+* If `EnumerableAggregateRel` has no aggregate functions, generate a
+   call to `Enumerable.distinct()`, thereby saving the effort of
+   building trivial accumulators.
+* Default rule set now does not introduce `CalcRel` until a later phase
+  of planning. This reduces the number of trivial projects and calcs
+  created, merged, and elimated.
+* Reduce the amount of time spent creating record types that
+  already exist.
+* More efficient implementation of `Util.isDistinct` for small lists.
+* When an internal record has 0 fields, rather than generating a
+  synthetic class and lots of instances that are all the same, use the
+  new `Unit` class, which is a singleton.
+* To take advantage of asymmetric hash join added recently in linq4j,
+  tweak cost of `EnumerableJoinRel` so that join is cheaper if the
+  larger input is on the left, and more expensive if it is a cartesian
+  product.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-70">CALCITE-70</a>]
+  Joins seem to be very expensive in memory
+* Make planning process more efficient by not sorting the list of
+  matched rules each cycle. It is sorted if tracing is enabled;
+  otherwise we scan to find the most important element. For this list,
+  replace `LinkedList` with `ChunkList`, which has an O(1) remove and add,
+  a fast O(n) get, and fast scan.
+
+Other
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-87">CALCITE-87</a>]
+  Constant folding
+  * Rules for constant-expression reduction, and to simplify/eliminate
+    `VALUES` operator.
+* Graph algorithms: Implement breadth-first iterator and cycle-detector.
+* Fix bug in planner which occurred when two `RelNode`s have identical
+  digest but different row-type.
+* Fix link to optiq-csv tutorial.
+* Fix bugs in `RemoveTrivialProjectRule.strip`, `JdbcProjectRel.implement`
+  and `SortRel.computeSelfCost`.
+* Reformat code, and remove `@author` tags.
+* Upgrade to eigenbase-xom-1.3.4, eigenbase-properties-1.1.4,
+  eigenbase-resgen-1.3.6.
+* Upgrade to linq4j-0.1.12.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-97">CALCITE-97</a>]
+  Correlated EXISTS
+* Fix a bug in `VolcanoCost`.
+* Add class `FoodMartQuerySet`, that contains the 6,700 foodmart queries.
+* Fix factory class names in `UnregisteredDriver`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-96">CALCITE-96</a>]
+  LIMIT against a table in a clone schema causes UnsupportedOperationException
+* Disable spark module by default.
+* Allow `CloneSchema` to be specified in terms of url, driver, user,
+  password; not just dataSource.
+* Wrap internal error in `SQLException`.
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.16">0.4.16</a> / 2013-11-24
+{: #v0-4-16}
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-69">CALCITE-69</a>]
+  Can't join on string columns and other problems with expressions in the join
+  condition
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-74">CALCITE-74</a>]
+  JOIN ... USING fails in 3-way join with UnsupportedOperationException.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-65">CALCITE-65</a>]
+  Fix issues in the JDBC driver, and in particular to DatabaseMetaData methods,
+  to make Squirrel-SQL run better.
+* Fix JDBC column, table, schema names for when the table is not in a schema of
+  depth 1.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-85">CALCITE-85</a>]
+  Adding a table to the root schema causes breakage in OptiqPrepareImpl
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-84">CALCITE-84</a>]
+  Extract Optiq's JDBC driver as a new JDBC driver framework, Avatica.
+  Other projects can use this to implement a JDBC driver by implementing
+  just a few methods. If you wish to use Optiq's JDBC driver, you will
+  now need to include optiq-avatica.jar in addition to optiq-core.jar.
+  Avatica does not depend on anything besides the standard Java library.
+* Support for parameters in PreparedStatement.
+* First steps in recognizing complex materializations. Internally we introduce a
+  concept called a "star table", virtual table composed of real tables joined
+  together via many-to-one relationships. The queries that define
+  materializations and end-user queries are canonized in terms of star tables.
+  Matching (not done yet) will then be a matter of looking for sort, groupBy,
+  project. It is not yet possible to define a star in an Optiq model file.
+* Add section to <a href="howto.md">HOWTO</a> on implementing adapters.
+* Fix data type conversions when creating a clone table in memory.
+* Fix how strings are escaped in JsonBuilder.
+* Test suite now depends on an embedded hsqldb database, so you can run
+  <code>mvn test</code> right after pulling from git. You can instead use a
+  MySQL database if you specify '-Dcalcite.test.db=mysql', but you need to
+  manually populate it.
+* Fix a planner issue which occurs when the left and right children of join are
+  the same relational expression, caused by a self-join query.
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-76">CALCITE-76</a>]
+  Precedence of the item operator, <code>map[index]</code>; remove the space
+  before '[' when converting parse tree to string.
+* Allow <code>CAST(expression AS ANY)</code>, and fix an issue with the ANY type
+  and NULL values.
+* Handle null timestamps and dates coming out of JDBC adapter.
+* Add <code>jdbcDriver</code> attribute to JDBC schema in model, for drivers
+  that do not auto-register.
+* Allow join rules to match any subclass of JoinRelBase.
+* Push projects, filters and sorts down to MongoDB. (Fixes
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-57">CALCITE-57</a>],
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-60">CALCITE-60</a>] and
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-72">CALCITE-72</a>].)
+* Add instructions for loading FoodMart data set into MongoDB, and how to enable
+  tracing.
+* Now runs on JDK 1.8 (still runs on JDK 1.6 and JDK 1.7).
+* Upgrade to junit-4.11 (avoiding the dodgy junit-4.1.12).
+* Upgrade to linq4j-0.1.11.
+
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.15">0.4.15</a> / 2013-10-14
+{: #v0-4-15}
+
+* Lots of good stuff that this margin is too small to contain. See
+  <a href="reference.md">SQL language reference</a> and
+  <a href="model.md">JSON model reference</a>.
+
+# Optiq-csv release history
+
+Optiq-csv-0.3 was the last independent release of optiq-csv. From
+calcite-0.9.2 onwards, the code was included as the
+calcite-example-csv module.
+
+* Upgrade to calcite-0.9.1
+* Support gzip-compressed CSV and JSON files (recognized by '.gz' suffix)
+* Cleanup, and fix minor timezone issue in a test
+* Support for date types (date, time, timestamp) (Martijn van den Broek)
+* Upgrade to optiq-0.8, optiq-avatica-0.8, linq4j-0.4
+* Add support for JSON files (recognized by '.json' suffix)
+* Upgrade maven-release-plugin to version 2.4.2
+* Upgrade to optiq-0.6, linq4j-0.2
+* Add NOTICE and LICENSE files in generated JAR file
+
+## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.3">0.3</a> / 2014-03-21
+{: #csv-v0-3}
+
+* Upgrade to optiq-0.5
+* Add workaround to
+  [<a href="https://github.com/jline/jline2/issues/62">JLINE2-62</a>]
+  to `sqlline.bat` (windows) and `sqlline` (windows using cygwin)
+* Fix classpath construction: `sqlline.bat` copies dependencies to
+  `target/dependencies`; `sqlline` constructs `target/classpath.txt`
+* Build, checkstyle and tests now succeed on windows (both native and cygwin)
+* Models can now contain comments
+* [<a href="https://github.com/julianhyde/optiq-csv/issues/2">OPTIQ-CSV-2</a>]
+  Update tutorial to reflect changes to Optiq's JDBC adapter
+
+## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.2">0.2</a> / 2014-02-18
+{: #csv-v0-2}
+
+* Add test case for
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-112">CALCITE-112</a>]
+* Add `sqlline.bat`, Windows SQL shell (based on fix for
+  [<a href="https://issues.apache.org/jira/browse/DRILL-338">DRILL-338</a>])
+* Upgrade to optiq-0.4.18, sqlline-1.1.7
+* Return a single object for single-col enumerator (Gabriel Reid)
+* Enable maven-checkstyle-plugin; fix checkstyle exceptions
+
+## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.1">0.1</a> / 2014-01-13
+{: #csv-v0-1}
+
+* Add release notes and history
+* Enable maven-release-plugin
+* Upgrade to optiq-0.4.17, linq4j-0.1.12, sqlline-1.1.6
+* Upgrade tutorial for new Schema and Table SPIs
+* Fixes for optiq SPI changes in
+  [<a href="https://issues.apache.org/jira/browse/CALCITE-106">CALCITE-106</a>]
+* Enable oraclejdk8 in Travis CI
+* Fix bug where non-existent directory would give NPE; instead print warning
+* Add an example of a planner rule
+* Add `CsvTableFactory`, an example of a custom table
+* Add a view to tutorial
+* Split into scenario with a "simple" schema that generates tables
+  (`CsvTable`) that just execute and a "smart" schema that generates
+  tables (`CsvSmartTable`) that undergo optimization
+* Make `CsvEnumerator` a top-level class
+* Implement the algorithms to sniff names and types from the first
+  row, and to return an enumerator of all rows
+* Read column types from header of CSV file
+
+# Linq4j release history
+
+Linq4j-0.4 was the last independent release of linq4j. From
+calcite-0.9.2 onwards, the code was included as calcite-linq4j, and
+features added to linq4j in a particular calcite release are described
+with the other changes in that release.
+
+## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.4">0.4</a> / 2014-05-28
+{: #linq4j-v0-4}
+
+* Fix <a href="https://github.com/julianhyde/linq4j/issues/27">#27</a>,
+  "Incorrectly inlines non-final variable".
+* Maven build process now deploys web site.
+* Implement `Enumerable` methods: `any`, `all`,
+  `contains` with `EqualityComparer`, `first`, `first` with predicate.
+
+## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.3">0.3</a> / 2014-04-21
+{: #linq4j-v0-3}
+
+* Move optimizer visitor from optiq to linq4j; add
+  `ExpressionType.modifiesLvalue` to avoid invalid inlining.
+* Fix <a href="https://github.com/julianhyde/linq4j/issues/17">#17</a>,
+  "Assign constant expressions to 'static final' members";
+  add `@Deterministic` annotation to help deduce which expressions are
+  constant.
+* Multi-pass optimization: some of the variables might be avoided and
+  inlined after the first pass.
+* Various other peephole optimizations: `Boolean.valueOf(const)`,
+  'not' expressions (`!const`, `!!a`, `!(a==b)`, `!(a!=b)`, `!(a>b)`,
+  etc.),
+  '?' expressions coming from `CASE` (`a ? booleanConstant : b` and `a
+  ? b : booleanConstant`).
+* Implement left, right and full outer join.
+* Clean build on cygwin/Windows.
+
+## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.2">0.2</a> / 2014-04-11
+{: #linq4j-v0-2}
+
+* Fix <a href="https://github.com/julianhyde

<TRUNCATED>


[15/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/howto.md
----------------------------------------------------------------------
diff --git a/doc/howto.md b/doc/howto.md
deleted file mode 100644
index 96c9d71..0000000
--- a/doc/howto.md
+++ /dev/null
@@ -1,803 +0,0 @@
-<!--
-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.
--->
-# Calcite HOWTO
-
-Here's some miscellaneous documentation about using Calcite and its various
-adapters.
-
-## Building from a source distribution
-
-Prerequisites are maven (3.2.1 or later)
-and Java (JDK 1.7 or later, 1.8 preferred) on your path.
-
-Unpack the source distribution `.tar.gz` or `.zip` file,
-`cd` to the root directory of the unpacked source,
-then build using maven:
-
-```bash
-$ tar xvfz calcite-1.3.0-incubating-source.tar.gz
-$ cd calcite-1.3.0-incubating
-$ mvn install
-```
-
-[Running tests](howto.md#running-tests) describes how to run more or fewer
-tests.
-
-## Building from git
-
-Prerequisites are git, maven (3.2.1 or later)
-and Java (JDK 1.7 or later, 1.8 preferred) on your path.
-
-Create a local copy of the github repository,
-`cd` to its root directory,
-then build using maven:
-
-```bash
-$ git clone git://github.com/apache/incubator-calcite.git
-$ cd incubator-calcite
-$ mvn install
-```
-
-[Running tests](howto.md#running-tests) describes how to run more or fewer
-tests.
-
-## Running tests
-
-The test suite will run by default when you build, unless you specify
-`-DskipTests`:
-
-```bash
-$ mvn clean # Note: mvn clean install does not work, use mvn clean && mvn install
-$ mvn -DskipTests install
-```
-
-There are other options that control which tests are run, and in what
-environment, as follows.
-
-* `-Dcalcite.test.db=DB` (where db is `h2`, `hsqldb`, `mysql`, or `postgresql`) allows you
-  to change the JDBC data source for the test suite. Calcite's test
-  suite requires a JDBC data source populated with the foodmart data
-  set.
-   * `hsqldb`, the default, uses an in-memory hsqldb database.
-   * all others access test virtual machine (see [integration tests](howto.md#running-integration-tests) below)
-     `mysql` and `postgresql` might be somewhat faster than hsqldb, but you need to populate it (i.e. provision a VM).
-* `-Dcalcite.debug` prints extra debugging information to stdout.
-* `-Dcalcite.test.slow` enables tests that take longer to execute. For
-  example, there are tests that create virtual TPC-H and TPC-DS schemas
-  in-memory and run tests from those benchmarks.
-* `-Dcalcite.test.splunk=true` enables tests that run against Splunk.
-  Splunk must be installed and running.
-
-## Running integration tests
-
-For testing Calcite's external adapters, a test virtual machine should be used.
-The VM includes H2, HSQLDB, MySQL, MongoDB, and PostgreSQL.
-
-Test VM requires 5GiB of disk space and it takes 30 minutes to build.
-
-Note: you can use [calcite-test-dataset](https://github.com/vlsi/calcite-test-dataset)
- to populate your own database, however it is recommended to use test VM so the test environment can be reproduced.
-
-### VM preparation
-
-0) Install dependencies: [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-
-1) Clone https://github.com/vlsi/calcite-test-dataset.git at the same level as calcite repository.
-For instance:
-```bash
-code
-  +-- calcite
-  +-- calcite-test-dataset
-```
-
-Note: integration tests search for ../calcite-test-dataset or ../../calcite-test-dataset.
- You can specify full path via calcite.test.dataset system property.
-
-2) Build and start the VM:
-```bash
-cd calcite-test-dataset && mvn install
-```
-
-### VM management
-
-Test VM is provisioned by Vagrant, so regular Vagrant `vagrant up` and `vagrant halt` should be used to start and stop the VM.
-The connection strings for different databases are listed in [calcite-test-dataset](https://github.com/vlsi/calcite-test-dataset) readme.
-
-### Suggested test flow
-
-Note: test VM should be started before you launch integration tests. Calcite itself does not start/stop the VM.
-
-Command line:
-* Executing regular unit tests (does not require external data): no change. `mvn test` or `mvn install`.
-* Executing all tests, for all the DBs: `mvn verify -Pit`. `it` stands for "integration-test". `mvn install -Pit` works as well.
-* Executing just tests for external DBs, excluding unit tests: `mvn -Dtest=foo -DfailIfNoTests=false -Pit verify`
-* Executing just MongoDB tests: `cd mongo; mvn verify -Pit`
-
-From within IDE:
-* Executing regular unit tests: no change.
-* Executing MongoDB tests: run `MongoAdapterIT.java` as usual (no additional properties are required)
-* Executing MySQL tests: run `JdbcTest` and `JdbcAdapterTest` with setting `-Dcalcite.test.db=mysql`
-* Executing PostgreSQL tests: run `JdbcTest` and `JdbcAdapterTest` with setting `-Dcalcite.test.db=postgresql`
-
-### Integration tests technical details
-
-Tests with external data are executed at maven's integration-test phase.
-We do not currently use pre-integration-test/post-integration-test, however we could use that in future.
-The verification of build pass/failure is performed at verify phase.
-Integration tests should be named `...IT.java`, so they are not picked up on unit test execution.
-
-## Contributing
-
-We welcome contributions.
-
-If you are planning to make a large contribution, talk to us first! It
-helps to agree on the general approach. Log a
-[JIRA case](https://issues.apache.org/jira/browse/CALCITE) for your
-proposed feature or start a discussion on the dev list.
-
-Fork the github repository, and create a branch for your feature.
-
-Develop your feature and test cases, and make sure that `mvn
-install` succeeds. (Run extra tests if your change warrants it.)
-
-Commit your change to your branch, and use a comment that starts with
-the JIRA case number, like this:
-
-```
-[CALCITE-345] AssertionError in RexToLixTranslator comparing to date literal
-```
-
-If your change had multiple commits, use `git rebase -i master` to
-combine them into a single commit, and to bring your code up to date
-with the latest on the main line.
-
-Then push your commit(s) to github, and create a pull request from
-your branch to the incubator-calcite master branch. Update the JIRA case
-to reference your pull request, and a committer will review your
-changes.
-
-## Getting started
-
-Calcite is a community, so the first step to joining the project is to introduce yourself.
-Join the [developers list](http://mail-archives.apache.org/mod_mbox/incubator-calcite-dev/)
-and send an email.
-
-If you have the chance to attend a [meetup](http://www.meetup.com/Apache-Calcite/),
-or meet [members of the community](http://calcite.incubator.apache.org/team-list.html)
-at a conference, that's also great.
-
-Choose an initial task to work on. It should be something really simple,
-such as a bug fix or a [Jira task that we have labeled
-"newbie"](https://issues.apache.org/jira/issues/?jql=labels%20%3D%20newbie%20%26%20project%20%3D%20Calcite%20%26%20status%20%3D%20Open).
-Follow the [contributing guidelines](#contributing) to get your change committed.
-
-After you have made several useful contributions we may
-[invite you to become a committer](https://community.apache.org/contributors/).
-We value all contributions that help to build a vibrant community, not just code.
-You can contribute by testing the code, helping verify a release,
-writing documentation or the web site,
-or just by answering questions on the list.
-
-## Tracing
-
-To enable tracing, add the following flags to the java command line:
-
-```
--Dcalcite.debug=true -Djava.util.logging.config.file=core/src/test/resources/logging.properties
-```
-
-The first flag causes Calcite to print the Java code it generates
-(to execute queries) to stdout. It is especially useful if you are debugging
-mysterious problems like this:
-
-```
-Exception in thread "main" java.lang.ClassCastException: Integer cannot be cast to Long
-  at Baz$1$1.current(Unknown Source)
-```
-
-The second flag specifies a config file for
-the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
-framework. Put the following into core/src/test/resources/logging.properties:
-
-```properties
-handlers= java.util.logging.ConsoleHandler
-.level= INFO
-org.apache.calcite.plan.RelOptPlanner.level=FINER
-java.util.logging.ConsoleHandler.level=ALL
-```
-
-The line `org.apache.calcite.plan.RelOptPlanner.level=FINER` tells the planner to produce
-fairly verbose output. You can modify the file to enable other loggers, or to change levels.
-For instance, if you change `FINER` to `FINEST` the planner will give you an account of the
-planning process so detailed that it might fill up your hard drive.
-
-## CSV adapter
-
-See the <a href="tutorial.md">tutorial</a>.
-
-## MongoDB adapter
-
-First, download and install Calcite,
-and <a href="http://www.mongodb.org/downloads">install MongoDB</a>.
-
-Note: you can use MongoDB from integration test virtual machine above.
-
-Import MongoDB's zipcode data set into MongoDB:
-
-```bash
-$ curl -o /tmp/zips.json http://media.mongodb.org/zips.json
-$ mongoimport --db test --collection zips --file /tmp/zips.json
-Tue Jun  4 16:24:14.190 check 9 29470
-Tue Jun  4 16:24:14.469 imported 29470 objects
-```
-
-Log into MongoDB to check it's there:
-
-```bash
-$ mongo
-MongoDB shell version: 2.4.3
-connecting to: test
-> db.zips.find().limit(3)
-{ "city" : "ACMAR", "loc" : [ -86.51557, 33.584132 ], "pop" : 6055, "state" : "AL", "_id" : "35004" }
-{ "city" : "ADAMSVILLE", "loc" : [ -86.959727, 33.588437 ], "pop" : 10616, "state" : "AL", "_id" : "35005" }
-{ "city" : "ADGER", "loc" : [ -87.167455, 33.434277 ], "pop" : 3205, "state" : "AL", "_id" : "35006" }
-> exit
-bye
-```
-
-Connect using the
-<a href="https://github.com/apache/incubator-calcite/blob/master/mongodb/src/test/resources/mongo-zips-model.json">mongo-zips-model.json</a>
-Calcite model:
-```bash
-$ ./sqlline
-sqlline> !connect jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json admin admin
-Connecting to jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json
-Connected to: Calcite (version 1.x.x)
-Driver: Calcite JDBC Driver (version 1.x.x)
-Autocommit status: true
-Transaction isolation: TRANSACTION_REPEATABLE_READ
-sqlline> !tables
-+------------+--------------+-----------------+---------------+
-| TABLE_CAT  | TABLE_SCHEM  |   TABLE_NAME    |  TABLE_TYPE   |
-+------------+--------------+-----------------+---------------+
-| null       | mongo_raw    | zips            | TABLE         |
-| null       | mongo_raw    | system.indexes  | TABLE         |
-| null       | mongo        | ZIPS            | VIEW          |
-| null       | metadata     | COLUMNS         | SYSTEM_TABLE  |
-| null       | metadata     | TABLES          | SYSTEM_TABLE  |
-+------------+--------------+-----------------+---------------+
-sqlline> select count(*) from zips;
-+---------+
-| EXPR$0  |
-+---------+
-| 29467   |
-+---------+
-1 row selected (0.746 seconds)
-sqlline> !quit
-Closing: org.apache.calcite.jdbc.FactoryJdbc41$CalciteConnectionJdbc41
-$
-```
-
-## Splunk adapter
-
-To run the test suite and sample queries against Splunk,
-load Splunk's `tutorialdata.zip` data set as described in
-<a href="http://docs.splunk.com/Documentation/Splunk/6.0.2/PivotTutorial/GetthetutorialdataintoSplunk">the Splunk tutorial</a>.
-
-(This step is optional, but it provides some interesting data for the sample
-queries. It is also necessary if you intend to run the test suite, using
-`-Dcalcite.test.splunk=true`.)
-
-## Implementing an adapter
-
-New adapters can be created by implementing `CalcitePrepare.Context`:
-
-```java
-import org.apache.calcite.adapter.java.JavaTypeFactory;
-import org.apache.calcite.jdbc.CalcitePrepare;
-import org.apache.calcite.jdbc.CalciteRootSchema;
-
-public class AdapterContext implements CalcitePrepare.Context {
-  @Override
-  public JavaTypeFactory getTypeFactory() {
-    // adapter implementation
-    return typeFactory;
-  }
-
-  @Override
-  public CalciteRootSchema getRootSchema() {
-    // adapter implementation
-    return rootSchema;
-  }
-}
-```
-
-### Testing adapter in Java
-
-The example below shows how SQL query can be submitted to
-`CalcitePrepare` with a custom context (`AdapterContext` in this
-case). Calcite prepares and implements the query execution, using the
-resources provided by the `Context`. `CalcitePrepare.PrepareResult`
-provides access to the underlying enumerable and methods for
-enumeration. The enumerable itself can naturally be some adapter
-specific implementation.
-
-```java
-import org.apache.calcite.jdbc.CalcitePrepare;
-import org.apache.calcite.prepare.CalcitePrepareImpl;
-import org.junit.Test;
-
-public class AdapterContextTest {
-  @Test
-  public void testSelectAllFromTable() {
-    AdapterContext ctx = new AdapterContext();
-    String sql = "SELECT * FROM TABLENAME";
-    Class elementType = Object[].class;
-    CalcitePrepare.PrepareResult<Object> prepared =
-        new CalcitePrepareImpl().prepareSql(ctx, sql, null, elementType, -1);
-    Object enumerable = prepared.getExecutable();
-    // etc.
-  }
-}
-```
-
-### JavaTypeFactory
-
-When Calcite compares types (instances of `RelDataType`), it requires them to be the same
-object. If there are two distinct type instances that refer to the
-same Java type, Calcite may fail to recognize that they match.  It is
-recommended to:
-* Use a single instance of `JavaTypeFactory` within the calcite context;
-* Store the types so that the same object is always returned for the same type.
-
-## Set up PGP signing keys (for Calcite committers)
-
-Follow instructions at http://www.apache.org/dev/release-signing to
-create a key pair. (On Mac OS X, I did `brew install gpg` and `gpg
---gen-key`.)
-
-Add your public key to the `KEYS` file by following instructions in
-the `KEYS` file.
-
-## Making a snapshot (for Calcite committers)
-
-Before you start:
-* Set up signing keys as described above.
-* Make sure you are using JDK 1.7 (not 1.8).
-* Make sure build and tests succeed with `-Dcalcite.test.db=hsqldb` (the default)
-
-```bash
-# Set passphrase variable without putting it into shell history
-read -s GPG_PASSPHRASE
-
-# Make sure that there are no junk files in the sandbox
-git clean -xn
-mvn clean
-
-mvn -Papache-release -Dgpg.passphrase=${GPG_PASSPHRASE} install
-```
-
-When the dry-run has succeeded, change `install` to `deploy`.
-
-## Making a release (for Calcite committers)
-
-Before you start:
-* Set up signing keys as described above.
-* Make sure you are using JDK 1.7 (not 1.8).
-* Check that `README`, `README.md` and `doc/howto.md` have the correct version number.
-* Set `version.major` and `version.minor` in `pom.xml`.
-* Make sure build and tests succeed, including with
-  -Dcalcite.test.db={mysql,hsqldb}, -Dcalcite.test.slow=true,
-  -Dcalcite.test.mongodb=true, -Dcalcite.test.splunk=true.
-* Trigger a
-  <a href="https://scan.coverity.com/projects/2966">Coverity scan</a>
-  by merging the latest code into the `julianhyde/coverity_scan` branch,
-  and when it completes, make sure that there are no important issues.
-* Make sure that
-  <a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20CALCITE%20AND%20status%20%3D%20Resolved%20and%20fixVersion%20is%20null">
-  every "resolved" JIRA case</a> (including duplicates) has
-  a fix version assigned (most likely the version we are
-  just about to release)
-
-Create a release branch named after the release, e.g. `branch-1.1`, and push it to Apache.
-
-```bash
-$ git checkout -b branch-X.Y
-$ git push -u origin branch-X.Y
-```
-
-We will use the branch for the entire the release process. Meanwhile,
-we do not allow commits to the master branch. After the release is
-final, we can use `git merge --ff-only` to append the changes on the
-release branch onto the master branch. (Apache does not allow reverts
-to the master branch, which makes it difficult to clean up the kind of
-messy commits that inevitably happen while you are trying to finalize
-a release.)
-
-Now, set up your environment and do a dry run. The dry run will not
-commit any changes back to git and gives you the opportunity to verify
-that the release process will complete as expected.
-
-If any of the steps fail, clean up (see below), fix the problem, and
-start again from the top.
-
-```bash
-# Set passphrase variable without putting it into shell history
-read -s GPG_PASSPHRASE
-
-# Make sure that there are no junk files in the sandbox
-git clean -xn
-mvn clean
-
-# Do a dry run of the release:prepare step, which sets version numbers.
-mvn -DdryRun=true -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare-dry.log
-```
-
-Check the artifacts:
-* In the `target` directory should be these 8 files, among others:
-  * apache-calcite-X.Y.Z-incubating-src.tar.gz
-  * apache-calcite-X.Y.Z-incubating-src.tar.gz.asc
-  * apache-calcite-X.Y.Z-incubating-src.tar.gz.md5
-  * apache-calcite-X.Y.Z-incubating-src.tar.gz.sha1
-  * apache-calcite-X.Y.Z-incubating-src.zip
-  * apache-calcite-X.Y.Z-incubating-src.zip.asc
-  * apache-calcite-X.Y.Z-incubating-src.zip.md5
-  * apache-calcite-X.Y.Z-incubating-src.zip.sha1
-* Note that the file names start `apache-calcite-` and include
-  `incubating` in the version.
-* In the two source distros `.tar.gz` and `.zip` (currently there is
-  no binary distro), check that all files belong to a directory called
-  `apache-calcite-X.Y.Z-incubating-src`.
-* That directory must contain files `DISCLAIMER`, `NOTICE`, `LICENSE`,
-  `README`, `README.md`
-  * Check that the version in `README` is correct
-* In each .jar (for example
-  `core/target/calcite-core-X.Y.Z-incubating.jar` and
-  `mongodb/target/calcite-mongodb-X.Y.Z-incubating-sources.jar`), check
-  that the `META-INF` directory contains `DEPENDENCIES`, `LICENSE`,
-  `NOTICE` and `git.properties`
-* In each .jar, check that `org-apache-calcite-jdbc.properties` is
-  present and does not contain un-substituted `${...}` variables
-* Check PGP, per https://httpd.apache.org/dev/verification.html
-
-Now, remove the `-DdryRun` flag and run the release for real.
-
-```bash
-# Prepare sets the version numbers, creates a tag, and pushes it to git.
-mvn -DdryRun=false -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare.log
-
-# Perform checks out the tagged version, builds, and deploys to the staging repository
-mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:perform 2>&1 | tee /tmp/perform.log
-```
-
-Verify the staged artifacts in the Nexus repository:
-* Go to https://repository.apache.org/
-* Under `Build Promotion`, click `Staging Repositories`
-* In the `Staging Repositories` tab there should be a line with profile `org.apache.calcite`
-* Navigate through the artifact tree and make sure the .jar, .pom, .asc files are present
-* Check the box on in the first column of the row,
-  and press the 'Close' button to publish the repository at
-  https://repository.apache.org/content/repositories/orgapachecalcite-1000
-  (or a similar URL)
-
-Upload the artifacts via subversion to a staging area,
-https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN:
-
-```bash
-# Create a subversion workspace, if you haven't already
-mkdir -p ~/dist/dev
-pushd ~/dist/dev
-svn co https://dist.apache.org/repos/dist/dev/incubator/calcite
-popd
-
-# Move the files into a directory
-cd target
-mkdir ~/dist/dev/calcite/apache-calcite-X.Y.Z-incubating-rcN
-mv apache-calcite-* ~/dist/dev/calcite/apache-calcite-X.Y.Z-incubating-rcN
-
-# Check in
-cd ~/dist/dev/calcite
-svn add apache-calcite-X.Y.Z-incubating-rcN
-svn ci
-```
-
-## Cleaning up after a failed release attempt (for Calcite committers)
-
-```
-# Make sure that the tag you are about to generate does not already
-# exist (due to a failed release attempt)
-git tag
-
-# If the tag exists, delete it locally and remotely
-git tag -d apache-calcite-X.Y.Z-incubating
-git push origin :refs/tags/apache-calcite-X.Y.Z-incubating
-
-# Remove modified files
-mvn release:clean
-
-# Check whether there are modified files and if so, go back to the
-# original git commit
-git status
-git reset --hard HEAD
-```
-
-## Validate a release
-
-```bash
-# Check that the signing key (e.g. 2AD3FAE3) is pushed
-gpg --recv-keys key
-
-# Check keys
-curl -O https://dist.apache.org/repos/dist/release/incubator/calcite/KEYS
-
-# Sign/check md5 and sha1 hashes
-# (Assumes your O/S has 'md5' and 'sha1' commands.)
-function checkHash() {
-  cd "$1"
-  for i in *.{zip,pom,gz}; do
-    if [ ! -f $i ]; then
-      continue
-    fi
-    if [ -f $i.md5 ]; then
-      if [ "$(cat $i.md5)" = "$(md5 -q $i)" ]; then
-        echo $i.md5 present and correct
-      else
-        echo $i.md5 does not match
-      fi
-    else
-      md5 -q $i > $i.md5
-      echo $i.md5 created
-    fi
-    if [ -f $i.sha1 ]; then
-      if [ "$(cat $i.sha1)" = "$(sha1 -q $i)" ]; then
-        echo $i.sha1 present and correct
-      else
-        echo $i.sha1 does not match
-      fi
-    else
-      sha1 -q $i > $i.sha1
-      echo $i.sha1 created
-    fi
-  done
-}
-checkHash apache-calcite-X.Y.Z-incubating-rcN
-```
-
-## Get approval for a release via Apache voting process (for Calcite committers)
-
-Release vote on dev list
-
-```
-To: dev@calcite.incubator.apache.org
-Subject: [VOTE] Release apache-calcite-X.Y.Z-incubating (release candidate N)
-
-Hi all,
-
-I have created a build for Apache Calcite X.Y.Z-incubating, release candidate N.
-
-Thanks to everyone who has contributed to this release.
-<Further details about release.> You can read the release notes here:
-https://github.com/apache/incubator-calcite/blob/XXXX/doc/history.md
-
-The commit to be voted upon:
-http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/NNNNNN
-
-Its hash is XXXX.
-
-The artifacts to be voted on are located here:
-https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN/
-
-The hashes of the artifacts are as follows:
-src.tar.gz.md5 XXXX
-src.tar.gz.sha1 XXXX
-src.zip.md5 XXXX
-src.zip.sha1 XXXX
-
-A staged Maven repository is available for review at:
-https://repository.apache.org/content/repositories/orgapachecalcite-NNNN
-
-Release artifacts are signed with the following key:
-https://people.apache.org/keys/committer/jhyde.asc
-
-Please vote on releasing this package as Apache Calcite X.Y.Z-incubating.
-
-The vote is open for the next 72 hours and passes if a majority of
-at least three +1 PPMC votes are cast.
-
-[ ] +1 Release this package as Apache Calcite X.Y.Z-incubating
-[ ]  0 I don't feel strongly about it, but I'm okay with the release
-[ ] -1 Do not release this package because...
-
-
-Here is my vote:
-
-+1 (binding)
-
-Julian
-```
-
-After vote finishes, send out the result:
-
-```
-Subject: [RESULT] [VOTE] Release apache-calcite-X.Y.Z-incubating (release candidate N)
-To: dev@calcite.incubator.apache.org
-
-Thanks to everyone who has tested the release candidate and given
-their comments and votes.
-
-The tally is as follows.
-
-N binding +1s:
-<names>
-
-N non-binding +1s:
-<names>
-
-No 0s or -1s.
-
-Therefore I am delighted to announce that the proposal to release
-Apache Calcite X.Y.Z-incubating has passed.
-
-I'll now start a vote on the general list. Those of you in the IPMC,
-please recast your vote on the new thread.
-
-Julian
-```
-
-Use the [Apache URL shortener](http://s.apache.org) to generate
-shortened URLs for the vote proposal and result emails. Examples:
-[s.apache.org/calcite-1.2-vote](http://s.apache.org/calcite-1.2-vote) and
-[s.apache.org/calcite-1.2-result](http://s.apache.org/calcite-1.2-result).
-
-Propose a vote on the incubator list.
-
-```
-To: general@incubator.apache.org
-Subject: [VOTE] Release Apache Calcite X.Y.Z (incubating)
-
-Hi all,
-
-The Calcite community has voted on and approved a proposal to release
-Apache Calcite X.Y.Z (incubating).
-
-Proposal:
-http://s.apache.org/calcite-X.Y.Z-vote
-
-Vote result:
-N binding +1 votes
-N non-binding +1 votes
-No -1 votes
-http://s.apache.org/calcite-X.Y.Z-result
-
-The commit to be voted upon:
-http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/NNNNNN
-
-Its hash is XXXX.
-
-The artifacts to be voted on are located here:
-https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN/
-
-The hashes of the artifacts are as follows:
-src.tar.gz.md5 XXXX
-src.tar.gz.sha1 XXXX
-src.zip.md5 XXXX
-src.zip.sha1 XXXX
-
-A staged Maven repository is available for review at:
-https://repository.apache.org/content/repositories/orgapachecalcite-NNNN
-
-Release artifacts are signed with the following key:
-https://people.apache.org/keys/committer/jhyde.asc
-
-Pursuant to the Releases section of the Incubation Policy and with
-the endorsement of NNN of our mentors we would now like to request
-the permission of the Incubator PMC to publish the release. The vote
-is open for 72 hours, or until the necessary number of votes (3 +1)
-is reached.
-
-[ ] +1 Release this package as Apache Calcite X.Y.Z incubating
-[ ] -1 Do not release this package because...
-
-Julian Hyde, on behalf of Apache Calcite PPMC
-```
-
-After vote finishes, send out the result:
-
-```
-To: general@incubator.apache.org
-Subject: [RESULT] [VOTE] Release Apache Calcite X.Y.Z (incubating)
-
-This vote passes with N +1s and no 0 or -1 votes:
-+1 <name> (mentor)
-
-There was some feedback during voting. I shall open a separate
-thread to discuss.
-
-Thanks everyone. We’ll now roll the release out to the mirrors.
-
-Julian
-```
-
-## Publishing a release (for Calcite committers)
-
-After a successful release vote, we need to push the release
-out to mirrors, and other tasks.
-
-In JIRA, search for all issues resolved in this release,
-and do a bulk update changing their status to "Closed",
-with a change comment
-"Resolved in release X.Y.Z-incubating (YYYY-MM-DD)"
-(fill in release number and date appropriately).
-
-Promote the staged nexus artifacts.
-* Go to https://repository.apache.org/
-* Under "Build Promotion" click "Staging Repositories"
-* In the line with "orgapachecalcite-xxxx", check the box
-* Press "Release" button
-
-Check the artifacts into svn.
-
-```bash
-# Get the release candidate.
-mkdir -p ~/dist/dev
-cd ~/dist/dev
-svn co https://dist.apache.org/repos/dist/dev/incubator/calcite
-
-# Copy the artifacts. Note that the copy does not have '-rcN' suffix.
-mkdir -p ~/dist/release
-cd ~/dist/release
-svn co https://dist.apache.org/repos/dist/release/incubator/calcite
-cd calcite
-cp -rp ../../dev/calcite/apache-calcite-X.Y.Z-incubating-rcN apache-calcite-X.Y.Z-incubating
-svn add apache-calcite-X.Y.Z-incubating
-
-# Check in.
-svn ci
-```
-
-Svnpubsub will publish to
-https://dist.apache.org/repos/dist/release/incubator/calcite and propagate to
-http://www.apache.org/dyn/closer.cgi/incubator/calcite within 24 hours.
-
-## Publishing the web site (for Calcite committers)
-
-Get the code:
-
-```bash
-$ svn co https://svn.apache.org/repos/asf/incubator/calcite/site calcite-site
-```
-
-(Note: `https:`, not `http:`.)
-
-Build the site:
-
-```bash
-$ cd calcite-site
-$ ./build.sh
-```
-
-It will prompt you to install jekyll, redcarpet and pygments, if you
-do not have them installed. It will also check out the git source code
-repo, so that it can generate javadoc.
-
-Check in:
-
-```bash
-svn ci -m"Commit message" file...
-```
-
-The site will automatically be deployed as http://calcite.incubator.apache.org.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/lattice.md
----------------------------------------------------------------------
diff --git a/doc/lattice.md b/doc/lattice.md
deleted file mode 100644
index d7d4642..0000000
--- a/doc/lattice.md
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-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.
--->
-# Lattice
-
-A lattice is a framework for creating and populating materialized views,
-and for recognizing that a materialized view can be used to solve a
-particular query.
-
-A lattice represents a star (or snowflake) schema, not a general
-schema. In particular, all relationships must be many-to-one, heading
-from a fact table at the center of the star.
-
-The name derives from the mathematics: a
-<a href="http://en.wikipedia.org/wiki/Lattice_(order)">lattice</a>
-is a
-<a href="http://en.wikipedia.org/wiki/Partially_ordered_set">partially
-ordered set</a> where any two elements have a unique greatest lower
-bound and least upper bound.
-
-[<a href="#user-content-ref-hru96">HRU96</a>] observed that the set of possible
-materializations of a data cube forms a lattice, and presented an
-algorithm to choose a good set of materializations. Calcite's
-recommendation algorithm is derived from this.
-
-The lattice definition uses a SQL statement to represent the star. SQL
-is a useful short-hand to represent several tables joined together,
-and assigning aliases to the column names (it more convenient than
-inventing a new language to represent relationships, join conditions
-and cardinalities).
-
-Unlike regular SQL, order is important. If you put A before B in the
-FROM clause, and make a join between A and B, you are saying that
-there is a many-to-one foreign key relationship from A to B. (E.g. in
-the example lattice, the Sales fact table occurs before the Time
-dimension table, and before the Product dimension table. The Product
-dimension table occurs before the ProductClass outer dimension table,
-further down an arm of a snowflake.)
-
-A lattice implies constraints. In the A to B relationship, there is a
-foreign key on A (i.e. every value of A's foreign key has a
-corresponding value in B's key), and a unique key on B (i.e. no key
-value occurs more than once). These constraints are really important,
-because it allows the planner to remove joins to tables whose columns
-are not being used, and know that the query results will not change.
-
-Calcite does not check these constraints. If they are violated,
-Calcite will return wrong results.
-
-A lattice is a big, virtual join view. It is not materialized (it
-would be several times larger than the star schema, because of
-denormalization) and you probably wouldn't want to query it (far too
-many columns). So what is it useful for? As we said above, (a) the
-lattice declares some very useful primary and foreign key constraints,
-(b) it helps the query planner map user queries onto
-filter-join-aggregate materialized views (the most useful kind of
-materialized view for DW queries), (c) gives Calcite a framework
-within which to gather stats about data volumes and user queries, (d)
-allows Calcite to automatically design and populate materialized
-views.
-
-Most star schema models force you to choose whether a column is a
-dimension or a measure. In a lattice, every column is a dimension
-column. (That is, it can become one of the columns in the GROUP BY clause
-to query the star schema at a particular dimensionality). Any column
-can also be used in a measure; you define measures by giving the
-column and an aggregate function.
-
-If "unit_sales" tends to be used much more often as a measure rather
-than a dimension, that's fine. Calcite's algorithm should notice that
-it is rarely aggregated, and not be inclined to create tiles that
-aggregate on it. (By "should" I mean "could and one day will". The
-algorithm does not currently take query history into account when
-designing tiles.)
-
-But someone might want to know whether orders with fewer than 5 items
-were more or less profitable than orders with more than 100. All of a
-sudden, "unit_sales" has become a dimension. If there's virtually zero
-cost to declaring a column a dimension column, I figured let's make
-them all dimension columns.
-
-The model allows for a particular table to be used more than once,
-with a different table alias. You could use this to model say
-OrderDate and ShipDate, with two uses to the Time dimension table.
-
-Most SQL systems require that the column names in a view are unique.
-This is hard to achieve in a lattice, because you often include
-primary and foreign key columns in a join. So Calcite lets you refer
-to columns in two ways. If the column is unique, you can use its name,
-["unit_sales"]. Whether or not it is unique in the lattice, it will be
-unique in its table, so you can use it qualified by its table alias.
-Examples:
-* ["sales", "unit_sales"]
-* ["ship_date", "time_id"]
-* ["order_date", "time_id"]
-
-A "tile" is a materialized table in a lattice, with a particular
-dimensionality. (What Kylin calls a "cuboid".) The "tiles" attribute
-of the <a href="model.json#lattice">lattice JSON element</a>
-defines an initial set of tiles to materialize.
-
-If you run the algorithm, you can omit the tiles attribute. Calcite
-will choose an initial set. If you include the tiles attribute, the
-algorithm will start with that list and then start finding other tiles
-that are complementary (i.e. "fill in the gaps" left by the initial
-tiles).
-
-### References
-
-* <a name="ref-hru96">[HRU96]</a> V. Harinarayan, A. Rajaraman and J. Ullman.
-  <a href="http://web.eecs.umich.edu/~jag/eecs584/papers/implementing_data_cube.pdf">Implementing
-  data cubes efficiently</a>. In _Proc. ACM SIGMOD Conf._, Montreal, 1996.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/model.md
----------------------------------------------------------------------
diff --git a/doc/model.md b/doc/model.md
deleted file mode 100644
index 3f49159..0000000
--- a/doc/model.md
+++ /dev/null
@@ -1,435 +0,0 @@
-<!--
-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.
--->
-# Calcite JSON model reference
-
-## Elements
-
-### Root
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'mongo',
-  schemas: [ Schema... ]
-}
-```
-
-`version` (required string) must have value `1.0`.
-
-`defaultSchema` (optional string). If specified, it is
-the name (case-sensitive) of a schema defined in this model, and will
-become the default schema for connections to Calcite that use this model.
-
-`schemas` (optional list of <a href="#schema">Schema</a> elements).
-
-### Schema
-
-Occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  path: ['lib'],
-  cache: true,
-  materializations: [ Materialization... ]
-}
-```
-
-`name` (required string) is the name of the schema.
-
-`type` (optional string, default `map`) indicates sub-type. Values are:
-* `map` for <a href="#map-schema">Map Schema</a>
-* `custom` for <a href="#custom-schema">Custom Schema</a>
-* `jdbc` for <a href="#jdbc-schema">JDBC Schema</a>
-
-`path` (optional list) is the SQL path that is used to
-resolve functions used in this schema. If specified it must be a list,
-and each element of the list must be either a string or a list of
-strings. For example,
-
-```json
-  path: [ ['usr', 'lib'], 'lib' ]
-```
-
-declares a path with two elements: the schema '/usr/lib' and the
-schema '/lib'. Most schemas are at the top level, so you can use a
-string.
-
-`materializations` (optional list of
-<a href="#materialization">Materialization</a>) defines the tables
-in this schema that are materializations of queries.
-
-`cache` (optional boolean, default true) tells Calcite whether to
-cache metadata (tables, functions and sub-schemas) generated
-by this schema.
-
-* If `false`, Calcite will go back to the schema each time it needs
-  metadata, for example, each time it needs a list of tables in order to
-  validate a query against the schema.
-
-* If `true`, Calcite will cache the metadata the first time it reads
-  it. This can lead to better performance, especially if name-matching is
-  case-insensitive.
-
-However, it also leads to the problem of cache staleness.
-A particular schema implementation can override the
-`Schema.contentsHaveChangedSince` method to tell Calcite
-when it should consider its cache to be out of date.
-
-Tables, functions and sub-schemas explicitly created in a schema are
-not affected by this caching mechanism. They always appear in the schema
-immediately, and are never flushed.
-
-### Map Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  type: 'map',
-  tables: [ Table... ],
-  functions: [ Function... ]
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from
-<a href="#schema">Schema</a>.
-
-`tables` (optional list of <a href="#table">Table</a> elements)
-defines the tables in this schema.
-
-`functions` (optional list of <a href="#function">Function</a> elements)
-defines the functions in this schema.
-
-### Custom Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'mongo',
-  type: 'custom',
-  factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
-  operand: {
-    host: 'localhost',
-    database: 'test'
-  }
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from
-<a href="#schema">Schema</a>.
-
-`factory` (required string) is the name of the factory class for this
-schema. Must implement interface `org.apache.calcite.schema.SchemaFactory`
-and have a public default constructor.
-
-`operand` (optional map) contains attributes to be passed to the
-factory.
-
-### JDBC Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  type: 'jdbc',
-  jdbcDriver: TODO,
-  jdbcUrl: TODO,
-  jdbcUser: TODO,
-  jdbcPassword: TODO,
-  jdbcCatalog: TODO,
-  jdbcSchema: TODO
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from
-<a href="#schema">Schema</a>.
-
-`jdbcDriver` (optional string) is the name of the JDBC driver class. It not
-specified, uses whichever class the JDBC DriverManager chooses.
-
-`jdbcUrl` (optional string) is the JDBC connect string, for example
-"jdbc:mysql://localhost/foodmart".
-
-`jdbcUser` (optional string) is the JDBC user name.
-
-`jdbcPassword` (optional string) is the JDBC password.
-
-`jdbcCatalog` (optional string) is the name of the initial catalog in the JDBC
-data source.
-
-`jdbcSchema` (optional string) is the name of the initial schema in the JDBC
-data source.
-
-### Materialization
-
-Occurs within `root.schemas.materializations`.
-
-```json
-{
-  view: 'V',
-  table: 'T',
-  sql: 'select deptno, count(*) as c, sum(sal) as s from emp group by deptno'
-}
-```
-
-`view` (optional string) TODO
-
-`table` (optional string) TODO
-
-`sql` (optional string, or list of strings that will be concatenated as a
- multi-line string) is the SQL definition of the materialization.
-
-### Table
-
-Occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'sales_fact',
-  columns: [ Column... ]
-}
-```
-
-`name` (required string) is the name of this table. Must be unique within the schema.
-
-`type` (optional string, default `custom`) indicates sub-type. Values are:
-* `custom` for <a href="#custom-table">Custom Table</a>
-* `view` for <a href="#view">View</a>
-
-`columns` (optional list of <a href="#column">Column</a> elements)
-
-### View
-
-Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'female_emps',
-  type: 'view',
-  sql: "select * from emps where gender = 'F'",
-  modifiable: true
-}
-```
-
-`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
-
-`sql` (required string, or list of strings that will be concatenated as a
- multi-line string) is the SQL definition of the view.
-
-`path` (optional list) is the SQL path to resolve the query. If not
-specified, defaults to the current schema.
-
-`modifiable` (optional boolean) is whether the view is modifiable.
-If null or not specified, Calcite deduces whether the view is modifiable.
-
-A view is modifiable if contains only SELECT, FROM, WHERE (no JOIN, aggregation
-or sub-queries) and every column:
-* is specified once in the SELECT clause; or
-* occurs in the WHERE clause with a `column = literal` predicate; or
-* is nullable.
-
-The second clause allows Calcite to automatically provide the correct value for
-hidden columns. It is useful in multi-tenant environments, where the `tenantId`
-column is hidden, mandatory (NOT NULL), and has a constant value for a
-particular view.
-
-Errors regarding modifiable views:
-* If a view is marked `modifiable: true` and is not modifiable, Calcite throws
-  an error while reading the schema.
-* If you submit an INSERT, UPDATE or UPSERT command to a non-modifiable view,
-  Calcite throws an error when validating the statement.
-* If a DML statement creates a row that would not appear in the view
-  (for example, a row in `female_emps`, above, with `gender = 'M'`),
-  Calcite throws an error when executing the statement.
-
-### Custom Table
-
-Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'female_emps',
-  type: 'custom',
-  factory: 'TODO',
-  operand: {
-    todo: 'TODO'
-  }
-}
-```
-
-`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
-
-`factory` (required string) is the name of the factory class for this
-table. Must implement interface `org.apache.calcite.schema.TableFactory`
-and have a public default constructor.
-
-`operand` (optional map) contains attributes to be passed to the
-factory.
-
-### Column
-
-Occurs within `root.schemas.tables.columns`.
-
-```json
-{
-  name: 'empno'
-}
-```
-
-`name` (required string) is the name of this column.
-
-### Function
-
-Occurs within `root.schemas.functions`.
-
-```json
-{
-  name: 'MY_PLUS',
-  className: 'com.example.functions.MyPlusFunction',
-  methodName: 'apply',
-  path: []
-}
-```
-
-`name` (required string) is the name of this function.
-
-`className` (required string) is the name of the class that implements this
-function.
-
-`methodName` (optional string) is the name of the method that implements this
-function.
-
-`path` (optional list of string) is the path for resolving this function.
-
-### Lattice
-
-Occurs within `root.schemas.lattices`.
-
-```json
-{
-  name: 'star',
-  sql: [
-    'select 1 from "foodmart"."sales_fact_1997" as "s"',
-    'join "foodmart"."product" as "p" using ("product_id")',
-    'join "foodmart"."time_by_day" as "t" using ("time_id")',
-    'join "foodmart"."product_class" as "pc" on "p"."product_class_id" = "pc"."product_class_id"'
-  ],
-  auto: false,
-  algorithm: true,
-  algorithmMaxMillis: 10000,
-  rowCountEstimate: 86837,
-  defaultMeasures: [ {
-    agg: 'count'
-  } ],
-  tiles: [ {
-    dimensions: [ 'the_year', ['t', 'quarter'] ],
-    measures: [ {
-      agg: 'sum',
-      args: 'unit_sales'
-    }, {
-      agg: 'sum',
-      args: 'store_sales'
-    }, {
-      agg: 'count'
-    } ]
-  } ]
-}
-```
-
-`name` (required string) is the name of this lattice.
-
-`sql` (required string, or list of strings that will be concatenated as a
-multi-line string) is the SQL statement that defines the fact table, dimension
-tables, and join paths for this lattice.
-
-`auto` (optional boolean, default true) is whether to materialize tiles on need
-as queries are executed.
-
-`algorithm` (optional boolean, default false) is whether to use an optimization
-algorithm to suggest and populate an initial set of tiles.
-
-`algorithmMaxMillis` (optional long, default -1, meaning no limit) is the
-maximum number of milliseconds for which to run the algorithm. After this point,
-takes the best result the algorithm has come up with so far.
-
-`rowCountEstimate` (optional double, default 1000.0) estimated number of rows in
-the star
-
-`tiles` (optional list of <a href="#tile">Tile</a> elements) is a list of
-materialized aggregates to create up front.
-
-`defaultMeasures`  (optional list of <a href="#measure">Measure</a> elements)
-is a list of measures that a tile should have by default.
-Any tile defined in `tiles` can still define its own measures, including
-measures not on this list. If not specified, the default list of measures is
-just 'count(*)':
-
-```json
-[ { name: 'count' } ]
-```
-
-See also: <a href="lattice.md">Lattices</a>.
-
-### Tile
-
-Occurs within `root.schemas.lattices.tiles`.
-
-```json
-{
-  dimensions: [ 'the_year', ['t', 'quarter'] ],
-  measures: [ {
-    agg: 'sum',
-    args: 'unit_sales'
-  }, {
-    agg: 'sum',
-    args: 'store_sales'
-  }, {
-    agg: 'count'
-  } ]
-}
-```
-
-`dimensions` is a list of dimensions (columns from the star), like a `GROUP BY`
-clause. Each element is either a string (the unique label of the column within
-the star) or a string list (a column name qualified by a table name).
-
-`measures` (optional list of <a href="#measure">Measure</a> elements) is a list
-of aggregate functions applied to arguments. If not specified, uses the
-lattice's default measure list.
-
-### Measure
-
-Occurs within `root.schemas.lattices.defaultMeasures`
-and `root.schemas.lattices.tiles.measures`.
-
-```json
-{
-  agg: 'sum',
-  args: [ 'unit_sales' ]
-}
-```
-
-`agg` is the name of an aggregate function (usually 'count', 'sum', 'min',
-'max').
-
-`args` (optional) is a column label (string), or list of zero or more columns.
-If a list, each element is either a string (the unique label of the column
-within the star) or a string list (a column name qualified by a table name).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/reference.md
----------------------------------------------------------------------
diff --git a/doc/reference.md b/doc/reference.md
deleted file mode 100644
index 03f66e3..0000000
--- a/doc/reference.md
+++ /dev/null
@@ -1,569 +0,0 @@
-<!--
-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.
--->
-# Calcite SQL language reference
-
-## SQL constructs
-
-```SQL
-statement:
-      setStatement
-  |   explain
-  |   insert
-  |   update
-  |   merge
-  |   delete
-  |   query
-
-setStatement:
-      ALTER ( SYSTEM | SESSION ) SET identifier = expression
-
-explain:
-      EXPLAIN PLAN
-      [ WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION ]
-      [ EXCLUDING ATTRIBUTES | INCLUDING [ ALL ] ATTRIBUTES ]
-      FOR ( insert | update | merge | delete | query )
-
-insert:
-      ( INSERT | UPSERT ) INTO tablePrimary
-      [ '(' column [, column ]* ')' ]
-      query
-
-update:
-      UPDATE tablePrimary
-      SET assign [, assign ]*
-      [ WHERE booleanExpression ]
-
-assign:
-      identifier '=' expression
-
-merge:
-      MERGE INTO tablePrimary [ [ AS ] alias ]
-      USING tablePrimary
-      ON booleanExpression
-      [ WHEN MATCHED THEN UPDATE SET assign [, assign ]* ]
-      [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ]
-
-delete:
-      DELETE FROM tablePrimary [ [ AS ] alias ]
-      [ WHERE booleanExpression ]
-
-query:
-      [ WITH withItem [ , withItem ]* query ]
-  |   {
-          select
-      |   query UNION [ ALL ] query
-      |   query EXCEPT query
-      |   query INTERSECT query
-      }
-      [ ORDER BY orderItem [, orderItem ]* ]
-      [ LIMIT { count | ALL } ]
-      [ OFFSET start { ROW | ROWS } ]
-      [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ]
-
-withItem:
-      name
-      [ '(' column [, column ]* ')' ]
-      AS '(' query ')'
-
-orderItem:
-      expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
-
-select:
-      SELECT [ STREAM ] [ ALL | DISTINCT ]
-          { * | projectItem [, projectItem ]* }
-      FROM tableExpression
-      [ WHERE booleanExpression ]
-      [ GROUP BY { groupItem [, groupItem ]* } ]
-      [ HAVING booleanExpression ]
-      [ WINDOW windowName AS windowSpec [, windowName AS windowSpec ]* ]
-
-projectItem:
-      expression [ [ AS ] columnAlias ]
-  |   tableAlias . *
-
-tableExpression:
-      tableReference [, tableReference ]*
-  |   tableExpression [ NATURAL ] [ LEFT | RIGHT | FULL ] JOIN tableExpression [ joinCondition ]
-
-joinCondition:
-      ON booleanExpression
-  |   USING '(' column [, column ]* ')'
-
-tableReference:
-      [ LATERAL ]
-      tablePrimary
-      [ [ AS ] alias [ '(' columnAlias [, columnAlias ]* ')' ] ]
-
-tablePrimary:
-      [ TABLE ] [ [ catalogName . ] schemaName . ] tableName
-  |   '(' query ')'
-  |   values
-  |   UNNEST '(' expression ')'
-  |   '(' TABLE expression ')'
-
-values:
-      VALUES expression [, expression ]*
-
-groupItem:
-      expression
-  |   '(' ')'
-  |   '(' expression [, expression ]* ')'
-  |   CUBE '(' expression [, expression ]* ')'
-  |   ROLLUP '(' expression [, expression ]* ')'
-  |   GROUPING SETS '(' groupItem [, groupItem ]* ')'
-
-windowRef:
-      windowName
-  |   windowSpec
-
-windowSpec:
-      [ windowName ]
-      '('
-      [ ORDER BY orderItem [, orderItem ]* ]
-      [ PARTITION BY expression [, expression ]* ]
-      [
-          RANGE numericOrIntervalExpression { PRECEDING | FOLLOWING }
-      |   ROWS numericExpression { PRECEDING | FOLLOWING }
-      ]
-      ')'
-```
-
-In *merge*, at least one of the WHEN MATCHED and WHEN NOT MATCHED clauses must
-be present.
-
-In *orderItem*, if *expression* is a positive integer *n*, it denotes
-the <em>n</em>th item in the SELECT clause.
-
-An aggregate query is a query that contains a GROUP BY or a HAVING
-clause, or aggregate functions in the SELECT clause. In the SELECT,
-HAVING and ORDER BY clauses of an aggregate query, all expressions
-must be constant within the current group (that is, grouping constants
-as defined by the GROUP BY clause, or constants), or aggregate
-functions, or a combination of constants and aggregate
-functions. Aggregate and grouping functions may only appear in an
-aggregate query, and only in a SELECT, HAVING or ORDER BY clause.
-
-A scalar sub-query is a sub-query used as an expression. It can occur
-in most places where an expression can occur (such as the SELECT
-clause, WHERE clause, or as an argument to an aggregate
-function). If the sub-query returns no rows, the value is NULL; if it
-returns more than one row, it is an error.
-
-A sub-query can occur in the FROM clause of a query and also in IN
-and EXISTS expressions.  A sub-query that occurs in IN and
-EXISTS expressions may be correlated; that is, refer to tables in
-the FROM clause of an enclosing query.
-
-## Identifiers
-
-Identifiers are the names of tables, columns and other metadata
-elements used in a SQL query.
-
-Unquoted identifiers, such as emp, must start with a letter and can
-only contain letters, digits, and underscores. They are implicitly
-converted to upper case.
-
-Quoted identifiers, such as "Employee Name", start and end with
-double quotes.  They may contain virtually any character, including
-spaces and other punctuation.  If you wish to include a double quote
-in an identifier, use another double quote to escape it, like this:
-"An employee called ""Fred""."
-
-In Calcite, matching identifiers to the name of the referenced object is
-case-sensitive.  But remember that unquoted identifiers are implicitly
-converted to upper case before matching, and if the object it refers
-to was created using an unquoted identifier for its name, then its
-name will have been converted to upper case also.
-
-## Data types
-
-### Scalar types
-
-| Data type   | Description               | Range and examples   |
-| ----------- | ------------------------- | ---------------------|
-| BOOLEAN     | Logical values            | Values: TRUE, FALSE, UNKNOWN
-| TINYINT     | 1 byte signed integer     | Range is -255 to 256
-| SMALLINT    | 2 byte signed integer     | Range is -32768 to 32767
-| INTEGER, INT | 4 byte signed integer    | Range is -2147483648 to 2147483647
-| BIGINT      | 8 byte signed integer     | Range is -9223372036854775808 to 9223372036854775807
-| DECIMAL(p, s) | Fixed point             | Example: 123.45 is a DECIMAL(5, 2) value.
-| NUMERIC     | Fixed point               |
-| REAL, FLOAT | 4 byte floating point     | 6 decimal digits precision
-| DOUBLE      | 8 byte floating point     | 15 decimal digits precision
-| CHAR(n), CHARACTER(n) | Fixed-width character string | 'Hello', '' (empty string), _latin1'Hello', n'Hello', _UTF16'Hello', 'Hello' 'there' (literal split into multiple parts)
-| VARCHAR(n), CHARACTER VARYING(n) | Variable-length character string | As CHAR(n)
-| BINARY(n)   | Fixed-width binary string | x'45F0AB', x'' (empty binary string), x'AB' 'CD' (multi-part binary string literal)
-| VARBINARY(n), BINARY VARYING(n) | Variable-length binary string | As BINARY(n)
-| DATE        | Date                      | Example: DATE '1969-07-20'
-| TIME        | Time of day               | Example: TIME '20:17:40'
-| TIMESTAMP [ WITHOUT TIME ZONE ] | Date and time | Example: TIMESTAMP '1969-07-20 20:17:40'
-| TIMESTAMP WITH TIME ZONE | Date and time with time zone | Example: TIMESTAMP '1969-07-20 20:17:40 America/Los Angeles'
-| INTERVAL timeUnit [ TO timeUnit ] | Date time interval | Examples: INTERVAL '1:5' YEAR TO MONTH, INTERVAL '45' DAY
-| Anchored interval | Date time interval  | Example: (DATE '1969-07-20', DATE '1972-08-29')
-
-Where:
-```SQL
-timeUnit:
-  YEAR | MONTH | DAY | HOUR | MINUTE | SECOND
-```
-
-Note:
-* DATE, TIME and TIMESTAMP have no time zone. There is not even an implicit
-  time zone, such as UTC (as in Java) or the local time zone. It is left to
-  the user or application to supply a time zone.
-
-### Non-scalar types
-
-| Type     | Description
-| -------- | -----------------------------------------------------------
-| ANY      | A value of an unknown type
-| ROW      | Row with 1 or more columns
-| MAP      | Collection of keys mapped to values
-| MULTISET | Unordered collection that may contain duplicates
-| ARRAY    | Ordered, contiguous collection that may contain duplicates
-| CURSOR   | Cursor over the result of executing a query
-
-## Operators and functions
-
-### Comparison operators
-
-| Operator syntax                                   | Description
-| ------------------------------------------------- | -----------
-| value1 = value2                                   | Equals
-| value1 <> value2                                  | Not equal
-| value1 > value2                                   | Greater than
-| value1 >= value2                                  | Greater than or equal
-| value1 < value2                                   | Less than
-| value1 <= value2                                  | Less than or equal
-| value IS NULL                                     | Whether *value* is null
-| value IS NOT NULL                                 | Whether *value* is not null
-| value1 IS DISTINCT FROM value2                    | Whether two values are not equal, treating null values as the same
-| value1 IS NOT DISTINCT FROM value2                | Whether two values are equal, treating null values as the same
-| value1 BETWEEN value2 AND value3                  | Whether *value1* is greater than or equal to *value2* and less than or equal to *value3*
-| value1 NOT BETWEEN value2 AND value3              | Whether *value1* is less than *value2* or greater than *value3*
-| string1 LIKE string2 [ ESCAPE string3 ]           | Whether *string1* matches pattern *string2*
-| string1 NOT LIKE string2 [ ESCAPE string3 ]       | Whether *string1* does not match pattern *string2*
-| string1 SIMILAR TO string2 [ ESCAPE string3 ]     | Whether *string1* matches regular expression *string2*
-| string1 NOT SIMILAR TO string2 [ ESCAPE string3 ] | Whether *string1* does not match regular expression *string2*
-| value IN (value [, value]* )                      | Whether *value* is equal to a value in a list
-| value NOT IN (value [, value]* )                  | Whether *value* is not equal to every value in a list
-| value IN (sub-query)                              | Whether *value* is equal to a row returned by *sub-query*
-| value NOT IN (sub-query)                          | Whether *value* is not equal to every row returned by *sub-query*
-| EXISTS (sub-query)                                | Whether *sub-query* returns at least one row
-
-### Logical operators
-
-| Operator syntax        | Description
-| ---------------------- | -----------
-| boolean1 OR boolean2   | Whether *boolean1* is TRUE or *boolean2* is TRUE
-| boolean1 AND boolean2  | Whether *boolean1* and *boolean2* are both TRUE
-| NOT boolean            | Whether *boolean* is not TRUE; returns UNKNOWN if *boolean* is UNKNOWN
-| boolean IS FALSE       | Whether *boolean* is FALSE; returns FALSE if *boolean* is UNKNOWN
-| boolean IS NOT FALSE   | Whether *boolean* is not FALSE; returns TRUE if *boolean* is UNKNOWN
-| boolean IS TRUE        | Whether *boolean* is TRUE; returns FALSE if *boolean* is UNKNOWN
-| boolean IS NOT TRUE    | Whether *boolean* is not TRUE; returns TRUE if *boolean* is UNKNOWN
-| boolean IS UNKNOWN     | Whether *boolean* is UNKNOWN
-| boolean IS NOT UNKNOWN | Whether *boolean* is not UNKNOWN
-
-### Arithmetic operators and functions
-
-| Operator syntax           | Description
-| ------------------------- | -----------
-| + numeric                 | Returns *numeric*
-| - numeric                 | Returns negative *numeric*
-| numeric1 + numeric2       | Returns *numeric1* plus *numeric2*
-| numeric1 - numeric2       | Returns *numeric1* minus *numeric2*
-| numeric1 * numeric2       | Returns *numeric1* multiplied by *numeric2*
-| numeric1 / numeric2       | Returns *numeric1* divided by *numeric2*
-| POWER(numeric1, numeric2) | Returns *numeric1* raised to the power of *numeric2*
-| ABS(numeric)              | Returns the absolute value of *numeric*
-| MOD(numeric, numeric)     | Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
-| SQRT(numeric)             | Returns the square root of *numeric*
-| LN(numeric)               | Returns the natural logarithm (base *e*) of *numeric*
-| LOG10(numeric)            | Returns the base 10 logarithm of *numeric*
-| EXP(numeric)              | Returns *e* raised to the power of *numeric*
-| CEIL(numeric)             | Rounds *numeric* up, and returns the smallest number that is greater than or equal to *numeric*
-| FLOOR(numeric)            | Rounds *numeric* down, and returns the largest number that is less than or equal to *numeric*
-
-### Character string operators and functions
-
-| Operator syntax            | Description
-| -------------------------- | -----------
-| string &#124;&#124; string | Concatenates two character strings.
-| CHAR_LENGTH(string)        | Returns the number of characters in a character string
-| CHARACTER_LENGTH(string)   | As CHAR_LENGTH(*string*)
-| UPPER(string)              | Returns a character string converted to upper case
-| LOWER(string)              | Returns a character string converted to lower case
-| POSITION(string1 IN string2) | Returns the position of the first occurrence of *string1* in *string2*
-| TRIM( { BOTH ;&#124; LEADING ;&#124; TRAILING } string1 FROM string2) | Removes the longest string containing only the characters in *string1* from the start/end/both ends of *string1*
-| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a substring of *string1* with *string2*
-| SUBSTRING(string FROM integer)  | Returns a substring of a character string starting at a given point.
-| SUBSTRING(string FROM integer FOR integer) | Returns a substring of a character string starting at a given point with a given length.
-| INITCAP(string)            | Returns *string* with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.
-
-Not implemented:
-* SUBSTRING(string FROM regexp FOR regexp)
-
-### Binary string operators and functions
-
-| Operator syntax | Description
-| --------------- | -----------
-| binary &#124;&#124; binary | Concatenates two binary strings.
-| POSITION(binary1 IN binary2) | Returns the position of the first occurrence of *binary1* in *binary2*
-| OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ]) | Replaces a substring of *binary1* with *binary2*
-| SUBSTRING(binary FROM integer) | Returns a substring of *binary* starting at a given point
-| SUBSTRING(binary FROM integer FOR integer) | Returns a substring of *binary* starting at a given point with a given length
-
-### Date/time functions
-
-| Operator syntax           | Description
-| ------------------------- | -----------
-| LOCALTIME                 | Returns the current date and time in the session time zone in a value of datatype TIME
-| LOCALTIME(precision)      | Returns the current date and time in the session time zone in a value of datatype TIME, with *precision* digits of precision
-| LOCALTIMESTAMP            | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP
-| LOCALTIMESTAMP(precision) | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP, with *precision* digits of precision
-| CURRENT_TIME              | Returns the current time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
-| CURRENT_DATE              | Returns the current date in the session time zone, in a value of datatype DATE
-| CURRENT_TIMESTAMP         | Returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
-| EXTRACT(timeUnit FROM datetime) | Extracts and returns the value of a specified datetime field from a datetime value expression
-| FLOOR(datetime TO timeUnit) | Rounds *datetime* down to *timeUnit*
-| CEIL(datetime TO timeUnit) | Rounds *datetime* up to *timeUnit*
-
-Not implemented:
-* EXTRACT(timeUnit FROM interval)
-* CEIL(interval)
-* FLOOR(interval)
-* datetime - datetime timeUnit [ TO timeUnit ]
-* interval OVERLAPS interval
-* + interval
-* - interval
-* interval + interval
-* interval - interval
-* interval / interval
-* datetime + interval
-* datetime - interval
-
-### System functions
-
-| Operator syntax | Description
-| --------------- | -----------
-| USER            | Equivalent to CURRENT_USER
-| CURRENT_USER    | User name of current execution context
-| SESSION_USER    | Session user name
-| SYSTEM_USER     | Returns the name of the current data store user as identified by the operating system
-| CURRENT_PATH    | Returns a character string representing the current lookup scope for references to user-defined routines and types
-| CURRENT_ROLE    | Returns the current active role
-
-### Conditional functions and operators
-
-| Operator syntax | Description
-| --------------- | -----------
-| CASE value<br/>WHEN value1 [, value11 ]* THEN result1<br/>[ WHEN valueN [, valueN1 ]* THEN resultN ]*<br/>[ ELSE resultZ ]<br/> END | Simple case
-| CASE<br/>WHEN condition1 THEN result1<br/>[ WHEN conditionN THEN resultN ]*<br/>[ ELSE resultZ ]<br/>END | Searched case
-| NULLIF(value, value) | Returns NULL if the values are the same. For example, <code>NULLIF(5, 5)</code> returns NULL; <code>NULLIF(5, 0)</code> returns 5.
-| COALESCE(value, value [, value]* ) | Provides a value if the first value is null. For example, <code>COALESCE(NULL, 5)</code> returns 5.
-
-### Type conversion
-
-| Operator syntax | Description
-| --------------- | -----------
-| CAST(value AS type) | Converts a value to a given type.
-
-### Value constructors
-
-| Operator syntax | Description
-| --------------- | -----------
-| ROW (value [, value]* ) | Creates a row from a list of values.
-| (value [, value]* )     | Creates a row from a list of values.
-| map [ key ]     | Returns the element of a map with a particular key.
-| array [ index ] | Returns the element at a particular location in an array.
-| ARRAY [ value [, value ]* ] | Creates an array from a list of values.
-| MAP [ key, value [, key, value ]* ] | Creates a map from a list of key-value pairs.
-
-### Collection functions
-
-| Operator syntax | Description
-| --------------- | -----------
-| ELEMENT(value)  | Returns the sole element of a array or multiset; null if the collection is empty; throws if it has more than one element.
-| CARDINALITY(value) | Returns the number of elements in an array or multiset.
-
-See also: UNNEST relational operator converts a collection to a relation.
-
-### JDBC function escape
-
-#### Numeric
-
-| Operator syntax                | Description
-| ------------------------------ | -----------
-| {fn LOG10(numeric)}            | Returns the base-10 logarithm of *numeric*
-| {fn POWER(numeric1, numeric2)} | Returns *numeric1* raised to the power of *numeric2*
-
-Not implemented:
-* {fn ABS(numeric)} - Returns the absolute value of *numeric*
-* {fn ACOS(numeric)} - Returns the arc cosine of *numeric*
-* {fn ASIN(numeric)} - Returns the arc sine of *numeric*
-* {fn ATAN(numeric)} - Returns the arc tangent of *numeric*
-* {fn ATAN2(numeric, numeric)}
-* {fn CEILING(numeric)} - Rounds *numeric* up, and returns the smallest number that is greater than or equal to *numeric*
-* {fn COS(numeric)} - Returns the cosine of *numeric*
-* {fn COT(numeric)}
-* {fn DEGREES(numeric)} - Converts *numeric* from radians to degrees
-* {fn EXP(numeric)} - Returns *e* raised to the power of *numeric*
-* {fn FLOOR(numeric)} - Rounds *numeric* down, and returns the largest number that is less than or equal to *numeric*
-* {fn LOG(numeric)} - Returns the natural logarithm (base *e*) of *numeric*
-* {fn MOD(numeric1, numeric2)} - Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
-* {fn PI()} - Returns a value that is closer than any other value to *pi*
-* {fn RADIANS(numeric)} - Converts *numeric* from degrees to radians
-* {fn RAND(numeric)}
-* {fn ROUND(numeric, numeric)}
-* {fn SIGN(numeric)}
-* {fn SIN(numeric)} - Returns the sine of *numeric*
-* {fn SQRT(numeric)} - Returns the square root of *numeric*
-* {fn TAN(numeric)} - Returns the tangent of *numeric*
-* {fn TRUNCATE(numeric, numeric)}
-
-#### String
-
-| Operator syntax | Description
-| --------------- | -----------
-| {fn LOCATE(string1, string2)} | Returns the position in *string2* of the first occurrence of *string1*. Searches from the beginning of the second CharacterExpression, unless the startIndex parameter is specified.
-| {fn INSERT(string1, start, length, string2)} | Inserts *string2* into a slot in *string1*
-| {fn LCASE(string)}            | Returns a string in which all alphabetic characters in *string* have been converted to lower case
-
-Not implemented:
-* {fn ASCII(string)} - Convert a single-character string to the corresponding ASCII code, an integer between 0 and 255
-* {fn CHAR(string)}
-* {fn CONCAT(character, character)} - Returns the concatenation of character strings
-* {fn DIFFERENCE(string, string)}
-* {fn LEFT(string, integer)}
-* {fn LENGTH(string)}
-* {fn LOCATE(string1, string2 [, integer])} - Returns the position in *string2* of the first occurrence of *string1*. Searches from the beginning of *string2*, unless *integer* is specified.
-* {fn LTRIM(string)}
-* {fn REPEAT(string, integer)}
-* {fn REPLACE(string, string, string)}
-* {fn RIGHT(string, integer)}
-* {fn RTRIM(string)}
-* {fn SOUNDEX(string)}
-* {fn SPACE(integer)}
-* {fn SUBSTRING(string, integer, integer)}
-* {fn UCASE(string)} - Returns a string in which all alphabetic characters in *string* have been converted to upper case
-
-#### Date/time
-
-Not implemented:
-* {fn CURDATE()}
-* {fn CURTIME()}
-* {fn DAYNAME(date)}
-* {fn DAYOFMONTH(date)}
-* {fn DAYOFWEEK(date)}
-* {fn DAYOFYEAR(date)}
-* {fn HOUR(time)}
-* {fn MINUTE(time)}
-* {fn MONTH(date)}
-* {fn MONTHNAME(date)}
-* {fn NOW()}
-* {fn QUARTER(date)}
-* {fn SECOND(time)}
-* {fn TIMESTAMPADD(interval, count, timestamp)}
-* {fn TIMESTAMPDIFF(interval, timestamp, timestamp)}
-* {fn WEEK(date)}
-* {fn YEAR(date)}
-
-#### System
-
-Not implemented:
-* {fn DATABASE()}
-* {fn IFNULL(value, value)}
-* {fn USER(value, value)}
-* {fn CONVERT(value, type)}
-
-### Aggregate functions
-
-Syntax:
-
-```SQL
-aggregateCall:
-        agg( [ DISTINCT ] value [, value]* ) [ FILTER ( WHERE condition ) ]
-    |   agg(*) [ FILTER ( WHERE condition ) ]
-```
-
-If `FILTER` is present, the aggregate function only considers rows for which
-*condition* evaluates to TRUE.
-
-If `DISTINCT` is present, duplicate argument values are eliminated before being
-passed to the aggregate function.
-
-| Operator syntax                    | Description
-| ---------------------------------- | -----------
-| COUNT( [ DISTINCT ] value [, value]* ) | Returns the number of input rows for which *value* is not null (wholly not null if *value* is composite)
-| COUNT(*)                           | Returns the number of input rows
-| AVG( [ DISTINCT ] numeric)         | Returns the average (arithmetic mean) of *numeric* across all input values
-| SUM( [ DISTINCT ] numeric)         | Returns the sum of *numeric* across all input values
-| MAX( [ DISTINCT ] value)           | Returns the maximum value of *value* across all input values
-| MIN( [ DISTINCT ] value)           | Returns the minimum value of *value* across all input values
-| STDDEV_POP( [ DISTINCT ] numeric)  | Returns the population standard deviation of *numeric* across all input values
-| STDDEV_SAMP( [ DISTINCT ] numeric) | Returns the sample standard deviation of *numeric* across all input values
-| VAR_POP( [ DISTINCT ] value)       | Returns the population variance (square of the population standard deviation) of *numeric* across all input values
-| VAR_SAMP( [ DISTINCT ] numeric)    | Returns the sample variance (square of the sample standard deviation) of *numeric* across all input values
-| COVAR_POP(numeric1, numeric2)      | Returns the population covariance of the pair (*numeric1*, *numeric2*) across all input values
-| COVAR_SAMP(numeric1, numeric2)     | Returns the sample covariance of the pair (*numeric1*, *numeric2*) across all input values
-| REGR_SXX(numeric1, numeric2)       | Returns the sum of squares of the dependent expression in a linear regression model
-| REGR_SYY(numeric1, numeric2)       | Returns the sum of squares of the independent expression in a linear regression model
-
-Not implemented:
-* REGR_AVGX(numeric1, numeric2)
-* REGR_AVGY(numeric1, numeric2)
-* REGR_COUNT(numeric1, numeric2)
-* REGR_INTERCEPT(numeric1, numeric2)
-* REGR_R2(numeric1, numeric2)
-* REGR_SLOPE(numeric1, numeric2)
-* REGR_SXY(numeric1, numeric2)
-
-### Window functions
-
-| Operator syntax                           | Description
-| ----------------------------------------- | -----------
-| COUNT(value [, value ]* ) OVER window     | Returns the number of rows in *window* for which *value* is not null (wholly not null if *value* is composite)
-| COUNT(*) OVER window                      | Returns the number of rows in *window*
-| AVG(numeric) OVER window                  | Returns the average (arithmetic mean) of *numeric* across all values in *window*
-| SUM(numeric) OVER window                  | Returns the sum of *numeric* across all values in *window*
-| MAX(value) OVER window                    | Returns the maximum value of *value* across all values in *window*
-| MIN(value) OVER window                    | Returns the minimum value of *value* across all values in *window*
-| RANK() OVER window                        | Returns the rank of the current row with gaps; same as ROW_NUMBER of its first peer
-| DENSE_RANK() OVER window                  | Returns the rank of the current row without gaps; this function counts peer groups
-| ROW_NUMBER() OVER window                  | Returns the number of the current row within its partition, counting from 1
-| FIRST_VALUE(value) OVER window            | Returns *value* evaluated at the row that is the first row of the window frame
-| LAST_VALUE(value) OVER window             | Returns *value* evaluated at the row that is the last row of the window frame
-| LEAD(value, offset, default) OVER window  | Returns *value* evaluated at the row that is *offset* rows after the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
-| LAG(value, offset, default) OVER window   | Returns *value* evaluated at the row that is *offset* rows before the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
-| NTILE(value) OVER window                  | Returns an integer ranging from 1 to *value*, dividing the partition as equally as possible
-
-Not implemented:
-* COUNT(DISTINCT value) OVER window
-* FIRST_VALUE(value) IGNORE NULLS OVER window
-* LAST_VALUE(value) IGNORE NULLS OVER window
-* PERCENT_RANK(value) OVER window
-* CUME_DIST(value) OVER window
-* NTH_VALUE(value, nth) OVER window
-
-### Grouping functions
-
-| Operator syntax      | Description
-| -------------------- | -----------
-| GROUPING(expression) | Returns 1 if expression is rolled up in the current row's grouping set, 0 otherwise
-| GROUP_ID()           | Returns an integer that uniquely identifies the combination of grouping keys
-| GROUPING_ID(expression [, expression ] * ) | Returns a bit vector of the given grouping expressions


[14/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/stream.md
----------------------------------------------------------------------
diff --git a/doc/stream.md b/doc/stream.md
deleted file mode 100644
index 4052ac1..0000000
--- a/doc/stream.md
+++ /dev/null
@@ -1,631 +0,0 @@
-<!--
-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.
--->
-# Calcite SQL extensions for streaming
-
-## Introduction
-
-Streams are collections to records that flow continuously, and forever.
-Unlike tables, they are not typically stored on disk, but flow over the
-network and are held for short periods of time in memory.
-
-Streams complement tables because they represent what is happening in the
-present and future of the enterprise whereas tables represent the past.
-It is very common for a stream to be archived into a table.
-
-Like tables, you often want to query streams in a high-level language
-based on relational algebra, validated according to a schema, and optimized
-to take advantage of available resources and algorithms.
-
-Calcite's SQL is an extension to standard SQL, not another 'SQL-like' language.
-The distinction is important, for several reasons:
-* Streaming SQL is easy to learn for anyone who knows regular SQL.
-* The semantics are clear, because we aim to produce the same results on a
-  stream as if the same data were in a table.
-* You can write queries that combine streams and tables (or the history of
-  a stream, which is basically an in-memory table).
-* Lots of existing tools can generate standard SQL.
-
-## An example schema
-
-Our streaming SQL examples use the following schema:
-* `Orders (rowtime, productId, orderId, units)` - a stream and a table
-* `Products (rowtime, productId, name)` - a table
-* `Shipments (rowtime, orderId)` - a stream
-
-## A simple query
-
-Let's start with the simplest streaming query:
-
-```sql
-SELECT STREAM *
-FROM Orders;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 10:17:00 |        30 |       5 |     4
- 10:17:05 |        10 |       6 |     1
- 10:18:05 |        20 |       7 |     2
- 10:18:07 |        30 |       8 |    20
- 11:02:00 |        10 |       9 |     6
- 11:04:00 |        10 |      10 |     1
- 11:09:30 |        40 |      11 |    12
- 11:24:11 |        10 |      12 |     4
-```
-
-This query reads all columns and rows from the `Orders` stream.
-Like any streaming query, it never terminates. It outputs a record whenever
-a record arrives in `Orders`.
-
-Type `Control-C` to terminate the query.
-
-The `STREAM` keyword is the main extension in streaming SQL. It tells the
-system that you are interested in incoming orders, not existing ones. The query
-
-```sql
-SELECT *
-FROM Orders;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 08:30:00 |        10 |       1 |     3
- 08:45:10 |        20 |       2 |     1
- 09:12:21 |        10 |       3 |    10
- 09:27:44 |        30 |       4 |     2
-
-4 records returned.
-```
-
-is also valid, but will print out all existing orders and then terminate. We
-call it a *relational* query, as opposed to *streaming*. It has traditional
-SQL semantics.
-
-`Orders` is special, in that it has both a stream and a table. If you try to run
-a streaming query on a table, or a relational query on a stream, Calcite gives
-an error:
-
-```sql
-> SELECT * FROM Shipments;
-ERROR: Cannot convert stream 'SHIPMENTS' to a table
-
-> SELECT STREAM * FROM Products;
-ERROR: Cannot convert table 'PRODUCTS' to a stream
-```
-
-# Filtering rows
-
-Just as in regular SQL, you use a `WHERE` clause to filter rows:
-
-```sql
-SELECT STREAM *
-FROM Orders
-WHERE units > 3;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 10:17:00 |        30 |       5 |     4
- 10:18:07 |        30 |       8 |    20
- 11:02:00 |        10 |       9 |     6
- 11:09:30 |        40 |      11 |    12
- 11:24:11 |        10 |      12 |     4
-```
-
-# Projecting expressions
-
-Use expressions in the `SELECT` clause to choose which columns to return or
-compute expressions:
-
-```sql
-SELECT STREAM rowtime,
-  'An order for ' || units || ' '
-    || CASE units WHEN 1 THEN 'unit' ELSE 'units' END
-    || ' of product #' || productId AS description
-FROM Orders;
-
-  rowtime | description
-----------+---------------------------------------
- 10:17:00 | An order for 4 units of product #30
- 10:17:05 | An order for 1 unit of product #10
- 10:18:05 | An order for 2 units of product #20
- 10:18:07 | An order for 20 units of product #30
- 11:02:00 | An order by 6 units of product #10
- 11:04:00 | An order by 1 unit of product #10
- 11:09:30 | An order for 12 units of product #40
- 11:24:11 | An order by 4 units of product #10
-```
-
-We recommend that you always include the `rowtime` column in the `SELECT`
-clause. Having a sorted timestamp in each stream and streaming query makes it
-possible to do advanced calculations later, such as `GROUP BY` and `JOIN`.
-
-# Tumbling windows
-
-There are several ways to compute aggregate functions on streams. The
-differences are:
-* How many rows come out for each row in?
-* Does each incoming value appear in one total, or more?
-* What defines the "window", the set of rows that contribute to a given output row?
-* Is the result a stream or a relation?
-
-First we'll look a *tumbling window*, which is defined by a streaming
-`GROUP BY`. Here is an example:
-
-```sql
-SELECT STREAM FLOOR(rowtime TO HOUR) AS rowtime,
-  productId,
-  COUNT(*) AS c,
-  SUM(units) AS units
-FROM Orders
-GROUP BY FLOOR(rowtime TO HOUR), productId;
-
-  rowtime | productId |       c | units
-----------+-----------+---------+-------
- 10:00:00 |        30 |       2 |    24
- 10:00:00 |        10 |       1 |     1
- 10:00:00 |        20 |       1 |     7
- 11:00:00 |        10 |       3 |    11
- 11:00:00 |        40 |       1 |    12
-```
-
-The result is a stream. At 11 o'clock, Calcite emits a sub-total for every
-`productId` that had an order since 10 o'clock. At 12 o'clock, it will emit
-the orders that occurred between 11:00 and 12:00. Each input row contributes to
-only one output row.
-
-How did Calcite know that the 10:00:00 sub-totals were complete at 11:00:00,
-so that it could emit them? It knows that `rowtime` is increasing, and it knows
-that `FLOOR(rowtime TO HOUR)` is also increasing. So, once it has seen a row
-at or after 11:00:00, it will never see a row that will contribute to a 10:00:00
-total.
-
-A column or expression that is increasing or decreasing is said to be
-*monotonic*. Without a monotonic expression in the `GROUP BY` clause, Calcite is
-not able to make progress, and it will not allow the query:
-
-```sql
-> SELECT STREAM productId,
->   COUNT(*) AS c,
->   SUM(units) AS units
-> FROM Orders
-> GROUP BY productId;
-ERROR: Streaming aggregation requires at least one monotonic expression in GROUP BY clause
-```
-
-Monotonic columns need to be declared in the schema. The monotonicity is
-enforced when records enter the stream and assumed by queries that read from
-that stream. We recommend that you give each stream a timestamp column called
-`rowtime`, but you can declare others, `orderId`, for example.
-
-# Filtering after aggregation
-
-As in standard SQL, you can apply a `HAVING` clause to filter rows emitted by
-a streaming `GROUP BY`:
-
-```sql
-SELECT STREAM FLOOR(rowtime TO HOUR) AS rowtime,
-  productId
-FROM Orders
-GROUP BY FLOOR(rowtime TO HOUR), productId
-HAVING COUNT(*) > 2 OR SUM(units) > 10;
-
-  rowtime | productId
-----------+-----------
- 10:00:00 |        30
- 11:00:00 |        10
- 11:00:00 |        40
-```
-
-# Sub-queries, views and SQL's closure property
-
-The previous `HAVING` query can be expressed using a `WHERE` clause on a
-sub-query:
-
-```sql
-SELECT STREAM rowtime, productId
-FROM (
-  SELECT FLOOR(rowtime TO HOUR) AS rowtime,
-    productId,
-    COUNT(*) AS c,
-    SUM(units) AS su
-  FROM Orders
-  GROUP BY FLOOR(rowtime TO HOUR), productId)
-WHERE c > 2 OR su > 10;
-
-  rowtime | productId
-----------+-----------
- 10:00:00 |        30
- 11:00:00 |        10
- 11:00:00 |        40
-```
-
-`HAVING` was introduced in the early days of SQL, when a way was needed to
-perform a filter *after* aggregation. (Recall that `WHERE` filters rows before
-they enter the `GROUP BY` clause.)
-
-Since then, SQL has become a mathematically closed language, which means that
-any operation you can perform on a table can also perform on a query.
-
-The *closure property* of SQL is extremely powerful. Not only does it render
-`HAVING` obsolete (or, at least, reduce it to syntactic sugar), it makes views
-possible:
-
-```sql
-CREATE VIEW HourlyOrderTotals (rowtime, productId, c, su) AS
-  SELECT FLOOR(rowtime TO HOUR),
-    productId,
-    COUNT(*),
-    SUM(units)
-  FROM Orders
-  GROUP BY FLOOR(rowtime TO HOUR), productId;
-
-SELECT STREAM rowtime, productId
-FROM HourlyOrderTotals
-WHERE c > 2 OR su > 10;
-
-  rowtime | productId
-----------+-----------
- 10:00:00 |        30
- 11:00:00 |        10
- 11:00:00 |        40
-```
-
-Sub-queries in the `FROM` clause are sometimes referred to as "inline views",
-but really, nested queries are more fundamental. Views are just a convenient
-way to carve your SQL into manageable chunks.
-
-Many people find that nested queries and views are even more useful on streams
-than they are on relations. Streaming queries are pipelines of
-operators all running continuously, and often those pipelines get quite long.
-Nested queries and views help to express and manage those pipelines.
-
-And, by the way, a `WITH` clause can accomplish the same as a sub-query or
-a view:
-
-```sql
-WITH HourlyOrderTotals (rowtime, productId, c, su) AS (
-  SELECT FLOOR(rowtime TO HOUR),
-    productId,
-    COUNT(*),
-    SUM(units)
-  FROM Orders
-  GROUP BY FLOOR(rowtime TO HOUR), productId)
-SELECT STREAM rowtime, productId
-FROM HourlyOrderTotals
-WHERE c > 2 OR su > 10;
-
-  rowtime | productId
-----------+-----------
- 10:00:00 |        30
- 11:00:00 |        10
- 11:00:00 |        40
-```
-
-## Converting between streams and relations
-
-Look back at the definition of the `HourlyOrderTotals` view.
-Is the view a stream or a relation?
-
-It does not contain the `STREAM` keyword, so it is a relation.
-However, it is a relation that can be converted into a stream.
-
-You can use it in both relational and streaming queries:
-
-```sql
-# A relation; will query the historic Orders table.
-# Returns the largest number of product #10 ever sold in one hour.
-SELECT max(su)
-FROM HourlyOrderTotals
-WHERE productId = 10;
-
-# A stream; will query the Orders stream.
-# Returns every hour in which at least one product #10 was sold.
-SELECT STREAM rowtime
-FROM HourlyOrderTotals
-WHERE productId = 10;
-```
-
-This approach is not limited to views and sub-queries.
-Following the approach set out in CQL [<a href="#ref1">1</a>], every query
-in streaming SQL is defined as a relational query and converted to a stream
-using the `STREAM` keyword in the top-most `SELECT`.
-
-If the `STREAM` keyword is present in sub-queries or view definitions, it has no
-effect.
-
-At query preparation time, Calcite figures out whether the relations referenced
-in the query can be converted to streams or historical relations.
-
-Sometimes a stream makes available some of its history (say the last 24 hours of
-data in an Apache Kafka [<a href="#ref2">2</a>] topic)
-but not all. At run time, Calcite figures out whether there is sufficient
-history to run the query, and if not, gives an error.
-
-## Hopping windows
-
-Previously we saw how to define a tumbling window using a `GROUP BY` clause.
-Each record contributed to a single sub-total record, the one containing its
-hour and product id.
-
-But suppose we want to emit, every hour, the number of each product ordered over
-the past three hours. To do this, we use `SELECT ... OVER` and a sliding window
-to combine multiple tumbling windows.
-
-```sql
-SELECT STREAM rowtime,
-  productId,
-  SUM(su) OVER w AS su,
-  SUM(c) OVER w AS c
-FROM HourlyTotals
-WINDOW w AS (
-  ORDER BY rowtime
-  PARTITION BY productId
-  RANGE INTERVAL '2' HOUR PRECEDING)
-```
-
-This query uses the `HourlyOrderTotals` view defined previously.
-The 2 hour interval combines the totals timestamped 09:00:00, 10:00:00 and
-11:00:00 for a particular product into a single total timestamped 11:00:00 and
-summarizing orders for that product between 09:00:00 and 12:00:00.
-
-## Limitations of tumbling and hopping windows
-
-In the present syntax, we acknowledge that it is not easy to create certain
-kinds of windows.
-
-First, let's consider tumbling windows over complex periods.
-
-The `FLOOR` and `CEIL` functions make is easy to create a tumbling window that
-emits on a whole time unit (say every hour, or every minute) but less easy to
-emit, say, every 15 minutes. One could imagine an extension to the `FLOOR`
-function that emits unique values on just about any periodic basis (say in 11
-minute intervals starting from midnight of the current day).
-
-Next, let's consider hopping windows whose retention period is not a multiple
-of its emission period. Say we want to output, at the top of each hour, the
-orders for the previous 7,007 seconds. If we were to simulate this hopping
-window using a sliding window over a tumbling window, as before, we would have
-to sum lots of 1-second windows (because 3,600 and 7,007 are co-prime).
-This is a lot of effort for both the system and the person writing the query.
-
-Calcite could perhaps solve this generalizing `GROUP BY` syntax, but we would
-be destroying the principle that an input row into a `GROUP BY` appears in
-precisely one output row.
-
-Calcite's SQL extensions for streaming queries are evolving. As we learn more
-about how people wish to query streams, we plan to make the language more
-expressive while remaining compatible with standard SQL and consistent with
-its principles, look and feel.
-
-## Sorting
-
-The story for `ORDER BY` is similar to `GROUP BY`.
-The syntax looks like regular SQL, but Calcite must be sure that it can deliver
-timely results. It therefore requires a monotonic expression on the leading edge
-of your `ORDER BY` key.
-
-```sql
-SELECT STREAM FLOOR(rowtime TO hour) AS rowtime, productId, orderId, units
-FROM Orders
-ORDER BY FLOOR(rowtime TO hour) ASC, units DESC;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 10:00:00 |        30 |       8 |    20
- 10:00:00 |        30 |       5 |     4
- 10:00:00 |        20 |       7 |     2
- 10:00:00 |        10 |       6 |     1
- 11:00:00 |        40 |      11 |    12
- 11:00:00 |        10 |       9 |     6
- 11:00:00 |        10 |      12 |     4
- 11:00:00 |        10 |      10 |     1
-```
-
-Most queries will return results in the order that they were inserted,
-because the engine is using streaming algorithms, but you should not rely on it.
-For example, consider this:
-
-```sql
-SELECT STREAM *
-FROM Orders
-WHERE productId = 10
-UNION ALL
-SELECT STREAM *
-FROM Orders
-WHERE productId = 30;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 10:17:05 |        10 |       6 |     1
- 10:17:00 |        30 |       5 |     4
- 10:18:07 |        30 |       8 |    20
- 11:02:00 |        10 |       9 |     6
- 11:04:00 |        10 |      10 |     1
- 11:24:11 |        10 |      12 |     4
-```
-
-The rows with `productId` = 30 are apparently out of order, probably because
-the `Orders` stream was partitioned on `productId` and the partitioned streams
-sent their data at different times.
-
-If you require a particular ordering, add an explicit `ORDER BY`:
-
-```sql
-SELECT STREAM *
-FROM Orders
-WHERE productId = 10
-UNION ALL
-SELECT STREAM *
-FROM Orders
-WHERE productId = 30
-ORDER BY rowtime;
-
-  rowtime | productId | orderId | units
-----------+-----------+---------+-------
- 10:17:00 |        30 |       5 |     4
- 10:17:05 |        10 |       6 |     1
- 10:18:07 |        30 |       8 |    20
- 11:02:00 |        10 |       9 |     6
- 11:04:00 |        10 |      10 |     1
- 11:24:11 |        10 |      12 |     4
-```
-
-Calcite will probably implement the `UNION ALL` by merging using `rowtime`,
-which is only slightly less efficient.
-
-You only need to add an `ORDER BY` to the outermost query. If you need to,
-say, perform `GROUP BY` after a `UNION ALL`, Calcite will add an `ORDER BY`
-implicitly, in order to make the GROUP BY algorithm possible.
-
-## Table constructor
-
-The `VALUES` clause creates an inline table with a given set of rows.
-
-Streaming is disallowed. The set of rows never changes, and therefore a stream
-would never return any rows.
-
-```sql
-> SELECT STREAM * FROM (VALUES (1, 'abc'));
-
-ERROR: Cannot stream VALUES
-```
-
-## Sliding windows
-
-Standard SQL features so-called "analytic functions" that can be used in the
-`SELECT` clause. Unlike `GROUP BY`, these do not collapse records. For each
-record that goes in, one record comes out. But the aggregate function is based
-on a window of many rows.
-
-Let's look at an example.
-
-```sql
-SELECT STREAM rowtime,
-  productId,
-  units,
-  SUM(units) OVER (ORDER BY rowtime RANGE INTERVAL '1' HOUR PRECEDING) unitsLastHour
-FROM Orders;
-```
-
-The feature packs a lot of power with little effort. You can have multiple
-functions in the `SELECT` clause, based on multiple window specifications.
-
-The following example returns orders whose average order size over the last
-10 minutes is greater than the average order size for the last week.
-
-```sql
-SELECT STREAM *
-FROM (
-  SELECT STREAM rowtime,
-    productId,
-    units,
-    AVG(units) OVER product (RANGE INTERVAL '10' MINUTE PRECEDING) AS m10,
-    AVG(units) OVER product (RANGE INTERVAL '7' DAY PRECEDING) AS d7
-  FROM Orders
-  WINDOW product AS (
-    ORDER BY rowtime
-    PARTITION BY productId))
-WHERE m10 > d7;
-```
-
-For conciseness, here we use a syntax where you partially define a window
-using a `WINDOW` clause and then refine the window in each `OVER` clause.
-You could also define all windows in the `WINDOW` clause, or all windows inline,
-if you wish.
-
-But the real power goes beyond syntax. Behind the scenes, this query is
-maintaining two tables, and adding and removing values from sub-totals using
-with FIFO queues. But you can access those tables without introducing a join
-into the query.
-
-Some other features of the windowed aggregation syntax:
-* You can define windows based on row count.
-* The window can reference rows that have not yet arrived.
-  (The stream will wait until they have arrived).
-* You can compute order-dependent functions such as `RANK` and median.
-
-## Cascading windows
-
-What if we want a query that returns a result for every record, like a
-sliding window, but resets totals on a fixed time period, like a
-tumbling window? Such a pattern is called a *cascading window*. Here
-is an example:
-
-```sql
-SELECT STREAM rowtime,
-  productId,
-  units,
-  SUM(units) OVER (PARTITION BY FLOOR(rowtime TO HOUR)) AS unitsSinceTopOfHour
-FROM Orders;
-```
-
-It looks similar to a sliding window query, but the monotonic
-expression occurs within the `PARTITION BY` clause of the window. As
-the rowtime moves from from 10:59:59 to 11:00:00, `FLOOR(rowtime TO
-HOUR)` changes from 10:00:00 to 11:00:00, and therefore a new
-partition starts. The first row to arrive in the new hour will start a
-new total; the second row will have a total that consists of two rows,
-and so on.
-
-Calcite knows that the old partition will never be used again, so
-removes all sub-totals for that partition from its internal storage.
-
-Analytic functions that using cascading and sliding windows can be
-combined in the same query.
-
-## State of the stream
-
-Not all concepts in this article have been implemented in Calcite.
-And others may be implemented in Calcite but not in a particular adapter
-such as Samza SQL [<a href="#ref3">3</a>].
-
-### Implemented
-* Streaming SELECT, WHERE, GROUP BY, HAVING, UNION ALL, ORDER BY
-* FLOOR and CEILING functions
-* Monotonicity
-* Streaming VALUES is disallowed
-
-### Not implemented
-* Stream-to-stream JOIN
-* Stream-to-table JOIN
-* Stream on view
-* Streaming UNION ALL with ORDER BY (merge)
-* Relational query on stream
-* Streaming windowed aggregation (sliding and cascading windows)
-* Check that STREAM in sub-queries and views is ignored
-* Check that streaming ORDER BY cannot have OFFSET or LIMIT
-* Limited history; at run time, check that there is sufficient history
-  to run the query.
-
-### To do in this document
-* Re-visit whether you can stream VALUES
-* OVER clause to define window on stream
-* Windowed aggregation
-* Punctuation
-* Stream-to-table join
-** Stream-to-table join where table is changing
-* Stream-to-stream join
-* Relational queries on streams (e.g. "pie chart" query)
-* Diagrams for various window types
-
-## References
-
-* [<a name="ref1">1</a>]
-  <a href="http://ilpubs.stanford.edu:8090/758/">Arasu, Arvind and Babu,
-  Shivnath and Widom, Jennifer (2003) The CQL Continuous Query
-  Language: Semantic Foundations and Query Execution</a>.
-* [<a name="ref2">2</a>]
-  <a href="http://kafka.apache.org/documentation.html">Apache Kafka</a>.
-* [<a name="ref3">3</a>] <a href="http://samza.apache.org">Apache Samza</a>.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/tutorial.md
----------------------------------------------------------------------
diff --git a/doc/tutorial.md b/doc/tutorial.md
deleted file mode 100644
index 91ddef1..0000000
--- a/doc/tutorial.md
+++ /dev/null
@@ -1,753 +0,0 @@
-<!--
-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.
--->
-# CSV Adapter Tutorial
-
-Calcite-example-CSV is a fully functional adapter for
-<a href="https://github.com/apache/incubator-calcite">Calcite</a> that reads
-text files in
-<a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV
-(comma-separated values)</a> format. It is remarkable that a couple of
-hundred lines of Java code are sufficient to provide full SQL query
-capability.
-
-CSV also serves as a template for building adapters to other
-data formats. Even though there are not many lines of code, it covers
-several important concepts:
-* user-defined schema using SchemaFactory and Schema interfaces;
-* declaring schemas in a model JSON file;
-* declaring views in a model JSON file;
-* user-defined table using the Table interface;
-* determining the record type of a table;
-* a simple implementation of Table, using the ScannableTable interface, that
-  enumerates all rows directly;
-* a more advanced implementation that implements FilterableTable, and can
-  filter out rows according to simple predicates;
-* advanced implementation of Table, using TranslatableTable, that translates
-  to relational operators using planner rules.
-
-## Download and build
-
-You need Java (1.7 or higher; 1.8 preferred), git and maven (3.2.1 or later).
-
-```bash
-$ git clone https://github.com/apache/incubator-calcite.git
-$ cd incubator-calcite
-$ mvn install -DskipTests -Dcheckstyle.skip=true
-$ cd example/csv
-```
-
-## First queries
-
-Now let's connect to Calcite using
-<a href="https://github.com/julianhyde/sqlline">sqlline</a>, a SQL shell
-that is included in this project.
-
-```bash
-$ ./sqlline
-sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin admin
-```
-
-(If you are running Windows, the command is `sqlline.bat`.)
-
-Execute a metadata query:
-
-```bash
-sqlline> !tables
-+------------+--------------+-------------+---------------+----------+------+
-| TABLE_CAT  | TABLE_SCHEM  | TABLE_NAME  |  TABLE_TYPE   | REMARKS  | TYPE |
-+------------+--------------+-------------+---------------+----------+------+
-| null       | SALES        | DEPTS       | TABLE         | null     | null |
-| null       | SALES        | EMPS        | TABLE         | null     | null |
-| null       | SALES        | HOBBIES     | TABLE         | null     | null |
-| null       | metadata     | COLUMNS     | SYSTEM_TABLE  | null     | null |
-| null       | metadata     | TABLES      | SYSTEM_TABLE  | null     | null |
-+------------+--------------+-------------+---------------+----------+------+
-```
-
-(JDBC experts, note: sqlline's <code>!tables</code> command is just executing
-<a href="http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])"><code>DatabaseMetaData.getTables()</code></a>
-behind the scenes.
-It has other commands to query JDBC metadata, such as <code>!columns</code> and <code>!describe</code>.)
-
-As you can see there are 5 tables in the system: tables
-<code>EMPS</code>, <code>DEPTS</code> and <code>HOBBIES</code> in the current
-<code>SALES</code> schema, and <code>COLUMNS</code> and
-<code>TABLES</code> in the system <code>metadata</code> schema. The
-system tables are always present in Calcite, but the other tables are
-provided by the specific implementation of the schema; in this case,
-the <code>EMPS</code> and <code>DEPTS</code> tables are based on the
-<code>EMPS.csv</code> and <code>DEPTS.csv</code> files in the
-<code>target/test-classes</code> directory.
-
-Let's execute some queries on those tables, to show that Calcite is providing
-a full implementation of SQL. First, a table scan:
-
-```bash
-sqlline> SELECT * FROM emps;
-+--------+--------+---------+---------+----------------+--------+-------+---+
-| EMPNO  |  NAME  | DEPTNO  | GENDER  |      CITY      | EMPID  |  AGE  | S |
-+--------+--------+---------+---------+----------------+--------+-------+---+
-| 100    | Fred   | 10      |         |                | 30     | 25    | t |
-| 110    | Eric   | 20      | M       | San Francisco  | 3      | 80    | n |
-| 110    | John   | 40      | M       | Vancouver      | 2      | null  | f |
-| 120    | Wilma  | 20      | F       |                | 1      | 5     | n |
-| 130    | Alice  | 40      | F       | Vancouver      | 2      | null  | f |
-+--------+--------+---------+---------+----------------+--------+-------+---+
-```
-
-Now JOIN and GROUP BY:
-
-```bash
-sqlline> SELECT d.name, COUNT(*)
-. . . .> FROM emps AS e JOIN depts AS d ON e.deptno = d.deptno
-. . . .> GROUP BY d.name;
-+------------+---------+
-|    NAME    | EXPR$1  |
-+------------+---------+
-| Sales      | 1       |
-| Marketing  | 2       |
-+------------+---------+
-```
-
-Last, the VALUES operator generates a single row, and is a convenient
-way to test expressions and SQL built-in functions:
-
-```bash
-sqlline> VALUES CHAR_LENGTH('Hello, ' || 'world!');
-+---------+
-| EXPR$0  |
-+---------+
-| 13      |
-+---------+
-```
-
-Calcite has many other SQL features. We don't have time to cover them
-here. Write some more queries to experiment.
-
-## Schema discovery
-
-Now, how did Calcite find these tables? Remember, core Calcite does not
-know anything about CSV files. (As a "database without a storage
-layer", Calcite doesn't know about any file formats.) Calcite knows about
-those tables because we told it to run code in the calcite-example-csv
-project.
-
-There are a couple of steps in that chain. First, we define a schema
-based on a schema factory class in a model file. Then the schema
-factory creates a schema, and the schema creates several tables, each
-of which knows how to get data by scanning a CSV file. Last, after
-Calcite has parsed the query and planned it to use those tables, Calcite
-invokes the tables to read the data as the query is being
-executed. Now let's look at those steps in more detail.
-
-On the JDBC connect string we gave the path of a model in JSON
-format. Here is the model:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
-    {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'target/test-classes/sales'
-      }
-    }
-  ]
-}
-```
-
-The model defines a single schema called 'SALES'. The schema is
-powered by a plugin class,
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchemaFactory.java">org.apache.calcite.adapter.csv.CsvSchemaFactory</a>,
-which is part of the
-calcite-example-csv project and implements the Calcite interface
-<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/SchemaFactory.html">SchemaFactory</a>.
-Its <code>create</code> method instantiates a
-schema, passing in the <code>directory</code> argument from the model file:
-
-```java
-public Schema create(SchemaPlus parentSchema, String name,
-    Map<String, Object> operand) {
-  String directory = (String) operand.get("directory");
-  String flavorName = (String) operand.get("flavor");
-  CsvTable.Flavor flavor;
-  if (flavorName == null) {
-    flavor = CsvTable.Flavor.SCANNABLE;
-  } else {
-    flavor = CsvTable.Flavor.valueOf(flavorName.toUpperCase());
-  }
-  return new CsvSchema(
-      new File(directory),
-      flavor);
-}
-```
-
-Driven by the model, the schema factory instantiates a single schema
-called 'SALES'.  The schema is an instance of
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java">org.apache.calcite.adapter.csv.CsvSchema</a>
-and implements the Calcite interface <a
-href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/Schema.html">Schema</a>.
-
-A schema's job is to produce a list of tables. (It can also list sub-schemas and
-table-functions, but these are advanced features and calcite-example-csv does
-not support them.) The tables implement Calcite's
-<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/Table.html">Table</a>
-interface. <code>CsvSchema</code> produces tables that are instances of
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTable.java">CsvTable</a>
-and its sub-classes.
-
-Here is the relevant code from <code>CsvSchema</code>, overriding the
-<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/impl/AbstractSchema.html#getTableMap()">getTableMap()</a></code>
-method in the <code>AbstractSchema</code> base class.
-
-```java
-protected Map<String, Table> getTableMap() {
-  // Look for files in the directory ending in ".csv", ".csv.gz", ".json",
-  // ".json.gz".
-  File[] files = directoryFile.listFiles(
-      new FilenameFilter() {
-        public boolean accept(File dir, String name) {
-          final String nameSansGz = trim(name, ".gz");
-          return nameSansGz.endsWith(".csv")
-              || nameSansGz.endsWith(".json");
-        }
-      });
-  if (files == null) {
-    System.out.println("directory " + directoryFile + " not found");
-    files = new File[0];
-  }
-  // Build a map from table name to table; each file becomes a table.
-  final ImmutableMap.Builder<String, Table> builder = ImmutableMap.builder();
-  for (File file : files) {
-    String tableName = trim(file.getName(), ".gz");
-    final String tableNameSansJson = trimOrNull(tableName, ".json");
-    if (tableNameSansJson != null) {
-      JsonTable table = new JsonTable(file);
-      builder.put(tableNameSansJson, table);
-      continue;
-    }
-    tableName = trim(tableName, ".csv");
-    final Table table = createTable(file);
-    builder.put(tableName, table);
-  }
-  return builder.build();
-}
-
-/** Creates different sub-type of table based on the "flavor" attribute. */
-private Table createTable(File file) {
-  switch (flavor) {
-  case TRANSLATABLE:
-    return new CsvTranslatableTable(file, null);
-  case SCANNABLE:
-    return new CsvScannableTable(file, null);
-  case FILTERABLE:
-    return new CsvFilterableTable(file, null);
-  default:
-    throw new AssertionError("Unknown flavor " + flavor);
-  }
-}
-```
-
-The schema scans the directory and finds all files whose name ends
-with ".csv" and creates tables for them. In this case, the directory
-is <code>target/test-classes/sales</code> and contains files
-<code>EMPS.csv</code> and <code>DEPTS.csv</code>, which these become
-the tables <code>EMPS</code> and <code>DEPTS</code>.
-
-## Tables and views in schemas
-
-Note how we did not need to define any tables in the model; the schema
-generated the tables automatically.
-
-You can define extra tables,
-beyond those that are created automatically,
-using the <code>tables</code> property of a schema.
-
-Let's see how to create
-an important and useful type of table, namely a view.
-
-A view looks like a table when you are writing a query, but it doesn't store data.
-It derives its result by executing a query.
-The view is expanded while the query is being planned, so the query planner
-can often perform optimizations like removing expressions from the SELECT
-clause that are not used in the final result.
-
-Here is a schema that defines a view:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
-    {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'target/test-classes/sales'
-      },
-      tables: [
-        {
-          name: 'FEMALE_EMPS',
-          type: 'view',
-          sql: 'SELECT * FROM emps WHERE gender = \'F\''
-        }
-      ]
-    }
-  ]
-}
-```
-
-The line <code>type: 'view'</code> tags <code>FEMALE_EMPS</code> as a view,
-as opposed to a regular table or a custom table.
-Note that single-quotes within the view definition are escaped using a
-back-slash, in the normal way for JSON.
-
-JSON doesn't make it easy to author long strings, so Calcite supports an
-alternative syntax. If your view has a long SQL statement, you can instead
-supply a list of lines rather than a single string:
-
-```json
-        {
-          name: 'FEMALE_EMPS',
-          type: 'view',
-          sql: [
-            'SELECT * FROM emps',
-            'WHERE gender = \'F\''
-          ]
-        }
-```
-
-Now we have defined a view, we can use it in queries just as if it were a table:
-
-```sql
-sqlline> SELECT e.name, d.name FROM female_emps AS e JOIN depts AS d on e.deptno = d.deptno;
-+--------+------------+
-|  NAME  |    NAME    |
-+--------+------------+
-| Wilma  | Marketing  |
-+--------+------------+
-```
-
-## Custom tables
-
-Custom tables are tables whose implementation is driven by user-defined code.
-They don't need to live in a custom schema.
-
-There is an example in <code>model-with-custom-table.json</code>:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'CUSTOM_TABLE',
-  schemas: [
-    {
-      name: 'CUSTOM_TABLE',
-      tables: [
-        {
-          name: 'EMPS',
-          type: 'custom',
-          factory: 'org.apache.calcite.adapter.csv.CsvTableFactory',
-          operand: {
-            file: 'target/test-classes/sales/EMPS.csv.gz',
-            flavor: "scannable"
-          }
-        }
-      ]
-    }
-  ]
-}
-```
-
-We can query the table in the usual way:
-
-```sql
-sqlline> !connect jdbc:calcite:model=target/test-classes/model-with-custom-table.json admin admin
-sqlline> SELECT empno, name FROM custom_table.emps;
-+--------+--------+
-| EMPNO  |  NAME  |
-+--------+--------+
-| 100    | Fred   |
-| 110    | Eric   |
-| 110    | John   |
-| 120    | Wilma  |
-| 130    | Alice  |
-+--------+--------+
-```
-
-The schema is a regular one, and contains a custom table powered by
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableFactory.java">org.apache.calcite.adapter.csv.CsvTableFactory</a>,
-which implements the Calcite interface
-<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/TableFactory.html">TableFactory</a>.
-Its <code>create</code> method instantiates a <code>CsvScannableTable</code>,
-passing in the <code>file</code> argument from the model file:
-
-```java
-public CsvTable create(SchemaPlus schema, String name,
-    Map<String, Object> map, RelDataType rowType) {
-  String fileName = (String) map.get("file");
-  final File file = new File(fileName);
-  final RelProtoDataType protoRowType =
-      rowType != null ? RelDataTypeImpl.proto(rowType) : null;
-  return new CsvScannableTable(file, protoRowType);
-}
-```
-
-Implementing a custom table is often a simpler alternative to implementing
-a custom schema. Both approaches might end up creating a similar implementation
-of the <code>Table</code> interface, but for the custom table you don't
-need to implement metadata discovery. (<code>CsvTableFactory</code>
-creates a <code>CsvScannableTable</code>, just as <code>CsvSchema</code> does,
-but the table implementation does not scan the filesystem for .csv files.)
-
-Custom tables require more work for the author of the model (the author
-needs to specify each table and its file explicitly) but also give the author
-more control (say, providing different parameters for each table).
-
-## Comments in models
-
-Models can include comments using `/* ... */` and `//` syntax:
-
-```json
-{
-  version: '1.0',
-  /* Multi-line
-     comment. */
-  defaultSchema: 'CUSTOM_TABLE',
-  // Single-line comment.
-  schemas: [
-    ..
-  ]
-}
-```
-
-(Comments are not standard JSON, but are a harmless extension.)
-
-## Optimizing queries using planner rules
-
-The table implementations we have seen so far are fine as long as the tables
-don't contain a great deal of data. But if your customer table has, say, a
-hundred columns and a million rows, you would rather that the system did not
-retrieve all of the data for every query. You would like Calcite to negotiate
-with the adapter and find a more efficient way of accessing the data.
-
-This negotiation is a simple form of query optimization. Calcite supports query
-optimization by adding <i>planner rules</i>. Planner rules operate by
-looking for patterns in the query parse tree (for instance a project on top
-of a certain kind of table), and
-
-Planner rules are also extensible, like schemas and tables. So, if you have a
-data store that you want to access via SQL, you first define a custom table or
-schema, and then you define some rules to make the access efficient.
-
-To see this in action, let's use a planner rule to access
-a subset of columns from a CSV file. Let's run the same query against two very
-similar schemas:
-
-```sql
-sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin admin
-sqlline> explain plan for select name from emps;
-+-----------------------------------------------------+
-| PLAN                                                |
-+-----------------------------------------------------+
-| EnumerableCalcRel(expr#0..9=[{inputs}], NAME=[$t1]) |
-|   EnumerableTableAccessRel(table=[[SALES, EMPS]])   |
-+-----------------------------------------------------+
-sqlline> !connect jdbc:calcite:model=target/test-classes/smart.json admin admin
-sqlline> explain plan for select name from emps;
-+-----------------------------------------------------+
-| PLAN                                                |
-+-----------------------------------------------------+
-| EnumerableCalcRel(expr#0..9=[{inputs}], NAME=[$t1]) |
-|   CsvTableScan(table=[[SALES, EMPS]])               |
-+-----------------------------------------------------+
-```
-
-What causes the difference in plan? Let's follow the trail of evidence. In the
-<code>smart.json</code> model file, there is just one extra line:
-
-```json
-flavor: "translatable"
-```
-
-This causes a <code>CsvSchema</code> to be created with
-<code>flavor = TRANSLATABLE</code>,
-and its <code>createTable</code> method creates instances of
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTranslatableTable.java">CsvTranslatableTable</a>
-rather than a <code>CsvScannableTable</code>.
-
-<code>CsvTranslatableTable</code> implements the
-<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/TranslatableTable.html#toRel()">TranslatableTable.toRel()</a></code>
-method to create
-<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableScan.java">CsvTableScan</a>.
-Table scans are the leaves of a query operator tree.
-The usual implementation is
-<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/adapter/enumerable/EnumerableTableScan.html">EnumerableTableScan</a></code>,
-but we have created a distinctive sub-type that will cause rules to fire.
-
-Here is the rule in its entirety:
-
-```java
-public class CsvProjectTableScanRule extends RelOptRule {
-  public static final CsvProjectTableScanRule INSTANCE =
-      new CsvProjectTableScanRule();
-
-  private CsvProjectTableScanRule() {
-    super(
-        operand(Project.class,
-            operand(CsvTableScan.class, none())),
-        "CsvProjectTableScanRule");
-  }
-
-  @Override
-  public void onMatch(RelOptRuleCall call) {
-    final Project project = call.rel(0);
-    final CsvTableScan scan = call.rel(1);
-    int[] fields = getProjectFields(project.getProjects());
-    if (fields == null) {
-      // Project contains expressions more complex than just field references.
-      return;
-    }
-    call.transformTo(
-        new CsvTableScan(
-            scan.getCluster(),
-            scan.getTable(),
-            scan.csvTable,
-            fields));
-  }
-
-  private int[] getProjectFields(List<RexNode> exps) {
-    final int[] fields = new int[exps.size()];
-    for (int i = 0; i < exps.size(); i++) {
-      final RexNode exp = exps.get(i);
-      if (exp instanceof RexInputRef) {
-        fields[i] = ((RexInputRef) exp).getIndex();
-      } else {
-        return null; // not a simple projection
-      }
-    }
-    return fields;
-  }
-}
-```
-
-The constructor declares the pattern of relational expressions that will cause
-the rule to fire.
-
-The <code>onMatch</code> method generates a new relational expression and calls
-<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/plan/RelOptRuleCall.html#transformTo(org.apache.calcite.rel.RelNode)">RelOptRuleCall.transformTo()</a></code>
-to indicate that the rule has fired successfully.
-
-## The query optimization process
-
-There's a lot to say about how clever Calcite's query planner is, but we won't
-say it here. The cleverness is designed to take the burden off you, the writer
-of planner rules.
-
-First, Calcite doesn't fire rules in a prescribed order. The query optimization
-process follows many branches of a branching tree, just like a chess playing
-program examines many possible sequences of moves. If rules A and B both match a
-given section of the query operator tree, then Calcite can fire both.
-
-Second, Calcite uses cost in choosing between plans, but the cost model doesn't
-prevent rules from firing which may seem to be more expensive in the short term.
-
-Many optimizers have a linear optimization scheme. Faced with a choice between
-rule A and rule B, as above, such an optimizer needs to choose immediately. It
-might have a policy such as "apply rule A to the whole tree, then apply rule B
-to the whole tree", or apply a cost-based policy, applying the rule that
-produces the cheaper result.
-
-Calcite doesn't require such compromises.
-This makes it simple to combine various sets of rules.
-If, say you want to combine rules to recognize materialized views with rules to
-read from CSV and JDBC source systems, you just give Calcite the set of all
-rules and tell it to go at it.
-
-Calcite does use a cost model. The cost model decides which plan to ultimately
-use, and sometimes to prune the search tree to prevent the search space from
-exploding, but it never forces you to choose between rule A and rule B. This is
-important, because it avoids falling into local minima in the search space that
-are not actually optimal.
-
-Also (you guessed it) the cost model is pluggable, as are the table and query
-operator statistics it is based upon. But that can be a subject for later.
-
-## JDBC adapter
-
-The JDBC adapter maps a schema in a JDBC data source as a Calcite schema.
-
-For example, this schema reads from a MySQL "foodmart" database:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'FOODMART',
-  schemas: [
-    {
-      name: 'FOODMART',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
-      operand: {
-        jdbcDriver: 'com.mysql.jdbc.Driver',
-        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
-        jdbcUser: 'foodmart',
-        jdbcPassword: 'foodmart'
-      }
-    }
-  ]
-}
-```
-
-(The FoodMart database will be familiar to those of you who have used
-the Mondrian OLAP engine, because it is Mondrian's main test data
-set. To load the data set, follow <a
-href="http://mondrian.pentaho.com/documentation/installation.php#2_Set_up_test_data">Mondrian's
-installation instructions</a>.)
-
-<b>Current limitations</b>: The JDBC adapter currently only pushes
-down table scan operations; all other processing (filtering, joins,
-aggregations and so forth) occurs within Calcite. Our goal is to push
-down as much processing as possible to the source system, translating
-syntax, data types and built-in functions as we go. If a Calcite query
-is based on tables from a single JDBC database, in principle the whole
-query should go to that database. If tables are from multiple JDBC
-sources, or a mixture of JDBC and non-JDBC, Calcite will use the most
-efficient distributed query approach that it can.
-
-## The cloning JDBC adapter
-
-The cloning JDBC adapter creates a hybrid database. The data is
-sourced from a JDBC database but is read into in-memory tables the
-first time each table is accessed. Calcite evaluates queries based on
-those in-memory tables, effectively a cache of the database.
-
-For example, the following model reads tables from a MySQL
-"foodmart" database:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'FOODMART_CLONE',
-  schemas: [
-    {
-      name: 'FOODMART_CLONE',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
-      operand: {
-        jdbcDriver: 'com.mysql.jdbc.Driver',
-        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
-        jdbcUser: 'foodmart',
-        jdbcPassword: 'foodmart'
-      }
-    }
-  ]
-}
-```
-
-Another technique is to build a clone schema on top of an existing
-schema. You use the <code>source</code> property to reference a schema
-defined earlier in the model, like this:
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'FOODMART_CLONE',
-  schemas: [
-    {
-      name: 'FOODMART',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
-      operand: {
-        jdbcDriver: 'com.mysql.jdbc.Driver',
-        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
-        jdbcUser: 'foodmart',
-        jdbcPassword: 'foodmart'
-      }
-    },
-    {
-      name: 'FOODMART_CLONE',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
-      operand: {
-        source: 'FOODMART'
-      }
-    }
-  ]
-}
-```
-
-You can use this approach to create a clone schema on any type of
-schema, not just JDBC.
-
-The cloning adapter isn't the be-all and end-all. We plan to develop
-more sophisticated caching strategies, and a more complete and
-efficient implementation of in-memory tables, but for now the cloning
-JDBC adapter shows what is possible and allows us to try out our
-initial implementations.
-
-## Further topics
-
-### Defining a custom schema
-
-(To be written.)
-
-### Modifying data
-
-How to enable DML operations (INSERT, UPDATE and DELETE) on your schema.
-
-(To be written.)
-
-### Calling conventions
-
-(To be written.)
-
-### Statistics and cost
-
-(To be written.)
-
-### Defining and using user-defined functions
-
-(To be written.)
-
-###  Defining tables in a schema
-
-(To be written.)
-
-### Defining custom tables
-
-(To be written.)
-
-### Built-in SQL implementation
-
-How does Calcite implement SQL, if an adapter does not implement all of the core
-relational operators?
-
-(To be written.)
-
-### Table functions
-
-(To be written.)
-
-## Further resources
-
-* <a href="http://calcite.incubator.apache.org">Apache Calcite</a> home
-  page

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/.gitignore
----------------------------------------------------------------------
diff --git a/site/.gitignore b/site/.gitignore
new file mode 100644
index 0000000..09c86a2
--- /dev/null
+++ b/site/.gitignore
@@ -0,0 +1,2 @@
+.sass-cache
+Gemfile.lock

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/Gemfile
----------------------------------------------------------------------
diff --git a/site/Gemfile b/site/Gemfile
new file mode 100644
index 0000000..77ef869
--- /dev/null
+++ b/site/Gemfile
@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+gem 'github-pages'
+gem 'rouge'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/README.md
----------------------------------------------------------------------
diff --git a/site/README.md b/site/README.md
new file mode 100644
index 0000000..85efa1d
--- /dev/null
+++ b/site/README.md
@@ -0,0 +1,37 @@
+# Apache Calcite docs site
+
+This directory contains the code for the Apache Calcite (incubating) web site,
+[calcite.incubator.apache.org](https://calcite.incubator.apache.org/).
+
+## Setup
+
+1. `cd site`
+2. svn co https://svn.apache.org/repos/asf/incubator/calcite/site target
+3. `sudo apt-get install rubygems ruby2.1-dev zlib1g-dev` (linux)
+4. `sudo gem install bundler github-pages jekyll`
+5. `bundle install`
+
+## Add javadoc
+
+1. `cd ..`
+2. `mvn -DskipTests site`
+3. `mv target/site/apidocs site/target`
+
+## Running locally
+
+Before opening a pull request, you can preview your contributions by
+running from within the directory:
+
+1. `bundle exec jekyll serve`
+2. Open [http://localhost:4000](http://localhost:4000)
+
+## Pushing to site
+
+1. `cd site/target`
+2. `svn status`
+3. You'll need to `svn add` any new files
+4. `svn ci`
+
+Within a few minutes, svnpubsub should kick in and you'll be able to
+see the results at
+[calcite.incubator.apache.org](https://calcite.incubator.apache.org/).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_config.yml
----------------------------------------------------------------------
diff --git a/site/_config.yml b/site/_config.yml
new file mode 100644
index 0000000..a47de15
--- /dev/null
+++ b/site/_config.yml
@@ -0,0 +1,12 @@
+markdown: kramdown
+permalink: /news/:year/:month/:day/:title/
+excerpt_separator: ""
+
+repository: https://github.com/apache/incubator-calcite
+destination: target
+exclude: [README.md,Gemfile*]
+keep_files: [".git", ".svn", "apidocs"]
+
+collections:
+  docs:
+    output: true

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_data/contributors.yml
----------------------------------------------------------------------
diff --git a/site/_data/contributors.yml b/site/_data/contributors.yml
new file mode 100644
index 0000000..fc44c1e
--- /dev/null
+++ b/site/_data/contributors.yml
@@ -0,0 +1,58 @@
+- name: Alan Gates
+  apacheId: gates
+  githubId: alanfgates
+  role: Mentor
+- name: Aman Sinha
+  apacheId: amansinha
+  githubId: amansinha100
+  role: Committer
+- name: Ashutosh Chauhan
+  apacheId: hashutosh
+  githubId: ashutoshc
+  role: Champion
+- name: Chris Wensel
+  apacheId: cwensel
+  githubId: cwensel
+  role: PMC
+- name: James R. Taylor
+  apacheId: jamestaylor
+  githubId: JamesRTaylor
+  role: PMC
+- name: Jacques Nadeau
+  apacheId: jacques
+  githubId: jacques-n
+  role: PMC
+- name: Jesús Camacho Rodríguez
+  apacheId: jcamacho
+  githubId: jcamachor
+  role: Committer
+- name: Jinfeng Ni
+  apacheId: jni
+  githubId: jinfengni
+  role: Committer
+- name: John Pullokkaran
+  apacheId: jpullokk
+  githubId: jpullokkaran
+  role: Committer
+- name: Julian Hyde
+  apacheId: jhyde
+  githubId: julianhyde
+  role: PMC
+  homepage: http://people.apache.org/~jhyde
+- name: Nick Dimiduk
+  apacheId: ndimiduk
+  githubId: ndimiduk
+  role: Committer
+- name: Steven Noels
+  apacheId: stevenn
+  githubId: stevenn
+  role: Mentor
+- name: Ted Dunning
+  apacheId: tdunning
+  githubId: tdunning
+  role: Mentor
+  avatar: https://www.mapr.com/sites/default/files/otherpageimages/ted-circle-80.png
+- name: Vladimir Sitnikov
+  apacheId: vladimirsitnikov
+  githubId: vlsi
+  role: PMC

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_data/docs.yml
----------------------------------------------------------------------
diff --git a/site/_data/docs.yml b/site/_data/docs.yml
new file mode 100644
index 0000000..d016b2d
--- /dev/null
+++ b/site/_data/docs.yml
@@ -0,0 +1,25 @@
+- title: Overview
+  docs:
+  - index
+  - tutorial
+  - algebra
+
+- title: Advanced
+  docs:
+  - adapter
+  - avatica
+  - stream
+  - lattice
+
+- title: Reference
+  docs:
+  - reference
+  - model
+  - howto
+
+- title: Meta
+  docs:
+  - downloads
+  - history
+  - contributing
+  - api

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/adapter.md
----------------------------------------------------------------------
diff --git a/site/_docs/adapter.md b/site/_docs/adapter.md
new file mode 100644
index 0000000..af0d66c
--- /dev/null
+++ b/site/_docs/adapter.md
@@ -0,0 +1,21 @@
+---
+layout: docs
+title: Adapters
+permalink: /docs/adapter.html
+---
+
+## Adapters
+
+* <a href="https://github.com/apache/incubator-drill">Apache Drill adapter</a>
+* Cascading adapter (<a href="https://github.com/Cascading/lingual">Lingual</a>)
+* CSV adapter (example/csv)
+* JDBC adapter (part of <a href="/apidocs/org/apache/calcite/adapter/jdbc/package-summary.html">calcite-core</a>)
+* MongoDB adapter (<a href="/apidocs/org/apache/calcite/adapter/mongodb/package-summary.html">calcite-mongodb</a>)
+* Spark adapter (<a href="/apidocs/org/apache/calcite/adapter/spark/package-summary.html">calcite-spark</a>)
+* Splunk adapter (<a href="/apidocs/org/apache/calcite/adapter/splunk/package-summary.html">calcite-splunk</a>)
+* Eclipse Memory Analyzer (MAT) adapter (<a href="https://github.com/vlsi/mat-calcite-plugin">mat-calcite-plugin</a>)
+
+## Drivers
+
+* <a href="/apidocs/org/apache/calcite/jdbc/package-summary.html">JDBC driver</a>
+

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/algebra.md
----------------------------------------------------------------------
diff --git a/site/_docs/algebra.md b/site/_docs/algebra.md
new file mode 100644
index 0000000..f14f114
--- /dev/null
+++ b/site/_docs/algebra.md
@@ -0,0 +1,22 @@
+---
+layout: docs
+title: Algebra
+permalink: /docs/algebra.html
+---
+
+Relational algebra is at the heart of Calcite. Every query is
+represented as a tree of relational operators. You can translate from
+SQL to relational algebra, or you can build the tree directly.
+
+Planner rules transform expression trees using mathematical identities
+that preserve semantics. For example, it is valid to push a filter
+into an input of an inner join if the filter does not reference
+columns from the other input.
+
+Calcite optimizes queries by repeatedly applying planner rules to a
+relational expression. A cost model guides the process, and the
+planner engine generates an alternative expression that has the same
+semantics as the original but a lower cost.
+
+The planning process is extensible. You can add your own relational
+operators, planner rules, cost model, and statistics.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/api.md
----------------------------------------------------------------------
diff --git a/site/_docs/api.md b/site/_docs/api.md
new file mode 100644
index 0000000..5ab031a
--- /dev/null
+++ b/site/_docs/api.md
@@ -0,0 +1,22 @@
+---
+title: API
+layout: external
+external_url: /apidocs
+---
+
+<!--
+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.
+-->

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/avatica.md
----------------------------------------------------------------------
diff --git a/site/_docs/avatica.md b/site/_docs/avatica.md
new file mode 100644
index 0000000..0458ece
--- /dev/null
+++ b/site/_docs/avatica.md
@@ -0,0 +1,102 @@
+---
+layout: docs
+title: Avatica
+permalink: /docs/avatica.html
+---
+
+<!--
+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.
+-->
+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](/apidocs/org/apache/calcite/avatica/package-summary.html) Core framework
+* [org.apache.calcite.avatica.remote](/apidocs/org/apache/calcite/avatica/remote/package-summary.html) JDBC driver that uses remote procedure calls
+* [org.apache.calcite.avatica.server](/apidocs/org/apache/calcite/avatica/server/package-summary.html) HTTP server
+* [org.apache.calcite.avatica.util](/apidocs/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/5c049bc8/site/_docs/contributing.md
----------------------------------------------------------------------
diff --git a/site/_docs/contributing.md b/site/_docs/contributing.md
new file mode 100644
index 0000000..8fbdd6d
--- /dev/null
+++ b/site/_docs/contributing.md
@@ -0,0 +1,72 @@
+---
+layout: docs
+title: Contributing
+permalink: /docs/contributing.html
+---
+
+<!--
+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.
+-->
+
+We welcome contributions.
+
+If you are planning to make a large contribution, talk to us first! It
+helps to agree on the general approach. Log a
+[JIRA case](https://issues.apache.org/jira/browse/CALCITE) for your
+proposed feature or start a discussion on the dev list.
+
+Fork the github repository, and create a branch for your feature.
+
+Develop your feature and test cases, and make sure that
+`mvn install` succeeds. (Run extra tests if your change warrants it.)
+
+Commit your change to your branch, and use a comment that starts with
+the JIRA case number, like this:
+
+{% highlight text %}
+[CALCITE-345] AssertionError in RexToLixTranslator comparing to date literal
+{% endhighlight %}
+
+If your change had multiple commits, use `git rebase -i master` to
+combine them into a single commit, and to bring your code up to date
+with the latest on the main line.
+
+Then push your commit(s) to github, and create a pull request from
+your branch to the incubator-calcite master branch. Update the JIRA case
+to reference your pull request, and a committer will review your
+changes.
+
+## Getting started
+
+Calcite is a community, so the first step to joining the project is to introduce yourself.
+Join the [developers list](http://mail-archives.apache.org/mod_mbox/incubator-calcite-dev/)
+and send an email.
+
+If you have the chance to attend a [meetup](http://www.meetup.com/Apache-Calcite/),
+or meet [members of the community](http://calcite.incubator.apache.org/team-list.html)
+at a conference, that's also great.
+
+Choose an initial task to work on. It should be something really simple,
+such as a bug fix or a [Jira task that we have labeled
+"newbie"](https://issues.apache.org/jira/issues/?jql=labels%20%3D%20newbie%20%26%20project%20%3D%20Calcite%20%26%20status%20%3D%20Open).
+Follow the [contributing guidelines](#contributing) to get your change committed.
+
+After you have made several useful contributions we may
+[invite you to become a committer](https://community.apache.org/contributors/).
+We value all contributions that help to build a vibrant community, not just code.
+You can contribute by testing the code, helping verify a release,
+writing documentation or the web site,
+or just by answering questions on the list.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/downloads.md
----------------------------------------------------------------------
diff --git a/site/_docs/downloads.md b/site/_docs/downloads.md
new file mode 100644
index 0000000..efcff43
--- /dev/null
+++ b/site/_docs/downloads.md
@@ -0,0 +1,53 @@
+---
+layout: docs
+title: Downloads
+permalink: /docs/downloads.html
+---
+
+<!--
+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.
+-->
+
+Calcite is released as a source artifact, and also through Maven.
+
+# Source releases
+
+Release          | Date       | Commit   | Notes | Download
+:--------------- | :--------- | :------- | :---- | :-------
+{% for post in site.categories.release %}{{ post.version }} | {{ post.date | date_to_string }} | <a href="https://github.com/apache/incubator-calcite/commit/{{ post.sha }}">{{ post.sha }}</a> | <a href="history.html#{{ post.tag }}">notes</a> | <a href="http://{% if forloop.index0 < 2 %}www.apache.org/dyn/closer.cgi{% else %}archive.apache.org/dist{% endif %}/incubator/calcite/{% if post.fullVersion %}{{ post.fullVersion }}{% else %}apache-calcite-{{ post.version }}{% endif %}">src</a>
+      {% endfor %}
+
+# Maven artifacts
+
+Add the following to the dependencies section of your `pom.xml` file:
+
+{% for post in site.categories.release limit:1 %}
+{% assign current_release = post %}
+{% endfor %}
+
+{% highlight xml %}
+<dependencies>
+  <dependency>
+    <groupId>org.apache.calcite</groupId>
+    <artifactId>calcite-core</artifactId>
+    <version>{{ current_release.version }}</version>
+  </dependency>
+</dependencies>
+{% endhighlight %}
+
+Also include `<dependency>` elements for any extension modules you
+need: `calcite-mongodb`, `calcite-spark`, `calcite-splunk`, and so
+forth.
\ No newline at end of file


[11/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/stream.md
----------------------------------------------------------------------
diff --git a/site/_docs/stream.md b/site/_docs/stream.md
new file mode 100644
index 0000000..7418208
--- /dev/null
+++ b/site/_docs/stream.md
@@ -0,0 +1,644 @@
+---
+layout: docs
+title: Streaming
+permalink: /docs/stream.html
+---
+<!--
+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.
+-->
+
+Calcite has extended SQL and relational algebra in order to support
+streaming queries.
+
+Streams are collections to records that flow continuously, and forever.
+Unlike tables, they are not typically stored on disk, but flow over the
+network and are held for short periods of time in memory.
+
+Streams complement tables because they represent what is happening in the
+present and future of the enterprise whereas tables represent the past.
+It is very common for a stream to be archived into a table.
+
+Like tables, you often want to query streams in a high-level language
+based on relational algebra, validated according to a schema, and optimized
+to take advantage of available resources and algorithms.
+
+Calcite's SQL is an extension to standard SQL, not another 'SQL-like' language.
+The distinction is important, for several reasons:
+
+* Streaming SQL is easy to learn for anyone who knows regular SQL.
+* The semantics are clear, because we aim to produce the same results on a
+  stream as if the same data were in a table.
+* You can write queries that combine streams and tables (or the history of
+  a stream, which is basically an in-memory table).
+* Lots of existing tools can generate standard SQL.
+
+If you don't use the `STREAM` keyword, you are back in regular
+standard SQL.
+
+## An example schema
+
+Our streaming SQL examples use the following schema:
+
+* `Orders (rowtime, productId, orderId, units)` - a stream and a table
+* `Products (rowtime, productId, name)` - a table
+* `Shipments (rowtime, orderId)` - a stream
+
+## A simple query
+
+Let's start with the simplest streaming query:
+
+{% highlight sql %}
+SELECT STREAM *
+FROM Orders;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 10:17:00 |        30 |       5 |     4
+ 10:17:05 |        10 |       6 |     1
+ 10:18:05 |        20 |       7 |     2
+ 10:18:07 |        30 |       8 |    20
+ 11:02:00 |        10 |       9 |     6
+ 11:04:00 |        10 |      10 |     1
+ 11:09:30 |        40 |      11 |    12
+ 11:24:11 |        10 |      12 |     4
+{% endhighlight %}
+
+This query reads all columns and rows from the `Orders` stream.
+Like any streaming query, it never terminates. It outputs a record whenever
+a record arrives in `Orders`.
+
+Type `Control-C` to terminate the query.
+
+The `STREAM` keyword is the main extension in streaming SQL. It tells the
+system that you are interested in incoming orders, not existing ones. The query
+
+{% highlight sql %}
+SELECT *
+FROM Orders;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 08:30:00 |        10 |       1 |     3
+ 08:45:10 |        20 |       2 |     1
+ 09:12:21 |        10 |       3 |    10
+ 09:27:44 |        30 |       4 |     2
+
+4 records returned.
+{% endhighlight %}
+
+is also valid, but will print out all existing orders and then terminate. We
+call it a *relational* query, as opposed to *streaming*. It has traditional
+SQL semantics.
+
+`Orders` is special, in that it has both a stream and a table. If you try to run
+a streaming query on a table, or a relational query on a stream, Calcite gives
+an error:
+
+{% highlight sql %}
+> SELECT * FROM Shipments;
+ERROR: Cannot convert stream 'SHIPMENTS' to a table
+
+> SELECT STREAM * FROM Products;
+ERROR: Cannot convert table 'PRODUCTS' to a stream
+{% endhighlight %}
+
+# Filtering rows
+
+Just as in regular SQL, you use a `WHERE` clause to filter rows:
+
+{% highlight sql %}
+SELECT STREAM *
+FROM Orders
+WHERE units > 3;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 10:17:00 |        30 |       5 |     4
+ 10:18:07 |        30 |       8 |    20
+ 11:02:00 |        10 |       9 |     6
+ 11:09:30 |        40 |      11 |    12
+ 11:24:11 |        10 |      12 |     4
+{% endhighlight %}
+
+# Projecting expressions
+
+Use expressions in the `SELECT` clause to choose which columns to return or
+compute expressions:
+
+{% highlight sql %}
+SELECT STREAM rowtime,
+  'An order for ' || units || ' '
+    || CASE units WHEN 1 THEN 'unit' ELSE 'units' END
+    || ' of product #' || productId AS description
+FROM Orders;
+
+  rowtime | description
+----------+---------------------------------------
+ 10:17:00 | An order for 4 units of product #30
+ 10:17:05 | An order for 1 unit of product #10
+ 10:18:05 | An order for 2 units of product #20
+ 10:18:07 | An order for 20 units of product #30
+ 11:02:00 | An order by 6 units of product #10
+ 11:04:00 | An order by 1 unit of product #10
+ 11:09:30 | An order for 12 units of product #40
+ 11:24:11 | An order by 4 units of product #10
+{% endhighlight %}
+
+We recommend that you always include the `rowtime` column in the `SELECT`
+clause. Having a sorted timestamp in each stream and streaming query makes it
+possible to do advanced calculations later, such as `GROUP BY` and `JOIN`.
+
+# Tumbling windows
+
+There are several ways to compute aggregate functions on streams. The
+differences are:
+
+* How many rows come out for each row in?
+* Does each incoming value appear in one total, or more?
+* What defines the "window", the set of rows that contribute to a given output row?
+* Is the result a stream or a relation?
+
+First we'll look a *tumbling window*, which is defined by a streaming
+`GROUP BY`. Here is an example:
+
+{% highlight sql %}
+SELECT STREAM FLOOR(rowtime TO HOUR) AS rowtime,
+  productId,
+  COUNT(*) AS c,
+  SUM(units) AS units
+FROM Orders
+GROUP BY FLOOR(rowtime TO HOUR), productId;
+
+  rowtime | productId |       c | units
+----------+-----------+---------+-------
+ 10:00:00 |        30 |       2 |    24
+ 10:00:00 |        10 |       1 |     1
+ 10:00:00 |        20 |       1 |     7
+ 11:00:00 |        10 |       3 |    11
+ 11:00:00 |        40 |       1 |    12
+{% endhighlight %}
+
+The result is a stream. At 11 o'clock, Calcite emits a sub-total for every
+`productId` that had an order since 10 o'clock. At 12 o'clock, it will emit
+the orders that occurred between 11:00 and 12:00. Each input row contributes to
+only one output row.
+
+How did Calcite know that the 10:00:00 sub-totals were complete at 11:00:00,
+so that it could emit them? It knows that `rowtime` is increasing, and it knows
+that `FLOOR(rowtime TO HOUR)` is also increasing. So, once it has seen a row
+at or after 11:00:00, it will never see a row that will contribute to a 10:00:00
+total.
+
+A column or expression that is increasing or decreasing is said to be
+*monotonic*. Without a monotonic expression in the `GROUP BY` clause, Calcite is
+not able to make progress, and it will not allow the query:
+
+{% highlight sql %}
+> SELECT STREAM productId,
+>   COUNT(*) AS c,
+>   SUM(units) AS units
+> FROM Orders
+> GROUP BY productId;
+ERROR: Streaming aggregation requires at least one monotonic expression in GROUP BY clause
+{% endhighlight %}
+
+Monotonic columns need to be declared in the schema. The monotonicity is
+enforced when records enter the stream and assumed by queries that read from
+that stream. We recommend that you give each stream a timestamp column called
+`rowtime`, but you can declare others, `orderId`, for example.
+
+# Filtering after aggregation
+
+As in standard SQL, you can apply a `HAVING` clause to filter rows emitted by
+a streaming `GROUP BY`:
+
+{% highlight sql %}
+SELECT STREAM FLOOR(rowtime TO HOUR) AS rowtime,
+  productId
+FROM Orders
+GROUP BY FLOOR(rowtime TO HOUR), productId
+HAVING COUNT(*) > 2 OR SUM(units) > 10;
+
+  rowtime | productId
+----------+-----------
+ 10:00:00 |        30
+ 11:00:00 |        10
+ 11:00:00 |        40
+{% endhighlight %}
+
+# Sub-queries, views and SQL's closure property
+
+The previous `HAVING` query can be expressed using a `WHERE` clause on a
+sub-query:
+
+{% highlight sql %}
+SELECT STREAM rowtime, productId
+FROM (
+  SELECT FLOOR(rowtime TO HOUR) AS rowtime,
+    productId,
+    COUNT(*) AS c,
+    SUM(units) AS su
+  FROM Orders
+  GROUP BY FLOOR(rowtime TO HOUR), productId)
+WHERE c > 2 OR su > 10;
+
+  rowtime | productId
+----------+-----------
+ 10:00:00 |        30
+ 11:00:00 |        10
+ 11:00:00 |        40
+{% endhighlight %}
+
+`HAVING` was introduced in the early days of SQL, when a way was needed to
+perform a filter *after* aggregation. (Recall that `WHERE` filters rows before
+they enter the `GROUP BY` clause.)
+
+Since then, SQL has become a mathematically closed language, which means that
+any operation you can perform on a table can also perform on a query.
+
+The *closure property* of SQL is extremely powerful. Not only does it render
+`HAVING` obsolete (or, at least, reduce it to syntactic sugar), it makes views
+possible:
+
+{% highlight sql %}
+CREATE VIEW HourlyOrderTotals (rowtime, productId, c, su) AS
+  SELECT FLOOR(rowtime TO HOUR),
+    productId,
+    COUNT(*),
+    SUM(units)
+  FROM Orders
+  GROUP BY FLOOR(rowtime TO HOUR), productId;
+
+SELECT STREAM rowtime, productId
+FROM HourlyOrderTotals
+WHERE c > 2 OR su > 10;
+
+  rowtime | productId
+----------+-----------
+ 10:00:00 |        30
+ 11:00:00 |        10
+ 11:00:00 |        40
+{% endhighlight %}
+
+Sub-queries in the `FROM` clause are sometimes referred to as "inline views",
+but really, they are more fundamental than views. Views are just a convenient
+way to carve your SQL into manageable chunks by giving the pieces names and
+storing them in the metadata repository.
+
+Many people find that nested queries and views are even more useful on streams
+than they are on relations. Streaming queries are pipelines of
+operators all running continuously, and often those pipelines get quite long.
+Nested queries and views help to express and manage those pipelines.
+
+And, by the way, a `WITH` clause can accomplish the same as a sub-query or
+a view:
+
+{% highlight sql %}
+WITH HourlyOrderTotals (rowtime, productId, c, su) AS (
+  SELECT FLOOR(rowtime TO HOUR),
+    productId,
+    COUNT(*),
+    SUM(units)
+  FROM Orders
+  GROUP BY FLOOR(rowtime TO HOUR), productId)
+SELECT STREAM rowtime, productId
+FROM HourlyOrderTotals
+WHERE c > 2 OR su > 10;
+
+  rowtime | productId
+----------+-----------
+ 10:00:00 |        30
+ 11:00:00 |        10
+ 11:00:00 |        40
+{% endhighlight %}
+
+## Converting between streams and relations
+
+Look back at the definition of the `HourlyOrderTotals` view.
+Is the view a stream or a relation?
+
+It does not contain the `STREAM` keyword, so it is a relation.
+However, it is a relation that can be converted into a stream.
+
+You can use it in both relational and streaming queries:
+
+{% highlight sql %}
+# A relation; will query the historic Orders table.
+# Returns the largest number of product #10 ever sold in one hour.
+SELECT max(su)
+FROM HourlyOrderTotals
+WHERE productId = 10;
+
+# A stream; will query the Orders stream.
+# Returns every hour in which at least one product #10 was sold.
+SELECT STREAM rowtime
+FROM HourlyOrderTotals
+WHERE productId = 10;
+{% endhighlight %}
+
+This approach is not limited to views and sub-queries.
+Following the approach set out in CQL [<a href="#ref1">1</a>], every query
+in streaming SQL is defined as a relational query and converted to a stream
+using the `STREAM` keyword in the top-most `SELECT`.
+
+If the `STREAM` keyword is present in sub-queries or view definitions, it has no
+effect.
+
+At query preparation time, Calcite figures out whether the relations referenced
+in the query can be converted to streams or historical relations.
+
+Sometimes a stream makes available some of its history (say the last 24 hours of
+data in an Apache Kafka [<a href="#ref2">2</a>] topic)
+but not all. At run time, Calcite figures out whether there is sufficient
+history to run the query, and if not, gives an error.
+
+## Hopping windows
+
+Previously we saw how to define a tumbling window using a `GROUP BY` clause.
+Each record contributed to a single sub-total record, the one containing its
+hour and product id.
+
+But suppose we want to emit, every hour, the number of each product ordered over
+the past three hours. To do this, we use `SELECT ... OVER` and a sliding window
+to combine multiple tumbling windows.
+
+{% highlight sql %}
+SELECT STREAM rowtime,
+  productId,
+  SUM(su) OVER w AS su,
+  SUM(c) OVER w AS c
+FROM HourlyTotals
+WINDOW w AS (
+  ORDER BY rowtime
+  PARTITION BY productId
+  RANGE INTERVAL '2' HOUR PRECEDING)
+{% endhighlight %}
+
+This query uses the `HourlyOrderTotals` view defined previously.
+The 2 hour interval combines the totals timestamped 09:00:00, 10:00:00 and
+11:00:00 for a particular product into a single total timestamped 11:00:00 and
+summarizing orders for that product between 09:00:00 and 12:00:00.
+
+## Limitations of tumbling and hopping windows
+
+In the present syntax, we acknowledge that it is not easy to create certain
+kinds of windows.
+
+First, let's consider tumbling windows over complex periods.
+
+The `FLOOR` and `CEIL` functions make is easy to create a tumbling window that
+emits on a whole time unit (say every hour, or every minute) but less easy to
+emit, say, every 15 minutes. One could imagine an extension to the `FLOOR`
+function that emits unique values on just about any periodic basis (say in 11
+minute intervals starting from midnight of the current day).
+
+Next, let's consider hopping windows whose retention period is not a multiple
+of its emission period. Say we want to output, at the top of each hour, the
+orders for the previous 7,007 seconds. If we were to simulate this hopping
+window using a sliding window over a tumbling window, as before, we would have
+to sum lots of 1-second windows (because 3,600 and 7,007 are co-prime).
+This is a lot of effort for both the system and the person writing the query.
+
+Calcite could perhaps solve this generalizing `GROUP BY` syntax, but we would
+be destroying the principle that an input row into a `GROUP BY` appears in
+precisely one output row.
+
+Calcite's SQL extensions for streaming queries are evolving. As we learn more
+about how people wish to query streams, we plan to make the language more
+expressive while remaining compatible with standard SQL and consistent with
+its principles, look and feel.
+
+## Sorting
+
+The story for `ORDER BY` is similar to `GROUP BY`.
+The syntax looks like regular SQL, but Calcite must be sure that it can deliver
+timely results. It therefore requires a monotonic expression on the leading edge
+of your `ORDER BY` key.
+
+{% highlight sql %}
+SELECT STREAM FLOOR(rowtime TO hour) AS rowtime, productId, orderId, units
+FROM Orders
+ORDER BY FLOOR(rowtime TO hour) ASC, units DESC;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 10:00:00 |        30 |       8 |    20
+ 10:00:00 |        30 |       5 |     4
+ 10:00:00 |        20 |       7 |     2
+ 10:00:00 |        10 |       6 |     1
+ 11:00:00 |        40 |      11 |    12
+ 11:00:00 |        10 |       9 |     6
+ 11:00:00 |        10 |      12 |     4
+ 11:00:00 |        10 |      10 |     1
+{% endhighlight %}
+
+Most queries will return results in the order that they were inserted,
+because the engine is using streaming algorithms, but you should not rely on it.
+For example, consider this:
+
+{% highlight sql %}
+SELECT STREAM *
+FROM Orders
+WHERE productId = 10
+UNION ALL
+SELECT STREAM *
+FROM Orders
+WHERE productId = 30;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 10:17:05 |        10 |       6 |     1
+ 10:17:00 |        30 |       5 |     4
+ 10:18:07 |        30 |       8 |    20
+ 11:02:00 |        10 |       9 |     6
+ 11:04:00 |        10 |      10 |     1
+ 11:24:11 |        10 |      12 |     4
+{% endhighlight %}
+
+The rows with `productId` = 30 are apparently out of order, probably because
+the `Orders` stream was partitioned on `productId` and the partitioned streams
+sent their data at different times.
+
+If you require a particular ordering, add an explicit `ORDER BY`:
+
+{% highlight sql %}
+SELECT STREAM *
+FROM Orders
+WHERE productId = 10
+UNION ALL
+SELECT STREAM *
+FROM Orders
+WHERE productId = 30
+ORDER BY rowtime;
+
+  rowtime | productId | orderId | units
+----------+-----------+---------+-------
+ 10:17:00 |        30 |       5 |     4
+ 10:17:05 |        10 |       6 |     1
+ 10:18:07 |        30 |       8 |    20
+ 11:02:00 |        10 |       9 |     6
+ 11:04:00 |        10 |      10 |     1
+ 11:24:11 |        10 |      12 |     4
+{% endhighlight %}
+
+Calcite will probably implement the `UNION ALL` by merging using `rowtime`,
+which is only slightly less efficient.
+
+You only need to add an `ORDER BY` to the outermost query. If you need to,
+say, perform `GROUP BY` after a `UNION ALL`, Calcite will add an `ORDER BY`
+implicitly, in order to make the GROUP BY algorithm possible.
+
+## Table constructor
+
+The `VALUES` clause creates an inline table with a given set of rows.
+
+Streaming is disallowed. The set of rows never changes, and therefore a stream
+would never return any rows.
+
+{% highlight sql %}
+> SELECT STREAM * FROM (VALUES (1, 'abc'));
+
+ERROR: Cannot stream VALUES
+{% endhighlight %}
+
+## Sliding windows
+
+Standard SQL features so-called "analytic functions" that can be used in the
+`SELECT` clause. Unlike `GROUP BY`, these do not collapse records. For each
+record that goes in, one record comes out. But the aggregate function is based
+on a window of many rows.
+
+Let's look at an example.
+
+{% highlight sql %}
+SELECT STREAM rowtime,
+  productId,
+  units,
+  SUM(units) OVER (ORDER BY rowtime RANGE INTERVAL '1' HOUR PRECEDING) unitsLastHour
+FROM Orders;
+{% endhighlight %}
+
+The feature packs a lot of power with little effort. You can have multiple
+functions in the `SELECT` clause, based on multiple window specifications.
+
+The following example returns orders whose average order size over the last
+10 minutes is greater than the average order size for the last week.
+
+{% highlight sql %}
+SELECT STREAM *
+FROM (
+  SELECT STREAM rowtime,
+    productId,
+    units,
+    AVG(units) OVER product (RANGE INTERVAL '10' MINUTE PRECEDING) AS m10,
+    AVG(units) OVER product (RANGE INTERVAL '7' DAY PRECEDING) AS d7
+  FROM Orders
+  WINDOW product AS (
+    ORDER BY rowtime
+    PARTITION BY productId))
+WHERE m10 > d7;
+{% endhighlight %}
+
+For conciseness, here we use a syntax where you partially define a window
+using a `WINDOW` clause and then refine the window in each `OVER` clause.
+You could also define all windows in the `WINDOW` clause, or all windows inline,
+if you wish.
+
+But the real power goes beyond syntax. Behind the scenes, this query is
+maintaining two tables, and adding and removing values from sub-totals using
+with FIFO queues. But you can access those tables without introducing a join
+into the query.
+
+Some other features of the windowed aggregation syntax:
+
+* You can define windows based on row count.
+* The window can reference rows that have not yet arrived.
+  (The stream will wait until they have arrived).
+* You can compute order-dependent functions such as `RANK` and median.
+
+## Cascading windows
+
+What if we want a query that returns a result for every record, like a
+sliding window, but resets totals on a fixed time period, like a
+tumbling window? Such a pattern is called a *cascading window*. Here
+is an example:
+
+{% highlight sql %}
+SELECT STREAM rowtime,
+  productId,
+  units,
+  SUM(units) OVER (PARTITION BY FLOOR(rowtime TO HOUR)) AS unitsSinceTopOfHour
+FROM Orders;
+{% endhighlight %}
+
+It looks similar to a sliding window query, but the monotonic
+expression occurs within the `PARTITION BY` clause of the window. As
+the rowtime moves from from 10:59:59 to 11:00:00, `FLOOR(rowtime TO
+HOUR)` changes from 10:00:00 to 11:00:00, and therefore a new
+partition starts. The first row to arrive in the new hour will start a
+new total; the second row will have a total that consists of two rows,
+and so on.
+
+Calcite knows that the old partition will never be used again, so
+removes all sub-totals for that partition from its internal storage.
+
+Analytic functions that using cascading and sliding windows can be
+combined in the same query.
+
+## State of the stream
+
+Not all concepts in this article have been implemented in Calcite.
+And others may be implemented in Calcite but not in a particular adapter
+such as Samza SQL [<a href="#ref3">3</a>].
+
+### Implemented
+* Streaming SELECT, WHERE, GROUP BY, HAVING, UNION ALL, ORDER BY
+* FLOOR and CEILING functions
+* Monotonicity
+* Streaming VALUES is disallowed
+
+### Not implemented
+* Stream-to-stream JOIN
+* Stream-to-table JOIN
+* Stream on view
+* Streaming UNION ALL with ORDER BY (merge)
+* Relational query on stream
+* Streaming windowed aggregation (sliding and cascading windows)
+* Check that STREAM in sub-queries and views is ignored
+* Check that streaming ORDER BY cannot have OFFSET or LIMIT
+* Limited history; at run time, check that there is sufficient history
+  to run the query.
+
+### To do in this document
+* Re-visit whether you can stream VALUES
+* OVER clause to define window on stream
+* Windowed aggregation
+* Punctuation
+* Stream-to-table join
+  * Stream-to-table join where table is changing
+* Stream-to-stream join
+* Relational queries on streams (e.g. "pie chart" query)
+* Diagrams for various window types
+
+## References
+
+* [<a name="ref1">1</a>]
+  <a href="http://ilpubs.stanford.edu:8090/758/">Arasu, Arvind and Babu,
+  Shivnath and Widom, Jennifer (2003) The CQL Continuous Query
+  Language: Semantic Foundations and Query Execution</a>.
+* [<a name="ref2">2</a>]
+  <a href="http://kafka.apache.org/documentation.html">Apache Kafka</a>.
+* [<a name="ref3">3</a>] <a href="http://samza.apache.org">Apache Samza</a>.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/tutorial.md
----------------------------------------------------------------------
diff --git a/site/_docs/tutorial.md b/site/_docs/tutorial.md
new file mode 100644
index 0000000..51ec187
--- /dev/null
+++ b/site/_docs/tutorial.md
@@ -0,0 +1,760 @@
+---
+layout: docs
+title: Tutorial
+permalink: /docs/tutorial.html
+---
+<!--
+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.
+-->
+
+{% assign sourceRoot = "http://github.com/apache/incubator-calcite/blob/master" %}
+
+This is a step-by-step tutorial that shows how to build and connect to
+Calcite. It uses a simple adapter that makes a directory of CSV files
+appear to be a schema containing tables. Calcite does the rest, and
+provides a full SQL interface.
+
+Calcite-example-CSV is a fully functional adapter for
+Calcite that reads
+text files in
+<a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV
+(comma-separated values)</a> format. It is remarkable that a couple of
+hundred lines of Java code are sufficient to provide full SQL query
+capability.
+
+CSV also serves as a template for building adapters to other
+data formats. Even though there are not many lines of code, it covers
+several important concepts:
+
+* user-defined schema using SchemaFactory and Schema interfaces;
+* declaring schemas in a model JSON file;
+* declaring views in a model JSON file;
+* user-defined table using the Table interface;
+* determining the record type of a table;
+* a simple implementation of Table, using the ScannableTable interface, that
+  enumerates all rows directly;
+* a more advanced implementation that implements FilterableTable, and can
+  filter out rows according to simple predicates;
+* advanced implementation of Table, using TranslatableTable, that translates
+  to relational operators using planner rules.
+
+## Download and build
+
+You need Java (1.7 or higher; 1.8 preferred), git and maven (3.2.1 or later).
+
+{% highlight bash %}
+$ git clone https://github.com/apache/incubator-calcite.git
+$ cd incubator-calcite
+$ mvn install -DskipTests -Dcheckstyle.skip=true
+$ cd example/csv
+{% endhighlight %}
+
+## First queries
+
+Now let's connect to Calcite using
+<a href="https://github.com/julianhyde/sqlline">sqlline</a>, a SQL shell
+that is included in this project.
+
+{% highlight bash %}
+$ ./sqlline
+sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin admin
+{% endhighlight %}
+
+(If you are running Windows, the command is `sqlline.bat`.)
+
+Execute a metadata query:
+
+{% highlight bash %}
+sqlline> !tables
++------------+--------------+-------------+---------------+----------+------+
+| TABLE_CAT  | TABLE_SCHEM  | TABLE_NAME  |  TABLE_TYPE   | REMARKS  | TYPE |
++------------+--------------+-------------+---------------+----------+------+
+| null       | SALES        | DEPTS       | TABLE         | null     | null |
+| null       | SALES        | EMPS        | TABLE         | null     | null |
+| null       | SALES        | HOBBIES     | TABLE         | null     | null |
+| null       | metadata     | COLUMNS     | SYSTEM_TABLE  | null     | null |
+| null       | metadata     | TABLES      | SYSTEM_TABLE  | null     | null |
++------------+--------------+-------------+---------------+----------+------+
+{% endhighlight %}
+
+(JDBC experts, note: sqlline's <code>!tables</code> command is just executing
+<a href="http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])"><code>DatabaseMetaData.getTables()</code></a>
+behind the scenes.
+It has other commands to query JDBC metadata, such as <code>!columns</code> and <code>!describe</code>.)
+
+As you can see there are 5 tables in the system: tables
+<code>EMPS</code>, <code>DEPTS</code> and <code>HOBBIES</code> in the current
+<code>SALES</code> schema, and <code>COLUMNS</code> and
+<code>TABLES</code> in the system <code>metadata</code> schema. The
+system tables are always present in Calcite, but the other tables are
+provided by the specific implementation of the schema; in this case,
+the <code>EMPS</code> and <code>DEPTS</code> tables are based on the
+<code>EMPS.csv</code> and <code>DEPTS.csv</code> files in the
+<code>target/test-classes</code> directory.
+
+Let's execute some queries on those tables, to show that Calcite is providing
+a full implementation of SQL. First, a table scan:
+
+{% highlight bash %}
+sqlline> SELECT * FROM emps;
++--------+--------+---------+---------+----------------+--------+-------+---+
+| EMPNO  |  NAME  | DEPTNO  | GENDER  |      CITY      | EMPID  |  AGE  | S |
++--------+--------+---------+---------+----------------+--------+-------+---+
+| 100    | Fred   | 10      |         |                | 30     | 25    | t |
+| 110    | Eric   | 20      | M       | San Francisco  | 3      | 80    | n |
+| 110    | John   | 40      | M       | Vancouver      | 2      | null  | f |
+| 120    | Wilma  | 20      | F       |                | 1      | 5     | n |
+| 130    | Alice  | 40      | F       | Vancouver      | 2      | null  | f |
++--------+--------+---------+---------+----------------+--------+-------+---+
+{% endhighlight %}
+
+Now JOIN and GROUP BY:
+
+{% highlight bash %}
+sqlline> SELECT d.name, COUNT(*)
+. . . .> FROM emps AS e JOIN depts AS d ON e.deptno = d.deptno
+. . . .> GROUP BY d.name;
++------------+---------+
+|    NAME    | EXPR$1  |
++------------+---------+
+| Sales      | 1       |
+| Marketing  | 2       |
++------------+---------+
+{% endhighlight %}
+
+Last, the VALUES operator generates a single row, and is a convenient
+way to test expressions and SQL built-in functions:
+
+{% highlight bash %}
+sqlline> VALUES CHAR_LENGTH('Hello, ' || 'world!');
++---------+
+| EXPR$0  |
++---------+
+| 13      |
++---------+
+{% endhighlight %}
+
+Calcite has many other SQL features. We don't have time to cover them
+here. Write some more queries to experiment.
+
+## Schema discovery
+
+Now, how did Calcite find these tables? Remember, core Calcite does not
+know anything about CSV files. (As a "database without a storage
+layer", Calcite doesn't know about any file formats.) Calcite knows about
+those tables because we told it to run code in the calcite-example-csv
+project.
+
+There are a couple of steps in that chain. First, we define a schema
+based on a schema factory class in a model file. Then the schema
+factory creates a schema, and the schema creates several tables, each
+of which knows how to get data by scanning a CSV file. Last, after
+Calcite has parsed the query and planned it to use those tables, Calcite
+invokes the tables to read the data as the query is being
+executed. Now let's look at those steps in more detail.
+
+On the JDBC connect string we gave the path of a model in JSON
+format. Here is the model:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'SALES',
+  schemas: [
+    {
+      name: 'SALES',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
+      operand: {
+        directory: 'target/test-classes/sales'
+      }
+    }
+  ]
+}
+{% endhighlight %}
+
+The model defines a single schema called 'SALES'. The schema is
+powered by a plugin class,
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchemaFactory.java">org.apache.calcite.adapter.csv.CsvSchemaFactory</a>,
+which is part of the
+calcite-example-csv project and implements the Calcite interface
+<a href="/apidocs/org/apache/calcite/schema/SchemaFactory.html">SchemaFactory</a>.
+Its <code>create</code> method instantiates a
+schema, passing in the <code>directory</code> argument from the model file:
+
+{% highlight java %}
+public Schema create(SchemaPlus parentSchema, String name,
+    Map<String, Object> operand) {
+  String directory = (String) operand.get("directory");
+  String flavorName = (String) operand.get("flavor");
+  CsvTable.Flavor flavor;
+  if (flavorName == null) {
+    flavor = CsvTable.Flavor.SCANNABLE;
+  } else {
+    flavor = CsvTable.Flavor.valueOf(flavorName.toUpperCase());
+  }
+  return new CsvSchema(
+      new File(directory),
+      flavor);
+}
+{% endhighlight %}
+
+Driven by the model, the schema factory instantiates a single schema
+called 'SALES'.  The schema is an instance of
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java">org.apache.calcite.adapter.csv.CsvSchema</a>
+and implements the Calcite interface
+<a href="/calcite/apidocs/org/apache/calcite/schema/Schema.html">Schema</a>.
+
+A schema's job is to produce a list of tables. (It can also list sub-schemas and
+table-functions, but these are advanced features and calcite-example-csv does
+not support them.) The tables implement Calcite's
+<a href="/apidocs/org/apache/calcite/schema/Table.html">Table</a>
+interface. <code>CsvSchema</code> produces tables that are instances of
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTable.java">CsvTable</a>
+and its sub-classes.
+
+Here is the relevant code from <code>CsvSchema</code>, overriding the
+<code><a href="/apidocs/org/apache/calcite/schema/impl/AbstractSchema.html#getTableMap()">getTableMap()</a></code>
+method in the <code>AbstractSchema</code> base class.
+
+{% highlight java %}
+protected Map<String, Table> getTableMap() {
+  // Look for files in the directory ending in ".csv", ".csv.gz", ".json",
+  // ".json.gz".
+  File[] files = directoryFile.listFiles(
+      new FilenameFilter() {
+        public boolean accept(File dir, String name) {
+          final String nameSansGz = trim(name, ".gz");
+          return nameSansGz.endsWith(".csv")
+              || nameSansGz.endsWith(".json");
+        }
+      });
+  if (files == null) {
+    System.out.println("directory " + directoryFile + " not found");
+    files = new File[0];
+  }
+  // Build a map from table name to table; each file becomes a table.
+  final ImmutableMap.Builder<String, Table> builder = ImmutableMap.builder();
+  for (File file : files) {
+    String tableName = trim(file.getName(), ".gz");
+    final String tableNameSansJson = trimOrNull(tableName, ".json");
+    if (tableNameSansJson != null) {
+      JsonTable table = new JsonTable(file);
+      builder.put(tableNameSansJson, table);
+      continue;
+    }
+    tableName = trim(tableName, ".csv");
+    final Table table = createTable(file);
+    builder.put(tableName, table);
+  }
+  return builder.build();
+}
+
+/** Creates different sub-type of table based on the "flavor" attribute. */
+private Table createTable(File file) {
+  switch (flavor) {
+  case TRANSLATABLE:
+    return new CsvTranslatableTable(file, null);
+  case SCANNABLE:
+    return new CsvScannableTable(file, null);
+  case FILTERABLE:
+    return new CsvFilterableTable(file, null);
+  default:
+    throw new AssertionError("Unknown flavor " + flavor);
+  }
+}
+{% endhighlight %}
+
+The schema scans the directory and finds all files whose name ends
+with ".csv" and creates tables for them. In this case, the directory
+is <code>target/test-classes/sales</code> and contains files
+<code>EMPS.csv</code> and <code>DEPTS.csv</code>, which these become
+the tables <code>EMPS</code> and <code>DEPTS</code>.
+
+## Tables and views in schemas
+
+Note how we did not need to define any tables in the model; the schema
+generated the tables automatically.
+
+You can define extra tables,
+beyond those that are created automatically,
+using the <code>tables</code> property of a schema.
+
+Let's see how to create
+an important and useful type of table, namely a view.
+
+A view looks like a table when you are writing a query, but it doesn't store data.
+It derives its result by executing a query.
+The view is expanded while the query is being planned, so the query planner
+can often perform optimizations like removing expressions from the SELECT
+clause that are not used in the final result.
+
+Here is a schema that defines a view:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'SALES',
+  schemas: [
+    {
+      name: 'SALES',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
+      operand: {
+        directory: 'target/test-classes/sales'
+      },
+      tables: [
+        {
+          name: 'FEMALE_EMPS',
+          type: 'view',
+          sql: 'SELECT * FROM emps WHERE gender = \'F\''
+        }
+      ]
+    }
+  ]
+}
+{% endhighlight %}
+
+The line <code>type: 'view'</code> tags <code>FEMALE_EMPS</code> as a view,
+as opposed to a regular table or a custom table.
+Note that single-quotes within the view definition are escaped using a
+back-slash, in the normal way for JSON.
+
+JSON doesn't make it easy to author long strings, so Calcite supports an
+alternative syntax. If your view has a long SQL statement, you can instead
+supply a list of lines rather than a single string:
+
+{% highlight json %}
+{
+  name: 'FEMALE_EMPS',
+  type: 'view',
+  sql: [
+    'SELECT * FROM emps',
+    'WHERE gender = \'F\''
+  ]
+}
+{% endhighlight %}
+
+Now we have defined a view, we can use it in queries just as if it were a table:
+
+{% highlight sql %}
+sqlline> SELECT e.name, d.name FROM female_emps AS e JOIN depts AS d on e.deptno = d.deptno;
++--------+------------+
+|  NAME  |    NAME    |
++--------+------------+
+| Wilma  | Marketing  |
++--------+------------+
+{% endhighlight %}
+
+## Custom tables
+
+Custom tables are tables whose implementation is driven by user-defined code.
+They don't need to live in a custom schema.
+
+There is an example in <code>model-with-custom-table.json</code>:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'CUSTOM_TABLE',
+  schemas: [
+    {
+      name: 'CUSTOM_TABLE',
+      tables: [
+        {
+          name: 'EMPS',
+          type: 'custom',
+          factory: 'org.apache.calcite.adapter.csv.CsvTableFactory',
+          operand: {
+            file: 'target/test-classes/sales/EMPS.csv.gz',
+            flavor: "scannable"
+          }
+        }
+      ]
+    }
+  ]
+}
+{% endhighlight %}
+
+We can query the table in the usual way:
+
+{% highlight sql %}
+sqlline> !connect jdbc:calcite:model=target/test-classes/model-with-custom-table.json admin admin
+sqlline> SELECT empno, name FROM custom_table.emps;
++--------+--------+
+| EMPNO  |  NAME  |
++--------+--------+
+| 100    | Fred   |
+| 110    | Eric   |
+| 110    | John   |
+| 120    | Wilma  |
+| 130    | Alice  |
++--------+--------+
+{% endhighlight %}
+
+The schema is a regular one, and contains a custom table powered by
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableFactory.java">org.apache.calcite.adapter.csv.CsvTableFactory</a>,
+which implements the Calcite interface
+<a href="/apidocs/org/apache/calcite/schema/TableFactory.html">TableFactory</a>.
+Its <code>create</code> method instantiates a <code>CsvScannableTable</code>,
+passing in the <code>file</code> argument from the model file:
+
+{% highlight java %}
+public CsvTable create(SchemaPlus schema, String name,
+    Map<String, Object> map, RelDataType rowType) {
+  String fileName = (String) map.get("file");
+  final File file = new File(fileName);
+  final RelProtoDataType protoRowType =
+      rowType != null ? RelDataTypeImpl.proto(rowType) : null;
+  return new CsvScannableTable(file, protoRowType);
+}
+{% endhighlight %}
+
+Implementing a custom table is often a simpler alternative to implementing
+a custom schema. Both approaches might end up creating a similar implementation
+of the <code>Table</code> interface, but for the custom table you don't
+need to implement metadata discovery. (<code>CsvTableFactory</code>
+creates a <code>CsvScannableTable</code>, just as <code>CsvSchema</code> does,
+but the table implementation does not scan the filesystem for .csv files.)
+
+Custom tables require more work for the author of the model (the author
+needs to specify each table and its file explicitly) but also give the author
+more control (say, providing different parameters for each table).
+
+## Comments in models
+
+Models can include comments using `/* ... */` and `//` syntax:
+
+{% highlight json %}
+{
+  version: '1.0',
+  /* Multi-line
+     comment. */
+  defaultSchema: 'CUSTOM_TABLE',
+  // Single-line comment.
+  schemas: [
+    ..
+  ]
+}
+{% endhighlight %}
+
+(Comments are not standard JSON, but are a harmless extension.)
+
+## Optimizing queries using planner rules
+
+The table implementations we have seen so far are fine as long as the tables
+don't contain a great deal of data. But if your customer table has, say, a
+hundred columns and a million rows, you would rather that the system did not
+retrieve all of the data for every query. You would like Calcite to negotiate
+with the adapter and find a more efficient way of accessing the data.
+
+This negotiation is a simple form of query optimization. Calcite supports query
+optimization by adding <i>planner rules</i>. Planner rules operate by
+looking for patterns in the query parse tree (for instance a project on top
+of a certain kind of table), and
+
+Planner rules are also extensible, like schemas and tables. So, if you have a
+data store that you want to access via SQL, you first define a custom table or
+schema, and then you define some rules to make the access efficient.
+
+To see this in action, let's use a planner rule to access
+a subset of columns from a CSV file. Let's run the same query against two very
+similar schemas:
+
+{% highlight sql %}
+sqlline> !connect jdbc:calcite:model=target/test-classes/model.json admin admin
+sqlline> explain plan for select name from emps;
++-----------------------------------------------------+
+| PLAN                                                |
++-----------------------------------------------------+
+| EnumerableCalcRel(expr#0..9=[{inputs}], NAME=[$t1]) |
+|   EnumerableTableAccessRel(table=[[SALES, EMPS]])   |
++-----------------------------------------------------+
+sqlline> !connect jdbc:calcite:model=target/test-classes/smart.json admin admin
+sqlline> explain plan for select name from emps;
++-----------------------------------------------------+
+| PLAN                                                |
++-----------------------------------------------------+
+| EnumerableCalcRel(expr#0..9=[{inputs}], NAME=[$t1]) |
+|   CsvTableScan(table=[[SALES, EMPS]])               |
++-----------------------------------------------------+
+{% endhighlight %}
+
+What causes the difference in plan? Let's follow the trail of evidence. In the
+<code>smart.json</code> model file, there is just one extra line:
+
+{% highlight json %}
+flavor: "translatable"
+{% endhighlight %}
+
+This causes a <code>CsvSchema</code> to be created with
+<code>flavor = TRANSLATABLE</code>,
+and its <code>createTable</code> method creates instances of
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTranslatableTable.java">CsvTranslatableTable</a>
+rather than a <code>CsvScannableTable</code>.
+
+<code>CsvTranslatableTable</code> implements the
+<code><a href="/apidocs/org/apache/calcite/schema/TranslatableTable.html#toRel()">TranslatableTable.toRel()</a></code>
+method to create
+<a href="{{ sourceRoot }}/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableScan.java">CsvTableScan</a>.
+Table scans are the leaves of a query operator tree.
+The usual implementation is
+<code><a href="/apidocs/org/apache/calcite/adapter/enumerable/EnumerableTableScan.html">EnumerableTableScan</a></code>,
+but we have created a distinctive sub-type that will cause rules to fire.
+
+Here is the rule in its entirety:
+
+{% highlight java %}
+public class CsvProjectTableScanRule extends RelOptRule {
+  public static final CsvProjectTableScanRule INSTANCE =
+      new CsvProjectTableScanRule();
+
+  private CsvProjectTableScanRule() {
+    super(
+        operand(Project.class,
+            operand(CsvTableScan.class, none())),
+        "CsvProjectTableScanRule");
+  }
+
+  @Override
+  public void onMatch(RelOptRuleCall call) {
+    final Project project = call.rel(0);
+    final CsvTableScan scan = call.rel(1);
+    int[] fields = getProjectFields(project.getProjects());
+    if (fields == null) {
+      // Project contains expressions more complex than just field references.
+      return;
+    }
+    call.transformTo(
+        new CsvTableScan(
+            scan.getCluster(),
+            scan.getTable(),
+            scan.csvTable,
+            fields));
+  }
+
+  private int[] getProjectFields(List<RexNode> exps) {
+    final int[] fields = new int[exps.size()];
+    for (int i = 0; i < exps.size(); i++) {
+      final RexNode exp = exps.get(i);
+      if (exp instanceof RexInputRef) {
+        fields[i] = ((RexInputRef) exp).getIndex();
+      } else {
+        return null; // not a simple projection
+      }
+    }
+    return fields;
+  }
+}
+{% endhighlight %}
+
+The constructor declares the pattern of relational expressions that will cause
+the rule to fire.
+
+The <code>onMatch</code> method generates a new relational expression and calls
+<code><a href="/apidocs/org/apache/calcite/plan/RelOptRuleCall.html#transformTo(org.apache.calcite.rel.RelNode)">RelOptRuleCall.transformTo()</a></code>
+to indicate that the rule has fired successfully.
+
+## The query optimization process
+
+There's a lot to say about how clever Calcite's query planner is, but we won't
+say it here. The cleverness is designed to take the burden off you, the writer
+of planner rules.
+
+First, Calcite doesn't fire rules in a prescribed order. The query optimization
+process follows many branches of a branching tree, just like a chess playing
+program examines many possible sequences of moves. If rules A and B both match a
+given section of the query operator tree, then Calcite can fire both.
+
+Second, Calcite uses cost in choosing between plans, but the cost model doesn't
+prevent rules from firing which may seem to be more expensive in the short term.
+
+Many optimizers have a linear optimization scheme. Faced with a choice between
+rule A and rule B, as above, such an optimizer needs to choose immediately. It
+might have a policy such as "apply rule A to the whole tree, then apply rule B
+to the whole tree", or apply a cost-based policy, applying the rule that
+produces the cheaper result.
+
+Calcite doesn't require such compromises.
+This makes it simple to combine various sets of rules.
+If, say you want to combine rules to recognize materialized views with rules to
+read from CSV and JDBC source systems, you just give Calcite the set of all
+rules and tell it to go at it.
+
+Calcite does use a cost model. The cost model decides which plan to ultimately
+use, and sometimes to prune the search tree to prevent the search space from
+exploding, but it never forces you to choose between rule A and rule B. This is
+important, because it avoids falling into local minima in the search space that
+are not actually optimal.
+
+Also (you guessed it) the cost model is pluggable, as are the table and query
+operator statistics it is based upon. But that can be a subject for later.
+
+## JDBC adapter
+
+The JDBC adapter maps a schema in a JDBC data source as a Calcite schema.
+
+For example, this schema reads from a MySQL "foodmart" database:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'FOODMART',
+  schemas: [
+    {
+      name: 'FOODMART',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
+      operand: {
+        jdbcDriver: 'com.mysql.jdbc.Driver',
+        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
+        jdbcUser: 'foodmart',
+        jdbcPassword: 'foodmart'
+      }
+    }
+  ]
+}
+{% endhighlight %}
+
+(The FoodMart database will be familiar to those of you who have used
+the Mondrian OLAP engine, because it is Mondrian's main test data
+set. To load the data set, follow <a
+href="http://mondrian.pentaho.com/documentation/installation.php#2_Set_up_test_data">Mondrian's
+installation instructions</a>.)
+
+<b>Current limitations</b>: The JDBC adapter currently only pushes
+down table scan operations; all other processing (filtering, joins,
+aggregations and so forth) occurs within Calcite. Our goal is to push
+down as much processing as possible to the source system, translating
+syntax, data types and built-in functions as we go. If a Calcite query
+is based on tables from a single JDBC database, in principle the whole
+query should go to that database. If tables are from multiple JDBC
+sources, or a mixture of JDBC and non-JDBC, Calcite will use the most
+efficient distributed query approach that it can.
+
+## The cloning JDBC adapter
+
+The cloning JDBC adapter creates a hybrid database. The data is
+sourced from a JDBC database but is read into in-memory tables the
+first time each table is accessed. Calcite evaluates queries based on
+those in-memory tables, effectively a cache of the database.
+
+For example, the following model reads tables from a MySQL
+"foodmart" database:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'FOODMART_CLONE',
+  schemas: [
+    {
+      name: 'FOODMART_CLONE',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
+      operand: {
+        jdbcDriver: 'com.mysql.jdbc.Driver',
+        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
+        jdbcUser: 'foodmart',
+        jdbcPassword: 'foodmart'
+      }
+    }
+  ]
+}
+{% endhighlight %}
+
+Another technique is to build a clone schema on top of an existing
+schema. You use the <code>source</code> property to reference a schema
+defined earlier in the model, like this:
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'FOODMART_CLONE',
+  schemas: [
+    {
+      name: 'FOODMART',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
+      operand: {
+        jdbcDriver: 'com.mysql.jdbc.Driver',
+        jdbcUrl: 'jdbc:mysql://localhost/foodmart',
+        jdbcUser: 'foodmart',
+        jdbcPassword: 'foodmart'
+      }
+    },
+    {
+      name: 'FOODMART_CLONE',
+      type: 'custom',
+      factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
+      operand: {
+        source: 'FOODMART'
+      }
+    }
+  ]
+}
+{% endhighlight %}
+
+You can use this approach to create a clone schema on any type of
+schema, not just JDBC.
+
+The cloning adapter isn't the be-all and end-all. We plan to develop
+more sophisticated caching strategies, and a more complete and
+efficient implementation of in-memory tables, but for now the cloning
+JDBC adapter shows what is possible and allows us to try out our
+initial implementations.
+
+## Further topics
+
+### Defining a custom schema
+
+(To be written.)
+
+### Modifying data
+
+How to enable DML operations (INSERT, UPDATE and DELETE) on your schema.
+
+(To be written.)
+
+### Calling conventions
+
+(To be written.)
+
+### Statistics and cost
+
+(To be written.)
+
+### Defining and using user-defined functions
+
+(To be written.)
+
+###  Defining tables in a schema
+
+(To be written.)
+
+### Defining custom tables
+
+(To be written.)
+
+### Built-in SQL implementation
+
+How does Calcite implement SQL, if an adapter does not implement all of the core
+relational operators?
+
+(To be written.)
+
+### Table functions
+
+(To be written.)

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/anchor_links.html
----------------------------------------------------------------------
diff --git a/site/_includes/anchor_links.html b/site/_includes/anchor_links.html
new file mode 100644
index 0000000..c584ce5
--- /dev/null
+++ b/site/_includes/anchor_links.html
@@ -0,0 +1,33 @@
+<script>
+  var anchorForId = function (id) {
+    var anchor = document.createElement("a");
+    anchor.className = "header-link";
+    anchor.href      = "#" + id;
+    anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
+    anchor.title = "Permalink";
+    return anchor;
+  };
+
+  var linkifyAnchors = function (level, containingElement) {
+    var headers = containingElement.getElementsByTagName("h" + level);
+    for (var h = 0; h < headers.length; h++) {
+      var header = headers[h];
+
+      if (typeof header.id !== "undefined" && header.id !== "") {
+        header.appendChild(anchorForId(header.id));
+      }
+    }
+  };
+
+  document.onreadystatechange = function () {
+    if (this.readyState === "complete") {
+      var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
+      if (!contentBlock) {
+        return;
+      }
+      for (var level = 1; level <= 6; level++) {
+        linkifyAnchors(level, contentBlock);
+      }
+    }
+  };
+</script>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/docs_contents.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_contents.html b/site/_includes/docs_contents.html
new file mode 100644
index 0000000..2ac64bb
--- /dev/null
+++ b/site/_includes/docs_contents.html
@@ -0,0 +1,8 @@
+<div class="unit one-fifth hide-on-mobiles">
+  <aside>
+    {% for section in site.data.docs %}
+    <h4>{{ section.title }}</h4>
+    {% include docs_ul.html items=section.docs %}
+    {% endfor %}
+  </aside>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/docs_contents_mobile.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_contents_mobile.html b/site/_includes/docs_contents_mobile.html
new file mode 100644
index 0000000..b3e0110
--- /dev/null
+++ b/site/_includes/docs_contents_mobile.html
@@ -0,0 +1,10 @@
+<div class="docs-nav-mobile unit whole show-on-mobiles">
+  <select onchange="if (this.value) window.location.href=this.value">
+    <option value="">Navigate the docs…</option>
+    {% for section in site.data.docs %}
+    <optgroup label="{{ section.title }}">
+      {% include docs_option.html items=section.docs %}
+    </optgroup>
+    {% endfor %}
+  </select>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/docs_option.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_option.html b/site/_includes/docs_option.html
new file mode 100644
index 0000000..0913a59
--- /dev/null
+++ b/site/_includes/docs_option.html
@@ -0,0 +1,11 @@
+{% assign items = include.items %}
+
+{% for item in items %}
+  {% assign item_url = item | prepend:"/docs/" | append:".html" %}
+
+  {% for p in site.docs %}
+    {% if p.url == item_url %}
+      <option value="{{ site.url }}{{ p.url }}">{{ p.title }}</option>
+    {% endif %}
+  {% endfor %}
+{% endfor %}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/docs_ul.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html
new file mode 100644
index 0000000..fa585e6
--- /dev/null
+++ b/site/_includes/docs_ul.html
@@ -0,0 +1,21 @@
+{% assign items = include.items %}
+
+<ul>
+{% for item in items %}
+  {% assign item_url = item | prepend:"/docs/" | append:".html" %}
+
+  {% if item_url == page.url %}
+    {% assign c = "current" %}
+  {% else %}
+    {% assign c = "" %}
+  {% endif %}
+
+  {% for p in site.docs %}
+    {% if p.url == item_url %}
+      <li class="{{ c }}"><a href="{{ site.url }}{{ p.url }}">{{ p.title }}</a></li>
+      {% break %}
+    {% endif %}
+  {% endfor %}
+
+{% endfor %}
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/footer.html
----------------------------------------------------------------------
diff --git a/site/_includes/footer.html b/site/_includes/footer.html
new file mode 100644
index 0000000..1eb6b11
--- /dev/null
+++ b/site/_includes/footer.html
@@ -0,0 +1,19 @@
+<footer role="contentinfo">
+  <p>The contents of this website are &copy;&nbsp;{{ site.time | date: '%Y' }}
+     <a href="https://www.apache.org/">Apache Software Foundation</a>
+     under the terms of
+     the <a href="https://www.apache.org/licenses/LICENSE-2.0.html">
+     Apache&nbsp;License&nbsp;v2</a>. Apache Calcite and its logo are
+     trademarks of the Apache Software Foundation.</p>
+
+  <p>Apache Calcite is an effort undergoing incubation at The Apache
+      Software Foundation (ASF), sponsored by the Apache
+      Incubator. Incubation is required of all newly accepted projects
+      until a further review indicates that the infrastructure,
+      communications, and decision making process have stabilized in a
+      manner consistent with other successful ASF projects. While
+      incubation status is not necessarily a reflection of the
+      completeness or stability of the code, it does indicate that the
+      project has yet to be fully endorsed by the ASF.</p>
+  
+</footer>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/header.html
----------------------------------------------------------------------
diff --git a/site/_includes/header.html b/site/_includes/header.html
new file mode 100644
index 0000000..54f7748
--- /dev/null
+++ b/site/_includes/header.html
@@ -0,0 +1,18 @@
+<header role="banner">
+  <nav class="mobile-nav show-on-mobiles">
+    {% include primary-nav-items.html %}
+  </nav>
+  <div class="grid">
+    <div class="unit one-third center-on-mobiles">
+      <h1>
+        <a href="/">
+          <span class="sr-only">Apache Calcite</span>
+          <img src="/img/logo.png" width="226" height="140" alt="Calcite Logo">
+        </a>
+      </h1>
+    </div>
+    <nav class="main-nav unit two-thirds hide-on-mobiles">
+      {% include primary-nav-items.html %}
+    </nav>
+  </div>
+</header>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/news_contents.html
----------------------------------------------------------------------
diff --git a/site/_includes/news_contents.html b/site/_includes/news_contents.html
new file mode 100644
index 0000000..86a2431
--- /dev/null
+++ b/site/_includes/news_contents.html
@@ -0,0 +1,30 @@
+<div class="unit one-fifth hide-on-mobiles">
+  <aside>
+    <ul>
+      <li class="{% if page.title == 'News' %}current{% endif %}">
+        <a href="/news/">All News</a>
+      </li>
+      <li class="{% if page.title == 'Releases' %}current{% endif %}">
+        <a href="/news/releases/">Calcite Releases</a>
+      </li>
+    </ul>
+    <h4>Recent Releases</h4>
+    <ul>
+      {% for post in site.categories.release limit:5 %}
+      <li class="{% if page.title == post.title %}current{% endif %}">
+        <a href="{{ post.url }}">{{ post.version }}</a>
+      </li>
+      {% endfor %}
+    </ul>
+    <h4>Other News</h4>
+    <ul>
+        {% for post in site.posts %}
+        {% unless post.categories contains 'release' %}
+        <li class="{% if page.title == post.title %}current{% endif %}">
+          <a href="{{ post.url }}">{{ post.title }}</a>
+        </li>
+        {% endunless %}
+        {% endfor %}
+    </ul>
+  </aside>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/news_contents_mobile.html
----------------------------------------------------------------------
diff --git a/site/_includes/news_contents_mobile.html b/site/_includes/news_contents_mobile.html
new file mode 100644
index 0000000..e8fb55e
--- /dev/null
+++ b/site/_includes/news_contents_mobile.html
@@ -0,0 +1,11 @@
+<div class="docs-nav-mobile unit whole show-on-mobiles">
+  <select onchange="if (this.value) window.location.href=this.value">
+    <option value="">Navigate the blog…</option>
+    <option value="/news/">Home</option>
+    <optgroup label="v1.x">
+      {% for post in site.posts %}
+      <option value="{{ post.url }}">{{ post.title }}</option>
+      {% endfor %}
+    </optgroup>
+  </select>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/news_item.html
----------------------------------------------------------------------
diff --git a/site/_includes/news_item.html b/site/_includes/news_item.html
new file mode 100644
index 0000000..e543bc6
--- /dev/null
+++ b/site/_includes/news_item.html
@@ -0,0 +1,45 @@
+<article>
+  <h2>
+    <a href="{{ post.url }}">
+      {{ post.title }}
+    </a>
+  </h2>
+  <span class="post-category">
+    <span class="label">
+      {{ post.categories | array_to_sentence_string }}
+    </span>
+  </span>
+  <div class="post-meta">
+    <span class="post-date">
+      {{ post.date | date_to_string }}
+    </span>
+    {% capture homepage %}http://people.apache.org/~{{ post.author }}{% endcapture %}
+    {% capture avatar %}http://people.apache.org/~{{ post.author }}/{{ post.author }}.jpg{% endcapture %}
+    {% for c in site.data.contributors %}
+      {% if c.apacheId == post.author %}
+        {% if c.homepage %}
+          {% assign homepage = c.homepage %}
+        {% else %}
+          {% capture homepage %}http://github.com/{{ c.githubId }}{% endcapture %}
+        {% endif %}
+        {% if c.avatar %}
+          {% assign avatar = c.avatar %}
+        {% else %}
+          {% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
+        {% endif %}
+      {% endif %}
+    {% endfor %}
+    <a href="{{ homepage }}" class="post-author">
+      <img src="{{ avatar }}"
+           class="avatar" alt="{{ post.author }} avatar"
+           width="24" height="24">
+      {{ post.author }}
+    </a>
+  </div>
+  <div class="post-content">
+    {{ post.content }}
+    {% if post.categories contains 'release' %}
+    <p>See the <a href="/docs/history.html#{{ post.tag }}">release notes</a>.</p>
+    {% endif %}
+  </div>
+</article>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/primary-nav-items.html
----------------------------------------------------------------------
diff --git a/site/_includes/primary-nav-items.html b/site/_includes/primary-nav-items.html
new file mode 100644
index 0000000..297ce65
--- /dev/null
+++ b/site/_includes/primary-nav-items.html
@@ -0,0 +1,20 @@
+<ul>
+  <li class="{% if page.overview %}current{% endif %}">
+    <a href="/">Home</a>
+  </li>
+  <li class="{% if page.url contains '/docs/' %}current{% endif %}">
+    <a href="/docs/">Documentation</a>
+  </li>
+  <li class="{% if page.url contains '/talks/' %}current{% endif %}">
+    <a href="/talks/">Talks</a>
+  </li>
+  <li class="{% if page.url contains '/news/' %}current{% endif %}">
+    <a href="/news/">News</a>
+  </li>
+  <li class="{% if page.url contains '/help/' %}current{% endif %}">
+    <a href="/help/">Help</a>
+  </li>
+  <li class="{% if page.url contains '/develop/' %}current{% endif %}">
+    <a href="/develop/">Develop</a>
+  </li>
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/section_nav.html
----------------------------------------------------------------------
diff --git a/site/_includes/section_nav.html b/site/_includes/section_nav.html
new file mode 100644
index 0000000..1b3bca1
--- /dev/null
+++ b/site/_includes/section_nav.html
@@ -0,0 +1,39 @@
+{% comment %}
+Map grabs the doc sections, giving us an array of arrays. Join, flattens all
+the items to a comma delimited string. Split turns it into an array again.
+{% endcomment %}
+{% assign docs = site.data.docs | map: 'docs' | join: ',' | split: ',' %}
+
+{% comment %}
+Because this is built for every page, lets find where we are in the ordered
+document list by comparing url strings. Then if there's something previous or
+next, lets build a link to it.
+{% endcomment %}
+
+{% for document in docs %}
+  {% assign document_url = document | prepend:"/docs/" | append:".html" %}
+  {% if document_url == page.url %}
+    <div class="section-nav">
+      <div class="left align-right">
+          {% if forloop.first %}
+            <span class="prev disabled">Previous</span>
+          {% else %}
+            {% assign previous = forloop.index0 | minus: 1 %}
+            {% assign previous_page = docs[previous] | prepend:"/docs/" | append:".html" %}
+            <a href="{{ previous_page }}" class="prev">Previous</a>
+          {% endif %}
+      </div>
+      <div class="right align-left">
+          {% if forloop.last %}
+            <span class="next disabled">Next</span>
+          {% else %}
+            {% assign next = forloop.index0 | plus: 1 %}
+            {% assign next_page = docs[next] | prepend:"/docs/" | append:".html" %}
+            <a href="{{ next_page }}" class="next">Next</a>
+          {% endif %}
+      </div>
+    </div>
+    <div class="clear"></div>
+    {% break %}
+  {% endif %}
+{% endfor %}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_includes/top.html
----------------------------------------------------------------------
diff --git a/site/_includes/top.html b/site/_includes/top.html
new file mode 100644
index 0000000..a4c04e7
--- /dev/null
+++ b/site/_includes/top.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+  <meta charset="UTF-8">
+  <title>{{ page.title }}</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <meta name="generator" content="Jekyll v{{ jekyll.version }}">
+  <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
+  <link rel="stylesheet" href="/css/screen.css">
+  <link rel="icon" type="image/x-icon" href="/favicon.ico">
+  <!--[if lt IE 9]>
+  <script src="/js/html5shiv.min.js"></script>
+  <script src="/js/respond.min.js"></script>
+  <![endif]-->
+</head>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/default.html
----------------------------------------------------------------------
diff --git a/site/_layouts/default.html b/site/_layouts/default.html
new file mode 100644
index 0000000..f734c79
--- /dev/null
+++ b/site/_layouts/default.html
@@ -0,0 +1,12 @@
+{% include top.html %}
+
+<body class="wrap">
+  {% include header.html %}
+
+  {{ content }}
+
+  {% include footer.html %}
+  {% include anchor_links.html %}
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/docs.html
----------------------------------------------------------------------
diff --git a/site/_layouts/docs.html b/site/_layouts/docs.html
new file mode 100644
index 0000000..a0a8a5c
--- /dev/null
+++ b/site/_layouts/docs.html
@@ -0,0 +1,23 @@
+---
+layout: default
+---
+
+  <section class="docs">
+    <div class="grid">
+
+      {% include docs_contents_mobile.html %}
+
+      <div class="unit four-fifths">
+        <article>
+          <h1>{{ page.title }}</h1>
+          {{ content }}
+          {% include section_nav.html %}
+        </article>
+      </div>
+
+      {% include docs_contents.html %}
+
+      <div class="clear"></div>
+
+    </div>
+  </section>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/external.html
----------------------------------------------------------------------
diff --git a/site/_layouts/external.html b/site/_layouts/external.html
new file mode 100644
index 0000000..b934309
--- /dev/null
+++ b/site/_layouts/external.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>{{ page.title }}</title>
+
+    <meta http-equiv="refresh" content="0;url={{ page.external_url }}">
+  </head>
+  <body><!-- Google Analytics JavaScript --></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/news.html
----------------------------------------------------------------------
diff --git a/site/_layouts/news.html b/site/_layouts/news.html
new file mode 100644
index 0000000..8f7945f
--- /dev/null
+++ b/site/_layouts/news.html
@@ -0,0 +1,19 @@
+---
+layout: default
+---
+
+  <section class="news">
+    <div class="grid">
+
+      {% include news_contents_mobile.html %}
+
+      <div class="unit four-fifths">
+        {{ content }}
+      </div>
+
+      {% include news_contents.html %}
+
+      <div class="clear"></div>
+
+    </div>
+  </section>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/news_item.html
----------------------------------------------------------------------
diff --git a/site/_layouts/news_item.html b/site/_layouts/news_item.html
new file mode 100644
index 0000000..7981dc1
--- /dev/null
+++ b/site/_layouts/news_item.html
@@ -0,0 +1,48 @@
+---
+layout: news
+---
+
+<article>
+  <h2>
+    {{ page.title }}
+    <a href="{{ page.url }}" class="permalink" title="Permalink">∞</a>
+  </h2>
+  <span class="post-category">
+    <span class="label">
+      {{ page.categories | array_to_sentence_string }}
+    </span>
+  </span>
+  <div class="post-meta">
+    <span class="post-date">
+      {{ page.date | date_to_string }}
+    </span>
+    {% capture homepage %}http://people.apache.org/~{{ page.author }}{% endcapture %}
+    {% capture avatar %}http://people.apache.org/~{{ page.author }}/{{ page.author }}.jpg{% endcapture %}
+    {% for c in site.data.contributors %}
+      {% if c.apacheId == page.author %}
+        {% if c.homepage %}
+          {% assign homepage = c.homepage %}
+        {% else %}
+          {% capture homepage %}http://github.com/{{ c.githubId }}{% endcapture %}
+        {% endif %}
+        {% if c.avatar %}
+          {% assign avatar = c.avatar %}
+        {% else %}
+          {% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
+        {% endif %}
+      {% endif %}
+    {% endfor %}
+    <a href="{{ homepage }}" class="post-author">
+      <img src="{{ avatar }}"
+           class="avatar" alt="{{ page.author }} avatar"
+           width="24" height="24">
+      {{ page.author }}
+    </a>
+  </div>
+  <div class="post-content">
+    {{ content }}
+    {% if page.categories contains 'release' %}
+    <p>See the <a href="/docs/history.html#{{ page.tag }}">release notes</a>.</p>
+    {% endif %}
+  </div>
+</article>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_layouts/page.html
----------------------------------------------------------------------
diff --git a/site/_layouts/page.html b/site/_layouts/page.html
new file mode 100644
index 0000000..bae31bb
--- /dev/null
+++ b/site/_layouts/page.html
@@ -0,0 +1,18 @@
+---
+layout: default
+---
+
+<section class="standalone">
+  <div class="grid">
+
+    <div class="unit whole">
+      <article>
+        <h1>{{ page.title }}</h1>
+        {{ content }}
+      </article>
+    </div>
+
+    <div class="clear"></div>
+
+  </div>
+</section>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2014-06-27-release-0.8.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2014-06-27-release-0.8.0-incubating.md b/site/_posts/2014-06-27-release-0.8.0-incubating.md
new file mode 100644
index 0000000..32188eb
--- /dev/null
+++ b/site/_posts/2014-06-27-release-0.8.0-incubating.md
@@ -0,0 +1,11 @@
+---
+layout: news_item
+date: "2014-06-27 00:00:00 -0800"
+author: jhyde
+version: 0.8
+tag: v0-8
+sha: 3da850a1
+categories: [release]
+---
+
+This is the first release under the Apache incubator process.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2014-08-19-release-0.9.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2014-08-19-release-0.9.0-incubating.md b/site/_posts/2014-08-19-release-0.9.0-incubating.md
new file mode 100644
index 0000000..1826487
--- /dev/null
+++ b/site/_posts/2014-08-19-release-0.9.0-incubating.md
@@ -0,0 +1,12 @@
+---
+layout: news_item
+date: "2014-08-19 00:00:00 -0800"
+author: jhyde
+version: 0.9.0-incubating
+fullVersion: apache-optiq-0.9.0-incubating
+tag: v0-9-0
+sha: 45e5269b
+categories: [release]
+---
+
+This is the first release under the Apache incubator process.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2014-10-02-release-0.9.1-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2014-10-02-release-0.9.1-incubating.md b/site/_posts/2014-10-02-release-0.9.1-incubating.md
new file mode 100644
index 0000000..ce0d6d0
--- /dev/null
+++ b/site/_posts/2014-10-02-release-0.9.1-incubating.md
@@ -0,0 +1,11 @@
+---
+layout: news_item
+date: "2014-10-02 00:00:00 -0800"
+author: jhyde
+version: 0.9.1-incubating
+tag: v0-9-1
+sha: 68012573
+categories: [release]
+---
+
+This is the first release as Calcite. (The project was previously called Optiq.)

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2014-11-05-release-0.9.2-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2014-11-05-release-0.9.2-incubating.md b/site/_posts/2014-11-05-release-0.9.2-incubating.md
new file mode 100644
index 0000000..ef0746b
--- /dev/null
+++ b/site/_posts/2014-11-05-release-0.9.2-incubating.md
@@ -0,0 +1,14 @@
+---
+layout: news_item
+date: "2014-11-05 00:00:00 -0800"
+author: jhyde
+version: 0.9.2-incubating
+tag: v0-9-2
+sha: 0404fd23
+categories: [release]
+---
+
+A fairly minor release, and last release before we rename all of the
+packages and lots of classes, in what we expect to call 1.0. If you
+have an existing application, it's worth upgrading to this first,
+before you move on to 1.0.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2015-01-31-release-1.0.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-01-31-release-1.0.0-incubating.md b/site/_posts/2015-01-31-release-1.0.0-incubating.md
new file mode 100644
index 0000000..ef9467f
--- /dev/null
+++ b/site/_posts/2015-01-31-release-1.0.0-incubating.md
@@ -0,0 +1,24 @@
+---
+layout: news_item
+date: "2015-01-31 19:03:07 -0800"
+author: jhyde
+version: 1.0.0-incubating
+tag: v1-0-0
+sha: 2dd83f2
+categories: [release]
+---
+
+Calcite's first major release.
+
+Since the previous release we have re-organized the into the `org.apache.calcite`
+namespace. To make migration of your code easier, we have described the
+<a href="https://issues.apache.org/jira/secure/attachment/12681620/mapping.txt">mapping from old to new class names</a>
+as an attachment to
+[<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>].
+
+The release adds SQL support for `GROUPING SETS`, `EXTEND`, `UPSERT` and sequences;
+a remote JDBC driver;
+improvements to the planner engine and built-in planner rules;
+improvements to the algorithms that implement the relational algebra,
+including an interpreter that can evaluate queries without compilation;
+and fixes about 30 bugs.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2015-03-13-release-1.1.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-03-13-release-1.1.0-incubating.md b/site/_posts/2015-03-13-release-1.1.0-incubating.md
new file mode 100644
index 0000000..e921459
--- /dev/null
+++ b/site/_posts/2015-03-13-release-1.1.0-incubating.md
@@ -0,0 +1,23 @@
+---
+layout: news_item
+date: "2015-03-13 19:03:07 -0800"
+author: jhyde
+version: 1.1.0-incubating
+tag: v1-1-0
+sha: f10ea367
+categories: [release]
+---
+
+This Calcite release makes it possible to exploit physical properties
+of relational expressions to produce more efficient plans, introducing
+collation and distribution as traits, `Exchange` relational operator,
+and several new forms of metadata.
+
+We add experimental support for streaming SQL.
+
+This release drops support for JDK 1.6; Calcite now requires 1.7 or
+later.
+
+We have introduced static `create` methods for many sub-classes of
+`RelNode`. We strongly suggest that you use these rather than
+calling constructors directly.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2015-04-07-release-1.2.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-04-07-release-1.2.0-incubating.md b/site/_posts/2015-04-07-release-1.2.0-incubating.md
new file mode 100644
index 0000000..43bb6e3
--- /dev/null
+++ b/site/_posts/2015-04-07-release-1.2.0-incubating.md
@@ -0,0 +1,23 @@
+---
+layout: news_item
+date: "2015-04-07 19:03:07 -0800"
+author: jhyde
+version: 1.2.0-incubating
+tag: v1-2-0
+sha: d60f2aa
+categories: [release]
+---
+
+A short release, less than a month after 1.1.
+
+There have been many changes to Avatica, hugely improving its coverage of the
+JDBC API and overall robustness. A new provider, `JdbcMeta`, allows
+you to remote an existing JDBC driver.
+
+[<a href="https://issues.apache.org/jira/browse/CALCITE-606">CALCITE-606</a>]
+improves how the planner propagates traits such as collation and
+distribution among relational expressions.
+
+[<a href="https://issues.apache.org/jira/browse/CALCITE-613">CALCITE-613</a>]
+and [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
+improve implicit and explicit conversions in SQL.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2015-04-24-new-committers.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-04-24-new-committers.md b/site/_posts/2015-04-24-new-committers.md
new file mode 100644
index 0000000..a0798c2
--- /dev/null
+++ b/site/_posts/2015-04-24-new-committers.md
@@ -0,0 +1,16 @@
+---
+layout: news_item
+title: "Calcite adds 5 committers"
+date: "2015-04-24 19:03:07 -0800"
+author: jhyde
+categories: [team]
+---
+
+The Calcite project management committee today added five new
+committers for their work on Calcite. Welcome all!
+
+* Aman Sinha
+* Jesús Camacho-Rodríguez
+* Jinfeng Ni
+* John Pullokkaran
+* Nick Dimiduk

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_posts/2015-05-30-release-1.3.0-incubating.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-05-30-release-1.3.0-incubating.md b/site/_posts/2015-05-30-release-1.3.0-incubating.md
new file mode 100644
index 0000000..3ea81ba
--- /dev/null
+++ b/site/_posts/2015-05-30-release-1.3.0-incubating.md
@@ -0,0 +1,15 @@
+---
+layout: news_item
+date: "2015-05-30 23:05:37 +0000"
+author: jhyde
+version: 1.3.0-incubating
+categories: [release]
+tag: v1-3-0
+sha: 495f1859
+---
+
+Mainly bug-fixes, but this release adds support for
+<a href="https://issues.apache.org/jira/browse/CALCITE-505">modifiable views</a>
+and
+<a href="https://issues.apache.org/jira/browse/CALCITE-704">filtered aggregate functions</a>
+and various improvements to Avatica.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_font-awesome.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_font-awesome.scss b/site/_sass/_font-awesome.scss
new file mode 100644
index 0000000..d90676c
--- /dev/null
+++ b/site/_sass/_font-awesome.scss
@@ -0,0 +1,25 @@
+/*!
+ *  Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+@font-face {
+  font-family: 'FontAwesome';
+  src: url('../fonts/fontawesome-webfont.eot?v=4.2.0');
+  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
+  font-weight: normal;
+  font-style: normal;
+}
+.fa {
+  display: inline-block;
+  font: normal normal normal 14px/1 FontAwesome;
+  font-size: inherit;
+  text-rendering: auto;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.fa-link:before {
+  content: "\f0c1";
+}
+.fa-pencil:before {
+  content: "\f040";
+}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_gridism.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_gridism.scss b/site/_sass/_gridism.scss
new file mode 100644
index 0000000..61698ef
--- /dev/null
+++ b/site/_sass/_gridism.scss
@@ -0,0 +1,124 @@
+/*
+ * Gridism
+ * A simple, responsive, and handy CSS grid by @cobyism
+ * https://github.com/cobyism/gridism
+ */
+
+/* Preserve some sanity */
+.grid,
+.unit {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+/* Set up some rules to govern the grid */
+.grid {
+  display: block;
+  clear: both;
+}
+.grid .unit {
+  float: left;
+  width: 100%;
+  padding: 10px;
+}
+
+/* This ensures the outer gutters are equal to the (doubled) inner gutters. */
+.grid .unit:first-child { padding-left: 20px; }
+.grid .unit:last-child { padding-right: 20px; }
+
+/* Nested grids already have padding though, so let’s nuke it */
+.unit .unit:first-child { padding-left: 0; }
+.unit .unit:last-child { padding-right: 0; }
+.unit .grid:first-child > .unit { padding-top: 0; }
+.unit .grid:last-child > .unit { padding-bottom: 0; }
+
+/* Let people nuke the gutters/padding completely in a couple of ways */
+.no-gutters .unit,
+.unit.no-gutters {
+  padding: 0 !important;
+}
+
+/* Wrapping at a maximum width is optional */
+.wrap .grid,
+.grid.wrap {
+  max-width: 978px;
+  margin: 0 auto;
+}
+
+/* Width classes also have shorthand versions numbered as fractions
+ * For example: for a grid unit 1/3 (one third) of the parent width,
+ * simply apply class="w-1-3" to the element. */
+.grid .whole,          .grid .w-1-1 { width: 100%; }
+.grid .half,           .grid .w-1-2 { width: 50%; }
+.grid .one-third,      .grid .w-1-3 { width: 33.3332%; }
+.grid .two-thirds,     .grid .w-2-3 { width: 66.6665%; }
+.grid .one-quarter,
+.grid .one-fourth,     .grid .w-1-4 { width: 25%; }
+.grid .three-quarters,
+.grid .three-fourths,  .grid .w-3-4 { width: 75%; }
+.grid .one-fifth,      .grid .w-1-5 { width: 20%; }
+.grid .two-fifths,     .grid .w-2-5 { width: 40%; }
+.grid .three-fifths,   .grid .w-3-5 { width: 60%; }
+.grid .four-fifths,    .grid .w-4-5 { width: 80%; }
+.grid .golden-small,   .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */
+.grid .golden-large,   .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */
+
+/* Clearfix after every .grid */
+.grid {
+  *zoom: 1;
+}
+.grid:before, .grid:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.grid:after {
+  clear: both;
+}
+
+/* Utility classes */
+.align-center { text-align: center; }
+.align-left   { text-align: left; }
+.align-right  { text-align: right; }
+.pull-left    { float: left; }
+.pull-right   { float: right; }
+
+/* A property for a better rendering of images in units: in
+   this way bigger pictures are just resized if the unit
+   becomes smaller */
+.unit img {
+  max-width: 100%;
+}
+
+/* Responsive Stuff */
+@media screen and (max-width: 568px) {
+  /* Stack anything that isn’t full-width on smaller screens 
+     and doesn't provide the no-stacking-on-mobiles class */
+  .grid:not(.no-stacking-on-mobiles) > .unit {
+    width: 100% !important;
+    padding-left: 20px;
+    padding-right: 20px;
+  }
+  .unit .grid .unit {
+    padding-left: 0px;
+    padding-right: 0px;
+  }
+
+  /* Sometimes, you just want to be different on small screens */
+  .center-on-mobiles {
+    text-align: center !important;
+  }
+  .hide-on-mobiles {
+    display: none !important;
+  }
+}
+
+/* Expand the wrap a bit further on larger screens */
+@media screen and (min-width: 1180px) {
+  .wider .grid,
+  .grid.wider {
+    max-width: 1180px;
+    margin: 0 auto;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_mixins.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_mixins.scss b/site/_sass/_mixins.scss
new file mode 100644
index 0000000..5b9bb43
--- /dev/null
+++ b/site/_sass/_mixins.scss
@@ -0,0 +1,38 @@
+@mixin box-shadow($shadow...) {
+  -webkit-box-shadow: $shadow;
+     -moz-box-shadow: $shadow;
+          box-shadow: $shadow;
+}
+
+@mixin border-radius($radius...) {
+  -webkit-border-radius: $radius;
+     -moz-border-radius: $radius;
+          border-radius: $radius;
+}
+
+@mixin border-top-left-radius($radius...) {
+  -webkit-border-top-left-radius: $radius;
+     -moz-border-radius-topleft:  $radius;
+          border-top-left-radius: $radius;
+}
+
+@mixin border-top-right-radius($radius...) {
+  -webkit-border-top-right-radius: $radius;
+     -moz-border-radius-topright:  $radius;
+          border-top-right-radius: $radius;
+}
+
+@mixin transition($transition...) {
+  -webkit-transition: $transition;
+     -moz-transition: $transition;
+       -o-transition: $transition;
+          transition: $transition;
+}
+
+@mixin user-select($select...) {
+  -webkit-user-select: $select;    /* Chrome all / Safari all */
+     -moz-user-select: $select;    /* Firefox all */
+      -ms-user-select: $select;    /* IE 10+ */
+       -o-user-select: $select;
+          user-select: $select;
+}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_normalize.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_normalize.scss b/site/_sass/_normalize.scss
new file mode 100644
index 0000000..f6e0b65
--- /dev/null
+++ b/site/_sass/_normalize.scss
@@ -0,0 +1 @@
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{
 color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
\ No newline at end of file


[05/19] incubator-calcite git commit: Make JdbcTest.testVersion more permissive, so that version.major and version.minor can be set just before a release, rather than just after as at present

Posted by jh...@apache.org.
Make JdbcTest.testVersion more permissive, so that version.major and version.minor can be set just before a release, rather than just after as at present


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

Branch: refs/heads/master
Commit: fcab7a8879dde62aa0fe593dcd210acc97524b42
Parents: 6b16ca5
Author: Julian Hyde <jh...@apache.org>
Authored: Wed May 27 17:40:15 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed May 27 17:47:15 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/calcite/test/JdbcTest.java  | 56 +++++++++++---------
 doc/howto.md                                    |  1 +
 2 files changed, 33 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/fcab7a88/core/src/test/java/org/apache/calcite/test/JdbcTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
index 164af78..342e5bc 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
@@ -1049,42 +1049,50 @@ public class JdbcTest {
     assertEquals("Calcite JDBC Driver", metaData.getDriverName());
 
     final String driverVersion = metaData.getDriverVersion();
-    final int driverMajorVersion = metaData.getDriverMajorVersion();
-    final int driverMinorVersion = metaData.getDriverMinorVersion();
-    assertEquals(1, driverMajorVersion);
-    assertTrue(driverMinorVersion >= 0 && driverMinorVersion < 10);
+    final int driverMajor = metaData.getDriverMajorVersion();
+    final int driverMinor = metaData.getDriverMinorVersion();
+    assertEquals(1, driverMajor);
+    assertTrue(driverMinor >= 0 && driverMinor < 10);
 
     assertEquals("Calcite", metaData.getDatabaseProductName());
-    final String databaseProductVersion =
+    final String databaseVersion =
         metaData.getDatabaseProductVersion();
-    final int databaseMajorVersion = metaData.getDatabaseMajorVersion();
-    assertEquals(driverMajorVersion, databaseMajorVersion);
-    final int databaseMinorVersion = metaData.getDatabaseMinorVersion();
-    assertEquals(driverMinorVersion, databaseMinorVersion);
+    final int databaseMajor = metaData.getDatabaseMajorVersion();
+    assertEquals(driverMajor, databaseMajor);
+    final int databaseMinor = metaData.getDatabaseMinorVersion();
+    assertEquals(driverMinor, databaseMinor);
 
     // Check how version is composed of major and minor version. Note that
     // version is stored in pom.xml; major and minor version are
     // stored in org-apache-calcite-jdbc.properties, but derived from
     // version.major and version.minor in pom.xml.
-    assertTrue(driverVersion.startsWith(driverMajorVersion + "."));
-    String[] split = driverVersion.split("\\.");
-    assertTrue(split.length >= 2);
-    String majorMinor = driverMajorVersion + "." + driverMinorVersion;
-    assertTrue(driverVersion.equals(majorMinor)
-        || driverVersion.startsWith(majorMinor + ".")
-        || driverVersion.startsWith(majorMinor + "-"));
-
-    assertTrue(databaseProductVersion.startsWith("1."));
-    split = databaseProductVersion.split("\\.");
-    assertTrue(split.length >= 2);
-    majorMinor = databaseMajorVersion + "." + databaseMinorVersion;
-    assertTrue(databaseProductVersion.equals(majorMinor)
-        || databaseProductVersion.startsWith(majorMinor + ".")
-        || databaseProductVersion.startsWith(majorMinor + "-"));
+    //
+    // We are more permissive for snapshots.
+    // For instance, we allow 1.4.0-SNAPSHOT to match {major=1, minor=3}.
+    // Previously, this test would break the first build after a release.
+    assertTrue(driverVersion.startsWith(driverMajor + "."));
+    assertTrue(driverVersion.split("\\.").length >= 2);
+    assertTrue(driverVersion.equals(mm(driverMajor, driverMinor))
+        || driverVersion.startsWith(mm(driverMajor, driverMinor) + ".")
+        || driverVersion.startsWith(mm(driverMajor, driverMinor) + "-")
+        || driverVersion.endsWith("-SNAPSHOT")
+            && driverVersion.startsWith(mm(driverMajor, driverMinor + 1)));
+
+    assertTrue(databaseVersion.startsWith("1."));
+    assertTrue(databaseVersion.split("\\.").length >= 2);
+    assertTrue(databaseVersion.equals(mm(databaseMajor, databaseMinor))
+        || databaseVersion.startsWith(mm(databaseMajor, databaseMinor) + ".")
+        || databaseVersion.startsWith(mm(databaseMajor, databaseMinor) + "-")
+        || databaseVersion.endsWith("-SNAPSHOT")
+            && databaseVersion.startsWith(mm(driverMajor, driverMinor + 1)));
 
     connection.close();
   }
 
+  private String mm(int majorVersion, int minorVersion) {
+    return majorVersion + "." + minorVersion;
+  }
+
   /** Tests driver's implementation of {@link DatabaseMetaData#getColumns}. */
   @Test public void testMetaDataColumns()
       throws ClassNotFoundException, SQLException {

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/fcab7a88/doc/howto.md
----------------------------------------------------------------------
diff --git a/doc/howto.md b/doc/howto.md
index 16b722a..96c9d71 100644
--- a/doc/howto.md
+++ b/doc/howto.md
@@ -399,6 +399,7 @@ Before you start:
 * Set up signing keys as described above.
 * Make sure you are using JDK 1.7 (not 1.8).
 * Check that `README`, `README.md` and `doc/howto.md` have the correct version number.
+* Set `version.major` and `version.minor` in `pom.xml`.
 * Make sure build and tests succeed, including with
   -Dcalcite.test.db={mysql,hsqldb}, -Dcalcite.test.slow=true,
   -Dcalcite.test.mongodb=true, -Dcalcite.test.splunk=true.


[09/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/fonts/fontawesome-webfont.svg
----------------------------------------------------------------------
diff --git a/site/fonts/fontawesome-webfont.svg b/site/fonts/fontawesome-webfont.svg
new file mode 100755
index 0000000..d907b25
--- /dev/null
+++ b/site/fonts/fontawesome-webfont.svg
@@ -0,0 +1,520 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" "  horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#xd8;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" horiz-adv-x="1537" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" horiz-adv-x="1537" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t1
 9 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28
 t28 -68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="&#xf016;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
+<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -1
 13 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
+<glyph unicode="&#xf035;" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41
 .5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t
 -22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
+<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf082;" d="M1536 160q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5v-960z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 
 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 
 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
+<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17
 t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-1
 5 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q
 -15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/fonts/fontawesome-webfont.ttf
----------------------------------------------------------------------
diff --git a/site/fonts/fontawesome-webfont.ttf b/site/fonts/fontawesome-webfont.ttf
new file mode 100755
index 0000000..96a3639
Binary files /dev/null and b/site/fonts/fontawesome-webfont.ttf differ



[10/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_pygments.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_pygments.scss b/site/_sass/_pygments.scss
new file mode 100644
index 0000000..2858bcd
--- /dev/null
+++ b/site/_sass/_pygments.scss
@@ -0,0 +1,78 @@
+.highlight {
+  .hll { background-color: #ffffcc }
+  .c { color: #87ceeb} /* Comment */
+  .err { color: #ffffff} /* Error */
+  .g { color: #ffffff} /* Generic */
+  .k { color: #f0e68c} /* Keyword */
+  .l { color: #ffffff} /* Literal */
+  .n { color: #ffffff} /* Name */
+  .o { color: #ffffff} /* Operator */
+  .x { color: #ffffff} /* Other */
+  .p { color: #ffffff} /* Punctuation */
+  .cm { color: #87ceeb} /* Comment.Multiline */
+  .cp { color: #cd5c5c} /* Comment.Preproc */
+  .c1 { color: #87ceeb} /* Comment.Single */
+  .cs { color: #87ceeb} /* Comment.Special */
+  .gd { color: #0000c0; font-weight: bold; background-color: #008080 } /* Generic.Deleted */
+  .ge { color: #c000c0; text-decoration: underline} /* Generic.Emph */
+  .gr { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Error */
+  .gh { color: #cd5c5c} /* Generic.Heading */
+  .gi { color: #ffffff; background-color: #0000c0 } /* Generic.Inserted */
+  span.go { color: #add8e6; font-weight: bold; background-color: #4d4d4d } /* Generic.Output, qualified with span to prevent applying this style to the Go language, see #1153. */
+  .gp { color: #ffffff} /* Generic.Prompt */
+  .gs { color: #ffffff} /* Generic.Strong */
+  .gu { color: #cd5c5c} /* Generic.Subheading */
+  .gt { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Traceback */
+  .kc { color: #f0e68c} /* Keyword.Constant */
+  .kd { color: #f0e68c} /* Keyword.Declaration */
+  .kn { color: #f0e68c} /* Keyword.Namespace */
+  .kp { color: #f0e68c} /* Keyword.Pseudo */
+  .kr { color: #f0e68c} /* Keyword.Reserved */
+  .kt { color: #bdb76b} /* Keyword.Type */
+  .ld { color: #ffffff} /* Literal.Date */
+  .m { color: #ffffff} /* Literal.Number */
+  .s { color: #ffffff} /* Literal.String */
+  .na { color: #ffffff} /* Name.Attribute */
+  .nb { color: #ffffff} /* Name.Builtin */
+  .nc { color: #ffffff} /* Name.Class */
+  .no { color: #ffa0a0} /* Name.Constant */
+  .nd { color: #ffffff} /* Name.Decorator */
+  .ni { color: #ffdead} /* Name.Entity */
+  .ne { color: #ffffff} /* Name.Exception */
+  .nf { color: #ffffff} /* Name.Function */
+  .nl { color: #ffffff} /* Name.Label */
+  .nn { color: #ffffff} /* Name.Namespace */
+  .nx { color: #ffffff} /* Name.Other */
+  .py { color: #ffffff} /* Name.Property */
+  .nt { color: #f0e68c} /* Name.Tag */
+  .nv { color: #98fb98} /* Name.Variable */
+  .ow { color: #ffffff} /* Operator.Word */
+  .w { color: #ffffff} /* Text.Whitespace */
+  .mf { color: #ffffff} /* Literal.Number.Float */
+  .mh { color: #ffffff} /* Literal.Number.Hex */
+  .mi { color: #ffffff} /* Literal.Number.Integer */
+  .mo { color: #ffffff} /* Literal.Number.Oct */
+  .sb { color: #ffffff} /* Literal.String.Backtick */
+  .sc { color: #ffffff} /* Literal.String.Char */
+  .sd { color: #ffffff} /* Literal.String.Doc */
+  .s2 { color: #ffffff} /* Literal.String.Double */
+  .se { color: #ffffff} /* Literal.String.Escape */
+  .sh { color: #ffffff} /* Literal.String.Heredoc */
+  .si { color: #ffffff} /* Literal.String.Interpol */
+  .sx { color: #ffffff} /* Literal.String.Other */
+  .sr { color: #ffffff} /* Literal.String.Regex */
+  .s1 { color: #ffffff} /* Literal.String.Single */
+  .ss { color: #ffffff} /* Literal.String.Symbol */
+  .bp { color: #ffffff} /* Name.Builtin.Pseudo */
+  .vc { color: #98fb98} /* Name.Variable.Class */
+  .vg { color: #98fb98} /* Name.Variable.Global */
+  .vi { color: #98fb98} /* Name.Variable.Instance */
+  .il { color: #ffffff} /* Literal.Number.Integer.Long */
+  .bash .nv {
+    -webkit-user-select: none;
+       -moz-user-select: none;
+        -ms-user-select: none;
+         -o-user-select: none;
+            user-select: none;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_sass/_style.scss
----------------------------------------------------------------------
diff --git a/site/_sass/_style.scss b/site/_sass/_style.scss
new file mode 100644
index 0000000..d6e832a
--- /dev/null
+++ b/site/_sass/_style.scss
@@ -0,0 +1,976 @@
+/* Base */
+
+* {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+body {
+  font: 300 21px Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  color: #ddd;
+  background-color: #333;
+  border-top: 5px solid #33adff;
+  @include box-shadow(inset 0 3px 30px rgba(0,0,0,.3));
+  text-shadow: 0 1px 3px rgba(0,0,0,.5);
+  -webkit-font-feature-settings: "kern" 1;
+  -moz-font-feature-settings: "kern" 1;
+  -o-font-feature-settings: "kern" 1;
+  font-feature-settings: "kern" 1;
+  font-kerning: normal;
+}
+
+.clear {
+  display: block;
+}
+
+.clear:after {
+  content: " ";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}
+
+/* Sections */
+
+header,
+section,
+footer {
+  float: left;
+  width: 100%;
+  clear: both;
+}
+
+/* Header */
+
+header {
+
+  h1,
+  nav { display: inline-block; }
+
+}
+
+nav {
+
+  ul {
+    padding: 0;
+    margin: 0;
+  }
+
+  li { display: inline-block; }
+}
+
+.main-nav {
+  margin-top: 52px;
+
+  li {
+    margin-right: 10px;
+
+    a {
+      @include border-radius(5px);
+      font-weight: 900;
+      font-size: 14px;
+      padding: 0.5em 1em;
+      text-shadow: none;
+      text-transform: uppercase;
+      @include transition(all .25s);
+
+      &:hover {
+        background-color: #252525;
+        @include box-shadow(inset 0 1px 3px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.1));
+        text-shadow: 0 1px 3px rgba(0,0,0,.5);
+      }
+    }
+
+    &.current {
+
+      a {
+        background-color: #33adff;
+        color: #222;
+        @include box-shadow(inset 0 1px 0 rgba(255,255,255,.5), 0 1px 5px rgba(0,0,0,.5));
+        text-shadow: 0 1px 0 rgba(255,255,255,.3);
+      }
+    }
+  }
+}
+
+.mobile-nav {
+
+  ul {
+    overflow: hidden;
+    width: 100%;
+    display: table;
+  }
+
+  a {
+    float: left;
+    width: 100%;
+    background-color: #333;
+    color: #33adff;
+    text-align: center;
+    text-transform: uppercase;
+    font-size: 14px;
+    font-weight: 900;
+    padding: 5px;
+    @include border-radius(5px);
+  }
+
+  li {
+    display: table-cell;
+    width: 20%;
+    padding: 8px 2px;
+  }
+
+  .current {
+
+    a {
+      background-color: #33adff;
+      color: #222;
+      @include box-shadow(inset 0 1px 0 rgba(255,255,255,.5), 0 1px 5px rgba(0,0,0,.5));
+      text-shadow: 0 1px 0 rgba(255,255,255,.3);
+    }
+  }
+}
+
+/*
+ * This code is courtesy Ben Balter, modified by Parker Moore.
+ * http://ben.balter.com/2014/03/13/pages-anchor-links/
+ */
+.header-link {
+  position: relative;
+  left: 0.5em;
+  opacity: 0;
+  font-size: 0.8em;
+  @include transition(opacity 0.2s ease-in-out 0.1s);
+}
+h2:hover .header-link,
+h3:hover .header-link,
+h4:hover .header-link,
+h5:hover .header-link,
+h6:hover .header-link {
+  opacity: 1;
+}
+
+@media (max-width: 768px) {
+  .main-nav ul {
+    text-align: right;
+  }
+}
+@media (max-width: 830px) {
+  .main-nav {
+    .show-on-mobiles { display: inline; }
+    .hide-on-mobiles { display: none; }
+  }
+}
+
+/* Footer */
+
+footer {
+  background-color: #212121;
+  font-size: 16px;
+  padding-bottom: 5px;
+  color: #c0c0c0;
+  margin-top: 40px;
+
+  a {
+    color: #fff;
+
+    &:hover {
+
+      img { opacity: 1; }
+    }
+  }
+
+  .align-right {
+
+    p { display: inline-block; }
+  }
+
+  img {
+    display: inline-block;
+    position: relative;
+    top: 8px;
+    margin-left: 5px;
+    opacity: .8;
+    padding: 1px;
+    @include transition(opacity .2s);
+  }
+}
+
+@media (max-width: 568px) {
+  footer {
+    .one-third p { margin-bottom: 0; }
+    .two-thirds p { margin-top: -20px; }
+  }
+}
+
+/* Intro */
+
+.intro {
+
+  .unit { padding: 10px 0 40px; }
+
+  p {
+    font-size: 1.75em;
+    line-height: 1em;
+    margin: 0;
+  }
+}
+
+@media (min-width: 569px) {
+  .intro p { font-size: 3.2em; }
+}
+
+/* Quickstart */
+
+.quickstart {
+  background-color: #3F1F1F;
+  color: #fff;
+  margin: 60px 0;
+  @include box-shadow(inset 0 3px 10px rgba(0,0,0,.4));
+
+  .content { padding: 0; }
+
+  h3 {
+    font-size: 24px;
+    line-height: 24px;
+    margin-top: 20px;
+    text-shadow: 0 1px 3px rgba(0,0,0,.8);
+  }
+
+  .code {
+    font-size: 12px;
+    display: block;
+    margin: 0 0 -30px;
+  }
+}
+
+@media (min-width: 768px) {
+  .quickstart {
+
+    .code {
+      font-size: 18px;
+      margin: -30px 0;
+      float: right;
+    }
+
+    h3 {
+      margin: 50px 0 0;
+      text-align: center;
+    }
+  }
+}
+
+/* Code */
+
+.quickstart {
+
+  .code {
+    display: block;
+    padding: 0;
+    font-family: Menlo, Consolas, "Courier New", Courier, "Liberation Mono", monospace;
+    line-height: 1.3em;
+
+    .title {
+      display: block;
+      text-align: center;
+      margin: 0 20px;
+      padding: 5px 0;
+      @include border-radius(5px 5px 0 0);
+      @include box-shadow(0 3px 10px rgba(0,0,0,.5));
+      font: 400 16px/24px 'Helvetica Neue', Helvetica, Arial, sans-serif;
+      color: #444;
+      text-shadow: 0 1px 0 rgba(255,255,255,.5);
+      background-color: #f7f7f7;
+      background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZjdmNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjclIiBzdG9wLWNvbG9yPSIjY2ZjZmNmIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
+      background-image: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), color-stop(7%, #cfcfcf), to(#aaaaaa));
+      background-image: -webkit-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
+      background-image: -moz-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
+      background-image: -o-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
+      background-image: linear-gradient(top, #f7f7f7 0%,#cfcfcf 7%,#aaaaaa 100%);
+      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#aaaaaa',GradientType=0 );
+      border-bottom: 1px solid #111;
+    }
+
+    .shell {
+      padding: 20px;
+      text-shadow: none;
+      margin: 0 20px;
+      background-color: #171717;
+      @include border-radius(0 0 5px 5px);
+      @include box-shadow(0 5px 30px rgba(0,0,0,.3));
+    }
+
+    .line {
+      display: block;
+      margin: 0;
+      padding: 0;
+
+      span { display: inline-block; }
+    }
+
+    .path {
+      color: #87ceeb;
+      @include user-select(none);
+    }
+
+    .prompt {
+      color: #cd5c5c;
+      -webkit-user-select: none;  /* Chrome all / Safari all */
+      -moz-user-select: none;     /* Firefox all */
+      -ms-user-select: none;      /* IE 10+ */
+      -o-user-select: none;
+      user-select: none;
+    }
+
+    .command { color: #f0e68c; }
+
+    .output { color: #888; }
+  }
+}
+
+@media (min-width: 768px) {
+  .free-hosting {
+
+    img {
+      float: left;
+      margin: -20px -30px -30px -50px;
+      width: 300px;
+      height: 251px;
+    }
+
+    .pane-content {
+      margin-top: 35px;
+      padding-right: 30px;
+    }
+
+    p,
+    a { font-size: 18px; }
+
+    .pane:after {
+      content: " ";
+      float: right;
+      background: url(../img/footer-arrow.png) top left no-repeat;
+      width: 73px;
+      height: 186px;
+      position: absolute;
+      right: 0;
+      bottom: -30px;
+    }
+  }
+}
+
+/* Article - Used for both docs and news */
+
+
+article {
+  background-color: #444;
+  @include border-radius(10px);
+  padding: 20px;
+  margin: 0 10px;
+  @include box-shadow(0 3px 10px rgba(0,0,0,.1));
+  font-size: 16px;
+}
+
+@media (max-width: 480px) {
+  article ul { padding-left: 20px; }
+}
+
+@media (max-width: 568px) {
+  article { margin: 0; }
+}
+
+@media (min-width: 768px) {
+  article {
+    padding: 40px 40px 30px;
+    font-size: 21px;
+  }
+}
+
+/* Right-side nav - used by both docs and news */
+
+aside {
+  padding-top: 30px;
+
+  h4 {
+    text-transform: uppercase;
+    font-size: 14px;
+    font-weight: 700;
+    padding: 0 0 10px 30px;
+    margin-left: -30px;
+    display: inline-block;
+    border-bottom: 1px solid #ff0;
+  }
+
+  ul {
+    padding-left: 0;
+
+    &:first-child { margin-top: 0; }
+  }
+
+  li {
+    list-style-type: none;
+
+    a {
+      font-size: 16px;
+      position: relative
+    }
+
+    &.current a:before {
+      content: "";
+      border-color: transparent transparent transparent #444;
+      border-style: solid;
+      border-width: 10px;
+      width: 0;
+      height: 0;
+      position: absolute;
+      top: 0;
+      left: -30px;
+    }
+  }
+}
+
+/* Documentation */
+
+.docs {
+
+  article { min-height: 800px; }
+
+  .content { padding: 0; }
+}
+
+.section-nav {
+  text-align: center;
+  padding-top: 40px;
+  position: relative;
+  background: url(../img/article-footer.png) top center no-repeat;
+  margin: 40px -20px 10px;
+
+  > div { width: 49.5%; }
+
+  a,
+  span {
+    color: #fff;
+    font-size: 16px;
+    text-transform: uppercase;
+    font-weight: 700;
+    padding: 8px 12px 10px;
+    @include border-radius(5px);
+    /*border: 1px solid #333;*/
+    @include box-shadow(0 1px 3px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5));
+    background-color: #767676;
+  }
+
+  a:hover {
+    color: #fff;
+    background-color: #888;
+  }
+
+  .next,
+  .prev { position: relative; }
+
+  .next:after,
+  .prev:before {
+    font-size: 36px;
+    color: #222;
+    font-weight: 900;
+    text-shadow: 0 1px 0 rgba(255,255,255,.4);
+    position: absolute;
+    top: -7px;
+  }
+
+  .next:after {
+    content: '\203A';
+    right: 10px;
+  }
+
+  .prev:before {
+    content: '\2039';
+    left: 10px;
+  }
+
+  .prev,
+  .prev:hover { padding-left: 30px; }
+
+  .next,
+  .next:hover { padding-right: 30px; }
+
+  .disabled {
+    opacity: .5;
+    cursor: default;
+  }
+}
+
+.improve {
+  padding-top: 25px;
+  font-size: 16px;
+  a {
+    color: #999;
+  }
+}
+
+.docs-nav-mobile select {
+  color: #000;
+  width: 100%;
+}
+
+/* News */
+
+article h2:first-child { margin-top: 0; }
+
+.post-category,
+.post-meta {
+  display: inline-block;
+  vertical-align: middle;
+  font-size: .8em;
+}
+
+.post-category {
+  display: inline-block;
+  margin-left: -30px;
+  padding: 6px 10px 8px;
+  padding-left: 50px;
+  @include border-radius(0 5px 5px 0);
+  position: relative;
+  @include box-shadow(0 1px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(0,0,0,.3));
+  background-color: #9e2812;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllMjgxMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZjBkMGQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#9e2812), to(#6f0d0d));
+  background-image: -webkit-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: -moz-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: -o-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: linear-gradient(to bottom, #9e2812 0%,#6f0d0d 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
+
+  &:before {
+    content: "";
+    position: absolute;
+    top: -10px;
+    left: 0;
+    border-color: transparent #6f0d0d #6f0d0d transparent;
+    border-style: solid;
+    border-width: 5px;
+    width: 0;
+    height: 0;
+  }
+}
+
+.post-content img { max-width: 100% }
+
+.label {
+  float: left;
+  text-transform: uppercase;
+  font-weight: 700;
+  text-shadow: 0 -1px 0 rgba(0,0,0,.5);
+}
+
+@media (max-width: 568px) {
+  .post-category { padding-left: 30px; }
+}
+
+@media (min-width: 768px) {
+  .post-category { margin-left: -50px; }
+}
+
+.avatar {
+  @include border-radius(3px);
+  display: inline-block;
+  vertical-align: middle;
+}
+
+.post-meta {
+  padding: 5px 0;
+  color: #c0c0c0;
+  font-weight: 600;
+  text-shadow: 0 -1px 0 #000;
+}
+
+.post-date,
+.post-author { margin-left: 10px; }
+
+.news article + article {
+  margin-top: -10px;
+  @include border-radius(0 0 10px 10px);
+  border-top: 1px solid #555;
+  @include box-shadow(0 -1px 0 #2f2f2f);
+}
+
+/* Code Highlighting */
+
+
+pre,
+code {
+  white-space: pre;
+  display: inline-block;
+  margin: 0;
+  font: 14px/1.8em Menlo, Consolas, "Courier New", Courier, "Liberation Mono", monospace;
+  padding: 0 0.5em;
+}
+
+@media (min-width: 768px) {
+  pre, code { font-size: 16px; }
+}
+
+.highlight,
+p > pre,
+p > code,
+p > nobr > code,
+li > code,
+h5 > code,
+.note > code {
+  background-color: #2b2b2b;
+  color: #fff;
+  @include border-radius(5px);
+  @include box-shadow(inset 0 1px 10px rgba(0,0,0,.3),
+    0 1px 0 rgba(255,255,255,.1),
+    0 -1px 0 rgba(0,0,0,.5));
+}
+
+.note code {
+  background-color: #333;
+  background-color: rgba(0,0,0,0.2);
+  margin-left: 2.5px;
+  margin-right: 2.5px;
+  font-size: 0.8em;
+}
+
+.highlight {
+  margin: 1em 0;
+  padding: 10px 0;
+  width: 100%;
+  overflow: auto;
+}
+
+/* HTML Elements */
+
+h1, h2, h3, h4, h5, h6 { margin: 0; }
+
+a {
+  color: #33adff;
+  text-decoration: none;
+  @include transition(all .25s);
+
+  &:hover { color: #33adff; }
+}
+
+strong { font-weight: 700; }
+
+p { line-height: 1.5em; }
+
+.left { float: left; }
+.right { float: right; }
+.align-right { text-align: right; }
+.align-left { text-align: left; }
+.align-center { text-align: center; }
+
+/* Article HTML */
+
+article {
+
+  h2, h3, h4, h5, h6 { margin: 1em 0; }
+
+  h4 { color: #fff; }
+
+  ul li {
+
+    p { margin: 0; }
+
+    blockquote { margin: 10px 0; }
+  }
+
+  ul li,
+  ol li {
+    line-height: 1.5em;
+    margin-bottom: 0.5em;
+  }
+
+}
+
+h5, h6 {
+  font-size: 1em;
+  font-style: italic;
+}
+
+blockquote {
+  border-left: 2px solid #777;
+  padding-left: 20px;
+  font-style: italic;
+  font-size: 18px;
+  font-weight: 500;
+}
+
+
+/* Tables */
+
+table {
+  width: 100%;
+  background-color: #555;
+  margin: .5em 0;
+  @include border-radius(5px);
+  @include box-shadow(0 1px 3px rgba(0,0,0,.3));
+}
+
+thead {
+  @include border-top-left-radius(5px);
+  @include border-top-right-radius(5px);
+  color: #fff;
+  background-color: #3a3a3a;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNhM2EzYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxZTFlMWUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#3a3a3a), to(#1e1e1e));
+  background-image: -webkit-linear-gradient(top, #3a3a3a 0%, #1e1e1e 100%);
+  background-image: -moz-linear-gradient(top, #3a3a3a 0%, #1e1e1e 100%);
+  background-image: -o-linear-gradient(top, #3a3a3a 0%, #1e1e1e 100%);
+  background-image: linear-gradient(to bottom, #3a3a3a 0%,#1e1e1e 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3a3a3a', endColorstr='#1e1e1e',GradientType=0 );
+
+  th {
+    position: relative;
+    @include box-shadow(inset 0 1px 0 rgba(255,255,255,.1));
+
+    &:first-child {
+      @include border-top-left-radius(5px);
+    }
+
+    &:last-child {
+      @include border-top-right-radius(5px);
+    }
+  }
+}
+
+td { padding: .5em .75em; }
+
+td p { margin: 0; }
+
+th {
+  text-transform: uppercase;
+  font-size: 16px;
+  padding: .5em .75em;
+  text-shadow: 0 -1px 0 rgba(0,0,0,.9);
+  color: #888;
+}
+
+tbody td {
+  border-top: 1px solid #747474;
+  border-top: 1px solid rgba(0,0,0,.1);
+  @include box-shadow(inset 0 1px 0 rgba(255,255,255,.1));
+  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.1)), to(rgba(255,255,255,0)));
+  background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
+  background-image: -moz-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
+  background-image: -o-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
+  background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%,rgba(255,255,255,0) 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1affffff', endColorstr='#00ffffff',GradientType=0 );
+
+  p {
+    font-size: 16px;
+
+    code { font-size: 14px; }
+  }
+}
+
+code.option,
+th .option,
+code.filter,
+th .filter {
+  color: #50B600;
+}
+
+code.flag,
+th .flag,
+code.output,
+th .output {
+  color: #049DCE;
+}
+
+code.option,
+code.flag,
+code.filter,
+code.output {
+  margin-bottom: 2px;
+}
+
+/* Note types */
+
+.note {
+  margin: 30px 0;
+  margin-left: -30px;
+  padding: 20px 20px 24px;
+  padding-left: 50px;
+  @include border-radius(0 5px 5px 0);
+  position: relative;
+  @include box-shadow(0 1px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(0,0,0,.3));
+  background-color: #7e6d42;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdlNmQ0MiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1YzRlMzUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#7e6d42), to(#5c4e35));
+  background-image: -webkit-linear-gradient(top, #7e6d42 0%, #5c4e35 100%);
+  background-image: -moz-linear-gradient(top, #7e6d42 0%, #5c4e35 100%);
+  background-image: -o-linear-gradient(top, #7e6d42 0%, #5c4e35 100%);
+  background-image: linear-gradient(to bottom, #7e6d42 0%,#5c4e35 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7e6d42', endColorstr='#5c4e35',GradientType=0 );
+}
+
+@media (max-width: 568px) {
+  .note { margin-right: -30px; }
+}
+
+@media (min-width: 768px) {
+  .note { margin-left: -50px; }
+}
+
+.configtable {
+    font-size: 14px;
+}
+
+.note {
+  &:before {
+    content: "";
+    position: absolute;
+    top: -10px;
+    left: 0;
+    border-color: transparent #222 #222 transparent;
+    border-style: solid;
+    border-width: 5px;
+    width: 0;
+    height: 0;
+  }
+
+  h5,
+  p {
+    margin: 0;
+    color: #fff;
+  }
+
+  h5 {
+    line-height: 1.5em;
+    font-weight: 900;
+    font-style: normal;
+  }
+
+  p {
+    font-weight: 400;
+    font-size: .75em;
+  }
+
+  &:after {
+    content: '\2605';
+    color: #33adff;
+    position: absolute;
+    top: 14px;
+    left: 14px;
+    font-size: 28px;
+    font-weight: 700;
+    text-shadow: 0 -1px 0 rgba(0,0,0,.5);
+  }
+}
+
+.info {
+  background-color: #0389aa;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAzODlhYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDYxN2YiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#0389aa), to(#00617f));
+  background-image: -webkit-linear-gradient(top, #0389aa 0%, #00617f 100%);
+  background-image: -moz-linear-gradient(top, #0389aa 0%, #00617f 100%);
+  background-image: -o-linear-gradient(top, #0389aa 0%, #00617f 100%);
+  background-image: linear-gradient(to bottom, #0389aa 0%,#00617f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0389aa', endColorstr='#00617f',GradientType=0 );
+}
+
+.warning {
+  background-color: #9e2812;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllMjgxMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZjBkMGQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#9e2812), to(#6f0d0d));
+  background-image: -webkit-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: -moz-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: -o-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
+  background-image: linear-gradient(to bottom, #9e2812 0%,#6f0d0d 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
+}
+
+.unreleased {
+  background-color: #cd9239;
+  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2NkOTIzOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhMjc1MjgiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(205,146,57,1)), to(rgba(162,117,40,1)));
+  background-image: -webkit-linear-gradient(top, rgba(205,146,57,1) 0%, rgba(162,117,40,1) 100%);
+  background-image: -moz-linear-gradient(top, rgba(205,146,57,1) 0%, rgba(162,117,40,1) 100%);
+  background-image: -o-linear-gradient(top, rgba(205,146,57,1) 0%, rgba(162,117,40,1) 100%);
+  background-image: linear-gradient(to bottom, rgba(205,146,57,1) 0%,rgba(162,117,40,1) 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cd9239', endColorstr='#a27528',GradientType=0 );
+}
+
+.info:before { border-color: transparent #00617f #00617f transparent; }
+
+.warning:before { border-color: transparent #6f0d0d #6f0d0d transparent; }
+
+.unreleased:before { border-color: transparent #664719 #664719 transparent; }
+
+.info:after {
+  content: '\24D8';
+  color: #fff;
+  position: absolute;
+  top: 15px;
+  left: 15px;
+  font-size: 28px;
+  font-weight: 700;
+  text-shadow: 0 -1px 0 rgba(0,0,0,.5);
+}
+
+.warning:after {
+  content: '\203C';
+  color: #33adff;
+  position: absolute;
+  top: 15px;
+  left: 15px;
+  font-size: 32px;
+  font-weight: 700;
+  text-shadow: 0 -1px 0 rgba(0,0,0,.5);
+}
+
+.unreleased:after {
+  content: '\2692';
+  color: #2b2a12;
+  position: absolute;
+  top: 8px;
+  left: 15px;
+  font-size: 38px;
+  font-weight: 700;
+  text-shadow: 0 1px 0 rgba(255,255,255,.25);
+}
+
+/* Responsive tables */
+
+@media (max-width: 768px) {
+  .mobile-side-scroller {
+    overflow-x: scroll;
+    margin: 0 -40px;
+    padding: 0 10px;
+  }
+}
+
+
+.show-on-mobiles {
+  display: none;
+}
+
+@media screen and (max-width: 568px) {
+  .show-on-mobiles {
+    display: block !important;
+  }
+  a .show-on-mobiles {
+    display: inline !important;
+  }
+}
+
+
+/* Helper class taken from Bootstrap.
+   Hides an element to all devices except screen readers.
+*/
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  border: 0;
+}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/css/screen.scss
----------------------------------------------------------------------
diff --git a/site/css/screen.scss b/site/css/screen.scss
new file mode 100644
index 0000000..2eff7f8
--- /dev/null
+++ b/site/css/screen.scss
@@ -0,0 +1,9 @@
+---
+---
+
+@import "mixins";
+@import "normalize";
+@import "gridism";
+@import "pygments";
+@import "font-awesome";
+@import "style";

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/develop/index.md
----------------------------------------------------------------------
diff --git a/site/develop/index.md b/site/develop/index.md
new file mode 100644
index 0000000..efcd0c3
--- /dev/null
+++ b/site/develop/index.md
@@ -0,0 +1,53 @@
+---
+layout: page
+title: Developing
+---
+
+Want to help add a feature or fix a bug?
+
+## Project Members
+
+Name | Apache Id | Github | Role
+:--- | :-------- | :----- | :---
+{% for c in site.data.contributors %}  {{ c.name }} | <a href="http://people.apache.org/committer-index#{{ c.apacheId }}">{{ c.apacheId }}</a> | <a href="http://github.com/{{ c.githubId }}"><img width="64" src="{% unless c.avatar %}http://github.com/{{ c.githubId }}.png{% else %}{{ c.avatar }}{% endunless %}"></a> | {{ c.role }}
+{% endfor %}
+
+## Mailing Lists
+
+There are several development mailing lists for Calcite:
+
+* [dev@calcite.incubator.apache.org](mailto:dev@calcite.incubator.apache.org) - Development discussions
+  [[archive](https://mail-archives.apache.org/mod_mbox/incubator-calcite-dev/)]
+* [issues@calcite.incubator.apache.org](mailto:issues@calcite.incubator.apache.org) - Bug tracking
+  [[archive](https://mail-archives.apache.org/mod_mbox/incubator-calcite-issues/)]
+* [commits@calcite.incubator.apache.org](mailto:commits@calcite.incubator.apache.org) - Git tracking
+  [[archive](https://mail-archives.apache.org/mod_mbox/incubator-calcite-commits/)]
+
+You can subscribe to the lists by sending email to
+*list*-subscribe@calcite.incubator.apache.org and unsubscribe by sending email to
+*list*-unsubscribe@calcite.incubator.apache.org.
+
+## Source code
+
+Calcite uses git for version control.  The canonical source is in
+[Apache](https://git-wip-us.apache.org/repos/asf/incubator-calcite.git),
+but most people find the
+[Github mirror](https://github.com/apache/incubator-calcite) more
+user-friendly.
+
+## Download source, build, and run tests
+
+Prerequisites are git, maven (3.2.1 or later) and Java (JDK 1.7 or
+later, 1.8 preferred) on your path.
+
+Create a local copy of the git repository, cd to its root directory,
+then build using maven:
+
+{% highlight bash %}
+$ git clone git://github.com/apache/incubator-calcite.git
+$ cd incubator-calcite
+$ mvn install
+{% endhighlight %}
+
+Please check our [contributing guidelines](/docs/howto.html#contributing).
+

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/doap_orc.rdf
----------------------------------------------------------------------
diff --git a/site/doap_orc.rdf b/site/doap_orc.rdf
new file mode 100644
index 0000000..428a012
--- /dev/null
+++ b/site/doap_orc.rdf
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+         xmlns="http://usefulinc.com/ns/doap#" 
+         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+         xmlns:asfext="http://projects.apache.org/ns/asfext#"
+         xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<!--
+    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.
+-->
+  <Project rdf:about="https://orc.apache.org">
+    <created>2015-05-12</created>
+    <license rdf:resource="http://spdx.org/licenses/Apache-2.0" />
+    <name>Apache Orc</name>
+    <homepage rdf:resource="https://orc.apache.org" />
+    <asfext:pmc rdf:resource="https://orc.apache.org" />
+    <shortdesc>A high-performance columnar file format for Hadoop workloads.</shortdesc>
+    <description>ORC is a self-describing type-aware columnar file format designed for
+Hadoop workloads. It is optimized for large streaming reads, but with
+integrated support for finding required rows quickly. Storing data in
+a columnar format lets the reader read, decompress, and process only
+the values that are required for the current query.</description>
+    <bug-database rdf:resource="https://issues.apache.org/jira/browse/orc" />
+    <mailing-list rdf:resource="https://orc.apache.org/develop" />
+    <download-page rdf:resource="https://orc.apache.org/downloads" />
+    <programming-language>Java</programming-language>
+    <programming-language>C++</programming-language>
+    <category rdf:resource="http://projects.apache.org/category/big-data" />
+    <category rdf:resource="http://projects.apache.org/category/hadoop" />
+    <repository>
+      <GitRepository>
+        <location rdf:resource="https://git-wip-us.apache.org/repos/asf/orc.git"/>
+        <browse rdf:resource="https://github.com/apache/orc"/>
+      </GitRepository>
+    </repository>
+    <maintainer>
+      <foaf:Person>
+        <foaf:name>Owen O'Malley</foaf:name>
+          <foaf:mbox rdf:resource="mailto:omalley@apache.org"/>
+      </foaf:Person>
+    </maintainer>
+  </Project>
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/favicon.ico
----------------------------------------------------------------------
diff --git a/site/favicon.ico b/site/favicon.ico
new file mode 100644
index 0000000..47d4618
Binary files /dev/null and b/site/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/fonts/fontawesome-webfont.eot
----------------------------------------------------------------------
diff --git a/site/fonts/fontawesome-webfont.eot b/site/fonts/fontawesome-webfont.eot
new file mode 100755
index 0000000..84677bc
Binary files /dev/null and b/site/fonts/fontawesome-webfont.eot differ



[17/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
[CALCITE-355] Web site

Update instructions

Rename 'back' button to 'previous'

Remove content from root README.md.

Add release 1.3.0


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

Branch: refs/heads/master
Commit: 5c049bc8764e931bd7771928fd25c21f33d24546
Parents: 20f5912
Author: Julian Hyde <jh...@apache.org>
Authored: Wed May 27 19:11:54 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 1 00:01:55 2015 -0700

----------------------------------------------------------------------
 README.md                                       |  229 +--
 doc/avatica.md                                  |   97 -
 doc/history.md                                  | 1587 -----------------
 doc/howto.md                                    |  803 ---------
 doc/lattice.md                                  |  125 --
 doc/model.md                                    |  435 -----
 doc/reference.md                                |  569 ------
 doc/stream.md                                   |  631 -------
 doc/tutorial.md                                 |  753 --------
 site/.gitignore                                 |    2 +
 site/Gemfile                                    |    3 +
 site/README.md                                  |   37 +
 site/_config.yml                                |   12 +
 site/_data/contributors.yml                     |   58 +
 site/_data/docs.yml                             |   25 +
 site/_docs/adapter.md                           |   21 +
 site/_docs/algebra.md                           |   22 +
 site/_docs/api.md                               |   22 +
 site/_docs/avatica.md                           |  102 ++
 site/_docs/contributing.md                      |   72 +
 site/_docs/downloads.md                         |   53 +
 site/_docs/history.md                           | 1656 ++++++++++++++++++
 site/_docs/howto.md                             |  810 +++++++++
 site/_docs/index.md                             |  137 ++
 site/_docs/lattice.md                           |  133 ++
 site/_docs/model.md                             |  447 +++++
 site/_docs/reference.md                         |  587 +++++++
 site/_docs/stream.md                            |  644 +++++++
 site/_docs/tutorial.md                          |  760 ++++++++
 site/_includes/anchor_links.html                |   33 +
 site/_includes/docs_contents.html               |    8 +
 site/_includes/docs_contents_mobile.html        |   10 +
 site/_includes/docs_option.html                 |   11 +
 site/_includes/docs_ul.html                     |   21 +
 site/_includes/footer.html                      |   19 +
 site/_includes/header.html                      |   18 +
 site/_includes/news_contents.html               |   30 +
 site/_includes/news_contents_mobile.html        |   11 +
 site/_includes/news_item.html                   |   45 +
 site/_includes/primary-nav-items.html           |   20 +
 site/_includes/section_nav.html                 |   39 +
 site/_includes/top.html                         |   15 +
 site/_layouts/default.html                      |   12 +
 site/_layouts/docs.html                         |   23 +
 site/_layouts/external.html                     |    9 +
 site/_layouts/news.html                         |   19 +
 site/_layouts/news_item.html                    |   48 +
 site/_layouts/page.html                         |   18 +
 .../2014-06-27-release-0.8.0-incubating.md      |   11 +
 .../2014-08-19-release-0.9.0-incubating.md      |   12 +
 .../2014-10-02-release-0.9.1-incubating.md      |   11 +
 .../2014-11-05-release-0.9.2-incubating.md      |   14 +
 .../2015-01-31-release-1.0.0-incubating.md      |   24 +
 .../2015-03-13-release-1.1.0-incubating.md      |   23 +
 .../2015-04-07-release-1.2.0-incubating.md      |   23 +
 site/_posts/2015-04-24-new-committers.md        |   16 +
 .../2015-05-30-release-1.3.0-incubating.md      |   15 +
 site/_sass/_font-awesome.scss                   |   25 +
 site/_sass/_gridism.scss                        |  124 ++
 site/_sass/_mixins.scss                         |   38 +
 site/_sass/_normalize.scss                      |    1 +
 site/_sass/_pygments.scss                       |   78 +
 site/_sass/_style.scss                          |  976 +++++++++++
 site/css/screen.scss                            |    9 +
 site/develop/index.md                           |   53 +
 site/doap_orc.rdf                               |   56 +
 site/favicon.ico                                |  Bin 0 -> 5683 bytes
 site/fonts/fontawesome-webfont.eot              |  Bin 0 -> 56006 bytes
 site/fonts/fontawesome-webfont.svg              |  520 ++++++
 site/fonts/fontawesome-webfont.ttf              |  Bin 0 -> 112160 bytes
 site/fonts/fontawesome-webfont.woff             |  Bin 0 -> 65452 bytes
 site/help/index.md                              |   32 +
 site/img/logo.png                               |  Bin 0 -> 69304 bytes
 site/index.html                                 |   34 +
 site/js/html5shiv.min.js                        |    4 +
 site/js/respond.min.js                          |    5 +
 site/news/index.html                            |   19 +
 site/news/releases/index.html                   |   10 +
 site/talks/index.md                             |   28 +
 79 files changed, 8174 insertions(+), 5228 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 877bc8f..fe4e10e 100644
--- a/README.md
+++ b/README.md
@@ -20,231 +20,4 @@ limitations under the License.
 
 Apache Calcite is a dynamic data management framework.
 
-It was formerly called Optiq.
-
-## Getting Calcite
-
-To run Apache Calcite, you can either
-[download and build from github](doc/howto.md#building-from-git),
-or [download a release](http://www.apache.org/dyn/closer.cgi/incubator/calcite)
-then [build the source code](doc/howto.md#building-from-a-source-distribution).
-
-Pre-built jars are in
-[the Apache maven repository](https://repository.apache.org/content/repositories/releases)
-with the following Maven coordinates:
-
-```xml
-<dependency>
-  <groupId>org.apache.calcite</groupId>
-  <artifactId>calcite-core</artifactId>
-  <version>1.3.0-incubating</version>
-</dependency>
-```
-
-## Example
-
-Calcite makes data anywhere, of any format, look like a database. For
-example, you can execute a complex ANSI-standard SQL statement on
-in-memory collections:
-
-```java
-public static class HrSchema {
-  public final Employee[] emps = ... ;
-  public final Department[] depts = ...;
-}
-
-Class.forName("org.apache.calcite.jdbc.Driver");
-Properties info = new Properties();
-info.setProperty("lex", "JAVA");
-Connection connection = DriverManager.getConnection("jdbc:calcite:", info);
-CalciteConnection calciteConnection =
-    connection.unwrap(CalciteConnection.class);
-ReflectiveSchema.create(calciteConnection,
-    calciteConnection.getRootSchema(), "hr", new HrSchema());
-Statement statement = calciteConnection.createStatement();
-ResultSet resultSet = statement.executeQuery(
-    "select d.deptno, min(e.empid)\n"
-    + "from hr.emps as e\n"
-    + "join hr.depts as d\n"
-    + "  on e.deptno = d.deptno\n"
-    + "group by d.deptno\n"
-    + "having count(*) > 1");
-print(resultSet);
-resultSet.close();
-statement.close();
-connection.close();
-```
-
-Where is the database? There is no database. The connection is
-completely empty until <code>ReflectiveSchema.create</code> registers
-a Java object as a schema and its collection fields <code>emps</code>
-and <code>depts</code> as tables.
-
-Calcite does not want to own data; it does not even have favorite data
-format. This example used in-memory data sets, and processed them
-using operators such as <code>groupBy</code> and <code>join</code>
-from the linq4j
-library. But Calcite can also process data in other data formats, such
-as JDBC. In the first example, replace
-
-```java
-ReflectiveSchema.create(calciteConnection,
-    calciteConnection.getRootSchema(), "hr", new HrSchema());
-```
-
-with
-
-```java
-Class.forName("com.mysql.jdbc.Driver");
-BasicDataSource dataSource = new BasicDataSource();
-dataSource.setUrl("jdbc:mysql://localhost");
-dataSource.setUsername("username");
-dataSource.setPassword("password");
-JdbcSchema.create(calciteConnection.getRootSchema(), "name", dataSource,
-    null, "hr");
-```
-
-and Calcite will execute the same query in JDBC. To the application, the
-data and API are the same, but behind the scenes the implementation is
-very different. Calcite uses optimizer rules
-to push the <code>JOIN</code> and <code>GROUP BY</code> operations to
-the source database.
-
-In-memory and JDBC are just two familiar examples. Calcite can handle
-any data source and data format. To add a data source, you need to
-write an adapter that tells Calcite
-what collections in the data source it should consider "tables".
-
-For more advanced integration, you can write optimizer
-rules. Optimizer rules allow Calcite to access data of a new format,
-allow you to register new operators (such as a better join algorithm),
-and allow Calcite to optimize how queries are translated to
-operators. Calcite will combine your rules and operators with built-in
-rules and operators, apply cost-based optimization, and generate an
-efficient plan.
-
-### Non-JDBC access
-
-Calcite also allows front-ends other than SQL/JDBC. For example, you can
-execute queries in <a href="https://github.com/julianhyde/linq4j">linq4j</a>:
-
-```java
-final OptiqConnection connection = ...;
-ParameterExpression c = Expressions.parameter(Customer.class, "c");
-for (Customer customer
-    : connection.getRootSchema()
-        .getSubSchema("foodmart")
-        .getTable("customer", Customer.class)
-        .where(
-            Expressions.<Predicate1<Customer>>lambda(
-                Expressions.lessThan(
-                    Expressions.field(c, "customer_id"),
-                    Expressions.constant(5)),
-                c))) {
-  System.out.println(c.name);
-}
-```
-
-Linq4j understands the full query parse tree, and the Linq4j query
-provider for Calcite invokes Calcite as an query optimizer. If the
-<code>customer</code> table comes from a JDBC database (based on
-this code fragment, we really can't tell) then the optimal plan
-will be to send the query
-
-```SQL
-SELECT *
-FROM "customer"
-WHERE "customer_id" < 5
-```
-
-to the JDBC data source.
-
-### Writing an adapter
-
-The subproject under example/csv provides a CSV adapter, which is fully functional for use in applications
-but is also simple enough to serve as a good template if you are writing
-your own adapter.
-
-See the <a href="https://github.com/apache/incubator-calcite/blob/master/doc/tutorial.md">CSV tutorial</a>
-for information on using the CSV adapter and writing other adapters.
-
-See the <a href="doc/howto.md">HOWTO</a> for more information about using other
-adapters, and about using Calcite in general.
-
-## Status
-
-The following features are complete.
-
-* Query parser, validator and optimizer
-* Support for reading models in JSON format
-* Many standard functions and aggregate functions
-* JDBC queries against Linq4j and JDBC back-ends
-* <a href="https://github.com/julianhyde/linq4j">Linq4j</a> front-end
-* SQL features: SELECT, FROM (including JOIN syntax), WHERE, GROUP BY (and aggregate functions including COUNT(DISTINCT ...)), HAVING, ORDER BY (including NULLS FIRST/LAST), set operations (UNION, INTERSECT, MINUS), sub-queries (including correlated sub-queries), windowed aggregates, LIMIT (syntax as <a href="http://www.postgresql.org/docs/8.4/static/sql-select.html#SQL-LIMIT">Postgres</a>)
-
-For more details, see the <a href="doc/reference.md">Reference guide</a>.
-
-### Drivers
-
-* <a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/jdbc/package-summary.html">JDBC driver</a>
-
-### Adapters
-
-* <a href="https://github.com/apache/incubator-drill">Apache Drill adapter</a>
-* Cascading adapter (<a href="https://github.com/Cascading/lingual">Lingual</a>)
-* CSV adapter (example/csv)
-* JDBC adapter (part of <a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/jdbc/package-summary.html">calcite-core</a>)
-* MongoDB adapter (<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/mongodb/package-summary.html">calcite-mongodb</a>)
-* Spark adapter (<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/spark/package-summary.html">calcite-spark</a>)
-* Splunk adapter (<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/splunk/package-summary.html">calcite-splunk</a>)
-* Eclipse Memory Analyzer (MAT) adapter (<a href="https://github.com/vlsi/mat-calcite-plugin">mat-calcite-plugin</a>)
-
-## More information
-
-* License: Apache License, Version 2.0
-* Blog: http://julianhyde.blogspot.com
-* Project page: http://calcite.incubator.apache.org
-* Incubation status page: http://incubator.apache.org/projects/calcite.html
-* Source code: http://github.com/apache/incubator-calcite
-* Issues: <a href="https://issues.apache.org/jira/browse/CALCITE">Apache JIRA</a>
-* Developers list: <a href="mailto:dev@calcite.incubator.apache.org">dev at calcite.incubator.apache.org</a>
-  (<a href="http://mail-archives.apache.org/mod_mbox/incubator-calcite-dev/">archive</a>,
-  <a href="mailto:dev-subscribe@calcite.incubator.apache.org">subscribe</a>)
-* Twitter: <a href="https://twitter.com/ApacheCalcite">@ApacheCalcite</a>
-* <a href="doc/howto.md">HOWTO</a>
-* <a href="doc/model.md">JSON model</a>
-* <a href="doc/reference.md">Reference guide</a>
-* <a href="doc/lattice.md">Lattices</a>
-* <a href="doc/stream.md">Streaming SQL</a>
-* <a href="doc/avatica.md">Avatica JDBC framework</a>
-* <a href="doc/history.md">Release notes and history</a>
-
-### Pre-Apache resources
-
-These resources, which we used when Calcite was called Optiq and
-before it joined the Apache incubator, are for reference only.
-They may be out of date.
-Please don't post or try to subscribe to the mailing list.
-
-* Developers list: <a href="http://groups.google.com/group/optiq-dev">optiq-dev@googlegroups.com</a>
-
-### Presentations
-
-* <a href="http://www.slideshare.net/julianhyde/how-to-integrate-splunk-with-any-data-solution">How to integrate Splunk with any data solution</a> (Splunk User Conference, 2012)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-drill-user-group-2013.pdf?raw=true">Drill / SQL / Optiq</a> (2013)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-richrelevance-2013.pdf?raw=true">SQL on Big Data using Optiq</a> (2013)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-nosql-now-2013.pdf?raw=true">SQL Now!</a> (NoSQL Now! conference, 2013)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/hive-cbo-summit-2014.pdf?raw=true">Cost-based optimization in Hive</a> (<a href="https://www.youtube.com/watch?v=vpG5noIbEFs">video</a>) (Hadoop Summit, 2014)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/dmmq-summit-2014.pdf?raw=true">Discardable, in-memory materialized query for Hadoop</a> (<a href="https://www.youtube.com/watch?v=CziGOa8GXqI">video</a>) (Hadoop Summit, 2014)
-* <a href="https://github.com/julianhyde/share/blob/master/slides/hive-cbo-seattle-2014.pdf?raw=true">Cost-based optimization in Hive 0.14</a> (Seattle, 2014)
-
-## Disclaimer
-
-Apache Calcite is an effort undergoing incubation at The Apache Software
-Foundation (ASF), sponsored by the Apache Incubator. Incubation is
-required of all newly accepted projects until a further review
-indicates that the infrastructure, communications, and decision making
-process have stabilized in a manner consistent with other successful
-ASF projects. While incubation status is not necessarily a reflection
-of the completeness or stability of the code, it does indicate that
-the project has yet to be fully endorsed by the ASF.
+For more details, see the [home page](http://calcite.incubator.apache.org).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/avatica.md
----------------------------------------------------------------------
diff --git a/doc/avatica.md b/doc/avatica.md
deleted file mode 100644
index 86899d3..0000000
--- a/doc/avatica.md
+++ /dev/null
@@ -1,97 +0,0 @@
-<!--
-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.
--->
-# Avatica
-
-## Introduction
-
-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](http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/avatica/package-summary.html) Core framework
-* [org.apache.calcite.avatica.remote](http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/avatica/remote/package-summary.html) JDBC driver that uses remote procedure calls
-* [org.apache.calcite.avatica.server](http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/avatica/server/package-summary.html) HTTP server
-* [org.apache.calcite.avatica.util](http://www.hydromatic.net/calcite/apidocs/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


[16/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/doc/history.md
----------------------------------------------------------------------
diff --git a/doc/history.md b/doc/history.md
deleted file mode 100644
index abb8372..0000000
--- a/doc/history.md
+++ /dev/null
@@ -1,1587 +0,0 @@
-<!--
-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.
--->
-# Apache Calcite release history
-
-For a full list of releases, see
-<a href="https://github.com/apache/incubator-calcite/releases">github</a>.
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.3.0-incubating">1.3.0-incubating</a> / 2015-05-21
-
-Mainly bug-fixes, but this release adds support for
-<a href="https://issues.apache.org/jira/browse/CALCITE-505">modifiable views</a>
-and
-<a href="https://issues.apache.org/jira/browse/CALCITE-704">filtered aggregate functions</a>
-and various improvements to Avatica.
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-505">CALCITE-505</a>]
-  Support modifiable view
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-704">CALCITE-704</a>]
-  `FILTER` clause for aggregate functions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-522">CALCITE-522</a>]
-  In remote JDBC driver, transmit static database properties as a map
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-661">CALCITE-661</a>]
-  Remote fetch in Calcite JDBC driver
-* Support Date, Time, Timestamp parameters
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-722">CALCITE-722</a>]
-  Rename markdown files to lower-case
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-697">CALCITE-697</a>]
-  Obsolete class `RelOptQuery`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-693">CALCITE-693</a>]
-  Allow clients to control creation of `RelOptCluster`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-691">CALCITE-691</a>]
-  Allow projects to supply alternate SQL parser
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-675">CALCITE-675</a>]
-  Enable `AggregateProjectMergeRule` in standard rule set
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-679">CALCITE-679</a>]
-  Factory method for `SemiJoin`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-674">CALCITE-674</a>]
-  Add a `SWAP_OUTER` static instance to `JoinCommuteRule` (Maryann Xue)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-735">CALCITE-735</a>]
-  `Primitive.DOUBLE.min` should be large and negative
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-688">CALCITE-688</a>]
-  `splitCondition` does not behave correctly when one side of the condition
-  references columns from different inputs
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-259">CALCITE-259</a>]
-  Using sub-queries in `CASE` statement against JDBC tables generates invalid
-  Oracle SQL (Yeong Wei)
-* In sample code in README.md, rename optiq to calcite (Ethan)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-720">CALCITE-720</a>]
-  `VolcanoPlanner.ambitious` comment doc is inconsistent (Santiago M. Mola)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-729">CALCITE-729</a>]
-  `IndexOutOfBoundsException` in `ROLLUP` query on JDBC data source
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-733">CALCITE-733</a>]
-  Multiple distinct-`COUNT` query gives wrong results
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-730">CALCITE-730</a>]
-  `ClassCastException` in table from `CloneSchema`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-728">CALCITE-728</a>]
-  Test suite hangs on Windows
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-723">CALCITE-723</a>]
-  Document lattices
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-515">CALCITE-515</a>]
-  Add Apache headers to markdown files
-* Upgrade quidem
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-716">CALCITE-716</a>]
-  Scalar sub-query and aggregate function in `SELECT` or `HAVING` clause gives
-  `AssertionError`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-694">CALCITE-694</a>]
-  Scan `HAVING` clause for sub-queries and `IN`-lists (Hsuan-Yi Chu)
-* Upgrade hydromatic-resource-maven-plugin
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-710">CALCITE-710</a>]
-  Identical conditions in the `WHERE` clause cause `AssertionError` (Sean
-  Hsuan-Yi Chu)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-695">CALCITE-695</a>]
-  Do not add `SINGLE_VALUE` aggregate function to a sub-query that will never
-  return more than one row (Hsuan-Yi Chu)
-* Add tests for scalar sub-queries, including test cases for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-709">CALCITE-709</a>]
-  Errors with `LIMIT` inside scalar sub-query
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-702">CALCITE-702</a>]
-  Add validator test for monotonic expressions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-699">CALCITE-699</a>]
-  In Avatica, synchronize access to Calendar
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-700">CALCITE-700</a>]
-  Pass time zone into tests
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-698">CALCITE-698</a>]
-  For `GROUP BY ()`, `areColumnsUnique()` should return true for any key
-* Disable tests that fail under JDK 1.7 due to
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
-* Add "getting started" to HOWTO
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-692">CALCITE-692</a>]
-  Add back sqlline as a dependency
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-677">CALCITE-677</a>]
-  `RemoteDriverTest.testTypeHandling` fails east of Greenwich
-* Disable test for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-687">CALCITE-687</a>]
-  Make `RemoteDriverTest.testStatementLifecycle` thread-safe
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-686">CALCITE-686</a>]
-  `SqlNode.unparse` produces invalid SQL
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-507">CALCITE-507</a>]
-  Update HOWTO.md with running integration tests
-* Add H2 integration test
-* Add PostgreSQL integration test
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-590">CALCITE-590</a>]
-  Update MongoDB test suite to calcite-test-dataset
-* Add `CalciteAssert.assertArrayEqual` for more user-friendly asserts
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-585">CALCITE-585</a>]
-  Avatica JDBC methods should throw `SQLFeatureNotSupportedException` (Ng Jiunn
-  Jye)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-671">CALCITE-671</a>]
-  `ByteString` does not deserialize properly as a `FetchRequest` parameter value
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-676">CALCITE-676</a>]
-  `AssertionError` in `GROUPING SETS` query
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-678">CALCITE-678</a>]
-  `SemiJoinRule` mixes up fields when `Aggregate.groupSet` is not field #0
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.2.0-incubating">1.2.0-incubating</a> / 2015-04-07
-
-A short release, less than a month after 1.1.
-
-There have been many changes to Avatica, hugely improving its coverage of the
-JDBC API and overall robustness. A new provider, `JdbcMeta`, allows
-you to remote an existing JDBC driver.
-
-[<a href="https://issues.apache.org/jira/browse/CALCITE-606">CALCITE-606</a>]
-improves how the planner propagates traits such as collation and
-distribution among relational expressions.
-
-[<a href="https://issues.apache.org/jira/browse/CALCITE-613">CALCITE-613</a>]
-and [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
-improve implicit and explicit conversions in SQL.
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-366">CALCITE-366</a>]
-  Support Aggregate push down in bushy joins (Jesus Camacho Rodriguez)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-613">CALCITE-613</a>]
-  Implicitly convert character values in comparisons
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
-  Implement `CAST` between date-time types
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-634">CALCITE-634</a>]
-  Allow `ORDER BY` aggregate function in `SELECT DISTINCT`, provided that it
-  occurs in `SELECT` clause (Sean Hsuan-Yi Chu)
-* In linq4j, implement `firstOrDefault`, `single`, and `singleOrDefault` methods
-  (Daniel Cooper)
-* JDBC adapter
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-631">CALCITE-631</a>]
-    Push theta joins down to JDBC adapter (Ng Jiunn Jye)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-657">CALCITE-657</a>]
-    `NullPointerException` when executing `JdbcAggregate.implement`
-    method (Yuri Au Yong)
-* Metadata
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-659">CALCITE-659</a>]
-    Missing types in `averageTypeValueSize` method in `RelMdSize`
-    (Jesus Camacho Rodriguez)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-650">CALCITE-650</a>]
-    Add metadata for average size of a tuple in `SemiJoin` (Jesus
-    Camacho Rodriguez)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-649">CALCITE-649</a>]
-    Extend `splitCondition` method in `RelOptUtil` to handle multiple
-    joins on the same key (Jesus Camacho Rodriguez)
-
-Avatica features and bug fixes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-670">CALCITE-670</a>]
-  `AvaticaPreparedStatement` should support `execute()` and
-  `executeUpdate()` (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-641">CALCITE-641</a>]
-  Implement logging throughout Avatica server (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-646">CALCITE-646</a>]
-  `AvaticaStatement.execute` method broken over remote JDBC (Yeong Wei
-  and Julian Hyde)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-660">CALCITE-660</a>]
-  Improve Avatica date support
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-655">CALCITE-655</a>]
-  Implement `ConnectionSync` RPC (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-654">CALCITE-654</a>]
-  Tighten up `AvaticaStatement.execute` semantics (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-658">CALCITE-658</a>]
-  Cleanup dependency usage (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-652">CALCITE-652</a>]
-  Move server pieces of `avatica` into `avatica-server` (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-651">CALCITE-651</a>]
-  In `JdbcMeta`, convert property definitions to an enum (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-640">CALCITE-640</a>]
-  Avatica server should expire stale connections/statements (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-639">CALCITE-639</a>]
-  Open up permissions on avatica server components (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-637">CALCITE-637</a>]
-  Implement Avatica `CloseConnection` RPC (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-636">CALCITE-636</a>]
-  Connection isolation for Avatica clients (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-626">CALCITE-626</a>]
-  Implement `CloseStatement` RPC (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-630">CALCITE-630</a>]
-  Flesh out `AvaticaParameter.setObject` (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-627">CALCITE-627</a>]
-  Add Avatica support for `getTableTypes`, `getColumns` (Xavier FH Leong)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-618">CALCITE-618</a>]
-  Add Avatica support for `getTables` (Julian Hyde and Nick Dimiduk)
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-617">CALCITE-617</a>]
-  Check at initialization time in `CachingInvocationHandler` that MD provider
-  is not null (Jesus Camacho Rodriguez)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-638">CALCITE-638</a>]
-  SQL standard `REAL` is 4 bytes, `FLOAT` is 8 bytes
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-672">CALCITE-672</a>]
-  SQL `ANY` type should be nullable (Jinfeng Ni)
-* Disable tests, pending
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-673">CALCITE-673</a>]
-  Timeout executing joins against MySQL
-* Fix traits in MongoDB adapter, and `NullPointerException` in `JdbcTest`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-662">CALCITE-662</a>]
-  Query validation fails when an `ORDER BY` clause is used with `WITH CLAUSE`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-606">CALCITE-606</a>]
-  Fix trait propagation and add test case
-* Remove checkstyle Eclipse properties from git tracking
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-644">CALCITE-644</a>]
-  Increase check style line limit to 100 chars (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-648">CALCITE-648</a>]
-  Update `ProjectMergeRule` description for new naming convention (Jinfeng Ni)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-625">CALCITE-625</a>]
-  `README.md` linking to the wrong page of `optiq-csv` (hongbin ma)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-632">CALCITE-632</a>]
-  Sort order returned by `SUPERCLASS_COMPARATOR` in
-  `ReflectiveRelMetadataProvider` is inconsistent (Jesus Camacho
-  Rodriguez)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-335">CALCITE-335</a>]
-  Remove uses of linq4j `Functions.adapt`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-592">CALCITE-592</a>]
-  Upgrade to Guava 14.0.1
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-596">CALCITE-596</a>]
-  JDBC adapter incorrectly reads null values as 0 (Ng Jiunn Jye)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-633">CALCITE-633</a>]
-  `WITH ... ORDER BY` cannot find table
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-614">CALCITE-614</a>]
-  `IN` clause in `CASE` in `GROUP BY` gives `AssertionError`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-619">CALCITE-619</a>]
-  Slim down dependencies in parent POM
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.1.0-incubating">1.1.0-incubating</a> / 2015-03-13
-
-This Calcite release makes it possible to exploit physical properties
-of relational expressions to produce more efficient plans, introducing
-collation and distribution as traits, `Exchange` relational operator,
-and several new forms of metadata.
-
-We add experimental support for streaming SQL.
-
-This release drops support for JDK 1.6; Calcite now requires 1.7 or
-later.
-
-We have introduced static `create` methods for many sub-classes of
-`RelNode`. We strongly suggest that you use these rather than
-calling constructors directly.
-
-New features
-* SQL
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-602">CALCITE-602</a>]
-    Streaming queries (experimental)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-588">CALCITE-588</a>]
-    Allow `TableMacro` to consume maps and collections
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-583">CALCITE-583</a>]
-    Operator `||` mishandles `ANY` type (Sean Hsuan-Yi Chu)
-* Planner rule improvements
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-445">CALCITE-445</a>]
-    Pull up filters rejected by a `ProjectableFilterableTable`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-600">CALCITE-600</a>]
-    Use `SetOpFactory` in rules containing `Union` operator (Jesus
-    Camacho Rodriguez)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-603">CALCITE-603</a>]
-    Metadata providers for size, memory, parallelism
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-607">CALCITE-607</a>]
-      Change visibility of constructor in metadata providers for size,
-      memory, parallelism (Jesus Camacho Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-608">CALCITE-608</a>]
-      Exception is thrown when `RelMdDistribution` for `Project`
-      operator is called (Jesus Camacho Rodriguez)
-* Collation and distribution as traits
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-88">CALCITE-88</a>]
-    Add collation as a trait and a kind of `RelNode` metadata
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-569">CALCITE-569</a>]
-    `ArrayIndexOutOfBoundsException` when deducing collation (Aman Sinha)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-581">CALCITE-581</a>]
-    Add `LogicalSort` relational expression, and make `Sort` abstract
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-526">CALCITE-526</a>]
-    Add `EnumerableMergeJoin`, which exploits sorted inputs
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-71">CALCITE-71</a>]
-    Provide a way to declare that tables are sorted
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-576">CALCITE-576</a>]
-    Make `RelCollation` trait and `AbstractRelNode.getCollationList` consistent
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-254">CALCITE-254</a>]
-    Propagate `RelCollation` on aliased columns in `JoinRule`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-569">CALCITE-569</a>]
-    `ArrayIndexOutOfBoundsException` when deducing collation
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-594">CALCITE-594</a>]
-    Add `RelDistribution` trait and `Exchange` relational expression
-
-API changes
-* Many sub-classes of `RelNode` now have a static `create` method
-  which automatically sets up traits such as collation and
-  distribution. The constructors are not marked deprecated, but we
-  strongly suggest that you use the `create` method if it exists.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-591">CALCITE-591</a>]
-  Drop support for Java 1.6 (and JDBC 4.0)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-587">CALCITE-587</a>]
-  Upgrade `jetty-server` to 9.2.7.v20150116 and port avatica-server `HttpServer`
-  (Trevor Hartman)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-577">CALCITE-577</a>]
-  Revert temporary API changes introduced in
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-575">CALCITE-575</a>]
-* Add means to create `Context` instances by wrapping objects and by chaining
-  contexts
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-599">CALCITE-599</a>]
-  `EquiJoin` in wrong package (Jesus Camacho Rodriguez)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-573">CALCITE-573</a>]
-  Use user-given names in `RelOptUtil.createProject` and `createRename`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-572">CALCITE-572</a>]
-  Remove `Project.flags` (methods are deprecated, to be removed before 2.0)
-
-Bug-fixes and internal changes
-* Remove the `LICENSE` file of calcite-example-csv (the former
-  optiq-csv) and move its history into main history
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-615">CALCITE-615</a>]
-  AvaticaParameter should be Jackson serializable (Nick Dimiduk)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-612">CALCITE-612</a>]
-  Update AvaticaStatement to handle cancelled queries (Parth Chandra)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-605">CALCITE-605</a>]
-  Reduce dependency on third-party maven repositories
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-611">CALCITE-611</a>]
-  Method `setAggChildKeys` should take into account indicator columns of
-  `Aggregate` operator (Jesus Camacho Rodriguez)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-566">CALCITE-566</a>]
-  `ReduceExpressionsRule` requires planner to have an `Executor`
-* Refactor `TableScanNode.create` method
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-593">CALCITE-593</a>]
-  Validator in `Frameworks` should expand identifiers (Jinfeng Ni)
-* Australian time-zones changed in `tzdata2014f`, Java 1.8.0_31
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-580">CALCITE-580</a>]
-  Average aggregation on an `Integer` column throws `ClassCastException`
-* In Travis, ask Surefire to print results to screen
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-586">CALCITE-586</a>]
-  Prevent JSON serialization of `Signature.internalParameters`
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.0.0-incubating">1.0.0-incubating</a> / 2015-01-31
-
-Calcite's first major release.
-
-Since the previous release we have re-organized the into the `org.apache.calcite`
-namespace. To make migration of your code easier, we have described the
-<a href="https://issues.apache.org/jira/secure/attachment/12681620/mapping.txt">mapping from old to new class names</a>
-as an attachment to
-[<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>].
-
-The release adds SQL support for `GROUPING SETS`, `EXTEND`, `UPSERT` and sequences;
-a remote JDBC driver;
-improvements to the planner engine and built-in planner rules;
-improvements to the algorithms that implement the relational algebra,
-including an interpreter that can evaluate queries without compilation;
-and fixes about 30 bugs.
-
-New features
-* SQL
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-494">CALCITE-494</a>]
-    Support `NEXT`/`CURRENT VALUE FOR` syntax for using sequences
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-492">CALCITE-492</a>]
-    Support `UPSERT` statement in parser
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-493">CALCITE-493</a>]
-    Add `EXTEND` clause, for defining columns and their types at query/DML time
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-497">CALCITE-497</a>]
-    Support optional qualifier for column name references
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-356">CALCITE-356</a>]
-    Allow column references of the form `schema.table.column`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-462">CALCITE-462</a>]
-    Allow table functions in `LATERAL` expression
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-282">CALCITE-282</a>]
-    Add `{fn QUARTER(date)}` function (Benoy Antony)
-  * Grouping sets
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-370">CALCITE-370</a>]
-      Support `GROUPING SETS`, `CUBE`, `ROLLUP` in SQL and algebra
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-512">CALCITE-512</a>]
-      Add `GROUP_ID`,`GROUPING_ID`, `GROUPING` functions
-* Planner rule improvements
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-92">CALCITE-92</a>]
-    Optimize away `Project` that merely renames fields
-  * Detect and merge duplicate predicates `AND(x, y, x)` to `AND(x, y)` in more
-    circumstances
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-557">CALCITE-557</a>]
-    Speed up planning by never creating `AbstractConverter`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-545">CALCITE-545</a>]
-    When a projected expression can only have one value, replace with that
-    constant
-  * Grouping sets
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-542">CALCITE-542</a>]
-      Support for `Aggregate` with grouping sets in `RelMdColumnOrigins` (Jesus
-      Camacho Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-533">CALCITE-533</a>]
-      Support for grouping sets in `FilterAggregateTransposeRule` (Jesus Camacho
-      Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-532">CALCITE-532</a>]
-      Support for grouping sets in `AggregateFilterTransposeRule` (Jesus Camacho
-      Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-513">CALCITE-513</a>]
-      Support for grouping sets in `AggregateProjectMergeRule` (Jesus Camacho
-      Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-510">CALCITE-510</a>]
-      Support for grouping sets in `AggregateExpandDistinctAggregatesRule` (Jesus
-      Camacho Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-502">CALCITE-502</a>]
-      Support for grouping sets in `AggregateUnionTransposeRule` (Jesus Camacho
-      Rodriguez)
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-503">CALCITE-503</a>]
-      Tests to check rules on `Aggregate` operator without grouping sets (Jesus
-      Camacho Rodriguez)
-* Algorithms
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-451">CALCITE-451</a>]
-    Implement theta join, inner and outer, in enumerable convention
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
-    Update `Correlate` mechanics and implement `EnumerableCorrelate` (aka nested
-    loops join)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-544">CALCITE-544</a>]
-    Implement `Union` in interpreter
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-562">CALCITE-562</a>]
-    Implement inner `Join` in interpreter and improve handling of scalar expressions
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-543">CALCITE-543</a>]
-    Implement `Aggregate` (including `GROUPING SETS`) in interpreter (Jacques
-    Nadeau)
-  * In progress towards
-    [<a href="https://issues.apache.org/jira/browse/CALCITE-558">CALCITE-558</a>]
-    add `BINDABLE` convention (but `ENUMERABLE` is still the default), and add
-    `ArrayBindable` and `Scalar` interfaces
-* Remote driver
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-93">CALCITE-93</a>]
-    Calcite RPC server
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-94">CALCITE-94</a>]
-    Remote JDBC driver
-  * Make `JsonHandler` and `JsonService` thread-safe
-
-API changes
-* The great code re-org
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>]
-    Re-organize package structure
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-419">CALCITE-419</a>]
-    Naming convention for planner rules
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-306">CALCITE-306</a>]
-    Standardize code style for "import package.*;"
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-474">CALCITE-474</a>]
-    Clean up rule naming in order to support enabling/disabling rules
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-460">CALCITE-460</a>]
-    Add `ImmutableBitSet` and replace uses of `BitSet`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-479">CALCITE-479</a>]
-    Migrate `RelNode.getChildExps` to `RelNode.accept(RexShuttle)`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-527">CALCITE-527</a>]
-    Drop `rowType` field and constructor/copy argument of `Calc`
-* Add linq4j and example-csv modules
-  * Remove unused packages in linq4j, and fix checkstyle issues in linq4j and csv
-  * Add calcite-linq4j and calcite-example-csv as POM sub-modules
-  * Import 'optiq-csv' project as 'example/csv/', and add Apache headers
-  * Import 'linq4j' project, and add Apache headers
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-478">CALCITE-478</a>]
-    Move CSV tutorial (Siva Narayanan)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-464">CALCITE-464</a>]
-  Make parser accept configurable max length for SQL identifier
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-465">CALCITE-465</a>]
-  Remove `OneRow` and `Empty` relational expressions; `Values` will suffice
-
-Bug-fixes and internal changes
-* Build improvements
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-541">CALCITE-541</a>]
-    Update maven-source-plugin to 2.4 to get speedup in jdk 1.8
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-537">CALCITE-537</a>]
-    Skip overwrite of `NOTICE`, `DEPENDENCIES`, and `LICENSE` files
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-538">CALCITE-538</a>]
-    Generate `Parser.jj` only at first build
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-539">CALCITE-539</a>]
-    Avoid rewrite of `org-apache-calcite-jdbc.properties`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-540">CALCITE-540</a>]
-    Create git.properties file only at first build. This saves time in
-    development at a cost of stale `git.properties`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-536">CALCITE-536</a>]
-    Add `@PackageMarker` to `package-info.java` so maven-compiler skips
-    compilation when the sources are unchanged
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-535">CALCITE-535</a>]
-    Support skip overwrite in hydromatic-resource
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-582">CALCITE-582</a>]
-  `EnumerableTableScan` broken when table has single column
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-575">CALCITE-575</a>]
-  Variant of `ProjectRemoveRule` that considers a project trivial only if its
-  field names are identical (John Pullokkaran)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-571">CALCITE-571</a>]
-  `ReduceExpressionsRule` tries to reduce `SemiJoin` condition to non-equi
-  condition
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-568">CALCITE-568</a>]
-  Upgrade to a version of `pentaho-aggdesigner` that does not pull in
-  `servlet-api`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-567">CALCITE-567</a>]
-  Make `quidem` dependency have scope "test"
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-570">CALCITE-570</a>]
-  `ReduceExpressionsRule` throws "duplicate key" exception
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-561">CALCITE-561</a>]
-  Upgrade parent POM
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-458">CALCITE-458</a>]
-  ArrayIndexOutOfBoundsException when using just a single column in interpreter
-* Fix spurious extra row from `FULL JOIN`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-554">CALCITE-554</a>]
-  Outer join over NULL keys generates wrong result
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
-  Teach `CalciteAssert` to respect multiple settings
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-516">CALCITE-516</a>]
-  `GROUP BY` on a `CASE` expression containing `IN` predicate fails (Aman Sinha)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-552">CALCITE-552</a>]
-  Upgrade tpcds (which depends on an old version of guava)
-* Copy identifier when fully-qualifying, so column aliases have the right case
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-548">CALCITE-548</a>]
-  Extend `induce` method to return `CUBE` and `ROLLUP` (Jesus Camacho Rodriguez)
-  * Simplify `Group.induce` by assuming that group sets are sorted
-* Test case for
-  [<a  href="https://issues.apache.org/jira/browse/CALCITE-212">CALCITE-212</a>]
-  Join condition with `OR`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-550">CALCITE-550</a>]
-  Case-insensitive matching of sub-query columns fails
-  * Add more unit tests (Jinfeng Ni)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-448">CALCITE-448</a>]
-  `FilterIntoJoinRule` creates filters containing invalid `RexInputRef`
-* When registering a `RelNode`, be tolerant if it is equivalent to a `RelNode`
-  with different traits
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-547">CALCITE-547</a>]
-  Set nullability while inferring return type of `item(any,...)` operator
-* In Travis CI, enable containers, and cache `.m2` directory
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-534">CALCITE-534</a>]
-  Missing implementation of `ResultSetMetaData.getColumnClassName` (Knut
-  Forkalsrud)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-506">CALCITE-506</a>]
-  Update `EnumerableRelImplementor.stash` so it is suitable for all kinds of
-  classes
-* Merge join algorithm for `Enumerable`s
-* Efficient `Enumerable` over random-access list
-* Add a test that calls all functions with arguments of all types that they
-  claim to accept
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-511">CALCITE-511</a>]
-  `copy` method in `LogicalAggregate` not copying the indicator value properly
-* Add a model that has lattices and works against HSQLDB
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-509">CALCITE-509</a>]
-  `RelMdColumnUniqueness` uses `ImmutableBitSet.Builder` twice, gets
-  `NullPointerException`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-488">CALCITE-488</a>]
-  `Enumerable<Holder>` does not work if where `Holder` is a custom class
-  with a single field; Calcite tries to treat it as `SCALAR` due to premature
-  `JavaRowFormat.optimize`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-352">CALCITE-352</a>]
-  Throw exception if `ResultSet.next()` is called after `close()`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-403">CALCITE-403</a>]
-  `Enumerable` gives `NullPointerException` with `NOT` on nullable expression
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-469">CALCITE-469</a>]
-  Update example/csv README.md instructions
-* Document `WITH`, `LATERAL`, `GROUPING SETS`, `CUBE`, `ROLLUP`;
-  add descriptions for all built-in functions and operators
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-470">CALCITE-470</a>]
-  Print warning when column type hint is not understood;
-  Update `EMPS.deptno` column Integer &rarr; int
-* Fix `Linq4j.product`; the cartesian product of 0 attributes is one row of 0
-  attributes
-* Update link optiq-mat-plugin &rarr; mat-calcite-plugin
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-467">CALCITE-467</a>]
-  Incorrect namespace in `package-info.java`
-* Add headers, to appease the RAT
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-446">CALCITE-446</a>]
-  CSV adapter should read from directory relative to the model file
-* Add examples of scannable and filterable tables, matching
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
-  Simpler SPI to query Table
-* Fix `JdbcTest.testVersion` now that version is 1.0
-* Update release HOWTO
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-0.9.2-incubating">0.9.2-incubating</a> / 2014-11-05
-
-A fairly minor release, and last release before we rename all of the
-packages and lots of classes, in what we expect to call 1.0. If you
-have an existing application, it's worth upgrading to this first,
-before you move on to 1.0.
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
-  Simpler SPI to query `Table`
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-447">CALCITE-447</a>]
-  Change semi-join rules to make use of factories
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-442">CALCITE-442</a>
-  Add `RelOptRuleOperand` constructor that takes a predicate
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-397">CALCITE-397</a>]
-  `SELECT DISTINCT *` on reflective schema gives `ClassCastException` at runtime
-* Various lattice improvements.
-* sqlline: Looking for class-path in inconsistent locations.
-* Re-order test suite, so that fast tests are run first.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-444">CALCITE-444</a>]
-  Filters wrongly pushed into full outer join
-* Make it more convenient to unit test `RelMetadataQuery`, and add some more
-  tests for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-443">CALCITE-443</a>]
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-443">CALCITE-443</a>]
-  `getPredicates` from a Union is not correct
-* Update references to web sites, git repositories, jira, mailing lists,
-  travis CI now that [INFRA-8413] is fixed
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-434">CALCITE-435</a>]
-  `FilterAggregateTransposeRule` loses conditions that cannot be pushed
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-435">CALCITE-435</a>]
-  `LoptOptimizeJoinRule` incorrectly re-orders outer joins
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-439">CALCITE-439</a>]
-  `SqlValidatorUtil.uniquify()` may not terminate under some conditions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-438">CALCITE-438</a>]
-  Push predicates through `SemiJoinRel`
-* Add test case for `LIKE ... ESCAPE`.
-* HOWTO: Modify release instructions.
-* Update `DiffRepository` documentation.
-* Add tests for windowed aggregates without `ORDER BY`. (Works already.)
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-0.9.1-incubating">0.9.1-incubating</a> / 2014-10-02
-
-This is the first release as Calcite. (The project was previously called Optiq.)
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-430">CALCITE-430</a>]
-  Rename project from Optiq to Calcite
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-426">CALCITE-426</a>]
-  Pool JDBC data sources, to make it easier to pool connections
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-416">CALCITE-416</a>]
-  Execute logical `RelNode`s using an interpreter
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-376">CALCITE-376</a>]
-  Move `SqlRun` into its own artifact,
-  <a href="https://github.com/julianhyde/quidem">Quidem</a>.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-269">CALCITE-269</a>]
-  MongoDB result sets larger than 16MB
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-373">CALCITE-373</a>]
-  `NULL` values in `NOT IN` sub-queries
-* SQL functions:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-422">CALCITE-422</a>]
-    Add `REGR_SXX` and `REGR_SYY` regression functions
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-421">CALCITE-421</a>]
-    Add `COVAR_POP` and `COVAR_SAMP` aggregate functions
-* Planner rules:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-425">CALCITE-425</a>]
-    Add `FilterAggregateTransposeRule`, that pushes a filter through an
-    aggregate
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-399">CALCITE-399</a>]
-    Factorize common `AND` factors out of `OR` predicates
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-404">CALCITE-404</a>]
-    `MergeProjectRule` should not construct `RexProgram`s for simple mappings
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-394">CALCITE-394</a>]
-    Add `RexUtil.toCnf()`, to convert expressions to conjunctive normal form
-    (CNF)
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-389">CALCITE-389</a>]
-    `MergeFilterRule` should flatten `AND` condition
-* Lattices:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-428">CALCITE-428</a>]
-    Use optimization algorithm to suggest which tiles of a lattice to
-    materialize
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-410">CALCITE-410</a>]
-    Allow lattice tiles to satisfy a query by rolling up
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-406">CALCITE-406</a>]
-    Add tile and measure elements to lattice model element
-  * Now, a lattice can materialize an aggregate-join and use it in a subsequent
-    query.
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-402">CALCITE-402</a>]
-    Lattice should create materializations on demand
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-344">CALCITE-344</a>]
-    Lattice data structure
-* Field trimmer:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-408">CALCITE-408</a>]
-    Make `FieldTrimmer` work with `RelNode` base classes
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-388">CALCITE-388</a>]
-    Handle semi-joins in field trimmer
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-395">CALCITE-395</a>]
-    Make `FieldTrimmer.trimFields(SetOp)` generate `ProjectRel` instead of
-    `CalcRel`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-393">CALCITE-393</a>]
-    If no fields are projected from a table, field trimmer should project a
-    dummy expression
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-413">CALCITE-413</a>]
-  Add `RelDataTypeSystem` plugin, allowing different max precision of a
-  `DECIMAL`
-* In `Planner`, query de-correlation no longer requires state in a
-  `SqlToRelConverter`.
-* Factories:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-392">CALCITE-392</a>]
-    `RelFieldTrimmer` should use factory to create new rel nodes
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-382">CALCITE-382</a>]
-    Refactoring rules to use factories
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-398">CALCITE-398</a>]
-    Move `CalcRel.createProject` methods to `RelOptUtil`
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-396">CALCITE-396</a>]
-    Change return type of `JoinFactory.createJoin()`; add `SemiJoinFactory`
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-386">CALCITE-386</a>]
-  Fix NOTICE
-* Add tests inspired by Derby bugs.
-* Add recent presentation to README.md.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-427">CALCITE-427</a>]
-  Off-by-one issues in `RemoveDistinctAggregateRule`,
-  `AggregateFilterTransposeRule`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-414">CALCITE-414</a>]
-  Bad class name in `sqlline` shell script
-* Bad package name in `package-info.java` was causing errors in Eclipse.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-412">CALCITE-412</a>]
-  `RelFieldTrimmer`: when trimming `SortRel`, the collation and trait set don't
-  match
-* Add test case for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-411">CALCITE-411</a>]
-  Duplicate column aliases
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-407">CALCITE-407</a>]
-  `RemoveTrivialProjectRule` drops child node's traits
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-409">CALCITE-409</a>]
-  `PushFilterPastProjectRule` should not push filters past windowed aggregates
-* Fix tests on Windows.
-* Don't load `FoodMartQuerySet` unless we have to. It's big.
-* Enable connection pooling in test suite.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-384">CALCITE-384</a>]
-  Add `apache-` prefix to tarball and directory within tarball
-* Freeze hive fmpp > freemarker plugin dependency.
-* Upgrade Janino
-* Removed hardcoded foodmart schema information
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-387">CALCITE-387</a>]
-  CompileException when cast TRUE to nullable boolean
-* Temporary fix for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-390">CALCITE-390</a>]
-  Transitive inference (`RelMdPredicates`) doesn't handle semi-join
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-385">CALCITE-385</a>]
-  Change comment style for Java headers
-* Disable test that is inconistent between JDK 1.7 and 1.8.
-* Fix `git-commit-id-plugin` error when running in Travis-CI.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-381">CALCITE-381</a>]
-  Remove plugin versions from the `&lt;plugins&gt;` tag in root pom
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-383">CALCITE-383</a>]
-  Each jar should have a `git.properties` file describing its exact version
-* Fix `mvn site` on JDK 1.8 and enable in Travis-CI.
-* Status icon based on master branch, not whichever branch happened to build
-  most recently.
-* HOWTO:
-  * Document how to build from git, and how to get jars from maven repo.
-  * Optiq web site
-  * Template emails for Apache votes
-  * Update JIRA cases following release
-  * Instructions for making and verifying a release
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-0.9.0-incubating">0.9.0-incubating</a> / 2014-08-19
-
-This is the first release under the Apache incubator process.
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-371">CALCITE-371</a>]
-  Implement `JOIN` whose `ON` clause contains mixed equi and theta
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-369">CALCITE-369</a>]
-  Add `EnumerableSemiJoinRel`, implementation of semi-join in enumerable
-  convention
-* Add class `Strong`, for detecting null-rejecting predicates.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-368">CALCITE-368</a>]
-  Add SemiJoinRule, planner rule to convert project-join-aggregate into semi-join
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-367">CALCITE-367</a>]
-  `PushFilterPastJoinRule` should strengthen join type
-* Add `EquiJoinRel`, base class for joins known to be equi-joins.
-* Implement `CAST(&lt;string&gt; AS &lt;datetime&gt;)` and
-  `&lt;datetime&gt; + &lt;interval&gt;`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-360">CALCITE-360</a>]
-  Introduce a rule to infer predicates from equi-join conditions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-349">CALCITE-349</a>]
-  Add heuristic join-optimizer that can generate bushy joins
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-346">CALCITE-346</a>]
-  Add commutative join rule
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-347">CALCITE-347</a>]
-  In `SqlRun`, add `!plan` command
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-314">CALCITE-314</a>]
-  Allow simple UDFs based on methods
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-327">CALCITE-327</a>]
-  Rules should use base class to find rule match & use factory for object
-  creation
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-316">CALCITE-316</a>]
-  In `SqlRun`, match output regardless of order if `ORDER BY` not present
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-300">CALCITE-300</a>]
-  Support multiple parameters in `COUNT(DISTINCT x, y, ...)`
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-343">CALCITE-343</a>]
-  RelDecorrelator should build its own mappings, not inherit from SqlToRelConverter
-* Remove deprecated methods.
-* Convert `Hook` to use Guava `Function` (was linq4j `Function1`).
-* Add fluent method `withHook`, to more easily add hooks in tests.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-321">CALCITE-321</a>]
-  Add support for overriding implementation of `CompoundIdentifier` in
-  `SqlParser`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-322">CALCITE-322</a>]
-  Add support for `SqlExplain`, `SqlOrderBy` and `SqlWith` to support
-  `SqlShuttle` use.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-323">CALCITE-323</a>]
-  Override `SqlUnresolvedFunction.inferReturnType()` to return `ANY` type
-  so framework implementors can support late bound function implementations.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-324">CALCITE-324</a>]
-  Add `ViewExpander` for `Planner` in `Frameworks`. Expose additional
-  properties of `ViewTable` to allow subclassing.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-247">CALCITE-247</a>]
-  Add `Context` and `FrameworkConfig`
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-380">CALCITE-380</a>]
-  Downgrade to Guava 11.0.2
-* Move several .md files into new 'doc' directory, to keep the root directory simple.
-* Add DISCLAIMER
-* Update history and HOWTO
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-377">CALCITE-377</a>]
-  UnregisteredDriver should catch, log and re-throw NoClassDefFoundError
-* Inherit maven-release-plugin from Apache POM.
-* Test case for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-373">CALCITE-373</a>]
-  NOT IN and NULL values
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-372">CALCITE-372</a>]
-  Change `LoptOptimizeJoinRule` &amp; `PushFilterPast`* rules to use factory
-* Upgrade `maven-checkstyle-plugin`.
-* Add class `Holder`, a mutable slot that can contain one object.
-* Remove the 2-minute wait at the top of the hour for tests of
-  `CURRENT_TIME`, etc.
-* Tune `ImmutableIntList`'s iterators.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-364">CALCITE-364</a>]
-  Validator rejects valid `WITH ... ORDER BY` query
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-363">CALCITE-363</a>]
-  Use `dependencyManagement` and `pluginManagement` in POM files
-* Add `FilterFactory`.
-* Add `README` file, incubation disclaimers, and how-to build and running tests.
-* Add `KEYS` and start how-to for making snapshots and releases.
-* Capital case component names; inherit license info from Apache parent POM.
-* Only run `apache-rat` and `git-commit-id-plugin` in "release" maven profile.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-348">CALCITE-348</a>]
-  Add Apache RAT as maven plugin
-* Change license headers from "Julian Hyde" to "ASF"; add headers where missing.
-* Fix build breakage on JDK 1.6 due to missing method `BitSet.previousClearBit`.
-* Refactor test infrastructure to allow testing against heuristic bushy-join
-  optimizer.
-* Add methods and tests for BitSets, and re-organize tests.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-354">CALCITE-354</a>]
-  Change maven groupId to "org.apache.optiq"
-* Specify return type when calling `RexBuilder.makeCall`, if possible.
-* Eliminate duplicate conditions in `RexProgramBuilder.addCondition`, not
-  `RexBuilder.makeCall` as previously.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-345">CALCITE-345</a>]
-  `AssertionError` in `RexToLixTranslator` comparing to date literal
-* Restore `PushFilterPastJoinRule` to `RelDecorrelator`; interim pending
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-343">CALCITE-343</a>]
-  fix.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-340">CALCITE-340</a>]
-  Fix bug in `SqlToRelConverter` when push expressions in join conditions into
-  `ProjectRel`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-313">CALCITE-313</a>]
-  Query decorrelation fails
-* While unifying a `RelNode` tree with a materialized view expression,
-  switch representation to `MutableRel`s.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-305">CALCITE-305</a>]
-  Unit test failure on release candidates
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-325">CALCITE-325</a>]
-  Use Java list instead of Guava list to avoid null checks in case of
-  `SqlTypeExplicitPrecedenceList`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-326">CALCITE-326</a>]
-  Fix `RelOptUtil` `ANY` type check.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-303">CALCITE-303</a>]
-  Migrate issue URLs
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-331">CALCITE-331</a>]
-  Precision/scale compatibility checks should always succeed for `ANY` type
-* In `SqlRun`, allow `!plan` after `!ok` for same SQL statement.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-318">CALCITE-318</a>]
-  Add unit test for `SqlRun`
-* Fix a bug where composite `SELECT DISTINCT` would return duplicate rows.
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.8">0.8</a> / 2014-06-27
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-310">CALCITE-310</a>]
-   Implement LEAD, LAG and NTILE windowed aggregates
-* Reduce `COUNT(not-null-expression)` to `COUNT()`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-292">CALCITE-292</a>]
-   Improve windowed aggregate return types
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-302">CALCITE-302</a>]
-   Use heuristic rule to plan queries with large numbers of joins
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-283">CALCITE-283</a>]
-  Add TPC-DS data generator
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-294">CALCITE-294</a>]
-  Implement DENSE_RANK windowed aggregate function
-* SqlRun utility
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-290">CALCITE-290</a>]
-    Add `SqlRun`, an idempotent utility for running SQL test scripts
-  * Add "!skip" command to SqlRun.
-  * Add MySQL formatting mode to SqlRun.
-
-API changes
-* Re-organize planner initialization,
-  to make it easier to use heuristic join order.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-301">CALCITE-301</a>]
-  Add `Program` interface, a planner phase more general than current `RuleSet`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-263">CALCITE-263</a>]
-  Add operand type that will cause a rule to fire when a new subset is created
-* Clean up and document SqlKind.
-  * Add `IS_NOT_TRUE` and `IS_NOT_FALSE` `SqlKind` enums.
-  * Add `SqlKind.IS_NOT_NULL` enum value, and use where possible,
-    including for `IS_NOT_UNKNOWN` operator.
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-312">CALCITE-312</a>]
-  Trim non-required fields before `WindowRel`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-311">CALCITE-311</a>]
-  Wrong results when filtering the results of windowed aggregation
-* More tests for `WITH ... ORDER BY`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-309">CALCITE-309</a>]
-  `WITH ... ORDER BY` query gives `AssertionError`
-* Enable `MultiJoinRel` and some other planner rule tests.
-* Add `ImmutableNullableList` and `UnmodifiableArrayList`,
-  and remove calls to `Arrays.asList`.
-* Add method `IntPair.zip`.
-* Reimplement regular and windowed aggregates
-* Switch from github to Apache JIRA for issues tracking.
-  * In release history, update issue URLs from github to Apache JIRA
-* The Apache mailing list is now the official mailing list. Add presentations.
-* Add test for overloaded UDF.
-* Add tests for `NOT IN` where sub-query returns NULL values.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-288">CALCITE-288</a>]
-  Add tests for windowed aggregation based on Postgres reference queries
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-286">CALCITE-286</a>]
-  Error casting MongoDB date
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-284">CALCITE-284</a>]
-  Window functions range defaults to `CURRENT ROW`
-* [<a href=https://issues.apache.org/jira/browse/CALCITE-285">CALCITE-285</a>]
-  Window functions throw exception without `ORDER BY`
-* Test case for
-  [<a href=““https://issues.apache.org/jira/browse/CALCITE-285”>CALCITE-285</a>].
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-281">CALCITE-281</a>]
-  `EXTRACT` function's SQL return type is `BIGINT` but implemented as Java `int`
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.7">0.7</a> / 2014-05-13
-
-New features
-* Implement table functions.
-* Arrays and multi-sets:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-267">CALCITE-267</a>]
-    Improve support for ARRAY data type
-  * Better type information for JDBC Array; nested array now possible.
-  * Implement `JOIN LATERAL` and `JOIN UNNEST`.
-  * Implement the `UNNEST` relational operator, and various improvements
-    to `ARRAY` and `MULTISET` data types.
-  * Represent `ARRAY` columns as Java lists.
-  * Implement `CARDINALITY(ARRAY)` SQL operator.
-* Implement scalar sub-query in `SELECT` clause.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-273">CALCITE-273</a>]
-  Support column alias in WITH queries (common table expressions)
-* Windowed aggregates:
-  * Aggregate over constants, e.g. `SUM(1) OVER (ROWS 10 PRECEDING)`;
-  * `UNBOUNDED PRECEDING` window range;
-  * Windowed aggregates computed over primitive scalars.
-* Fix return type inference for aggregate calls. If the `GROUP BY` clause is
-  empty, `SUM` may return null.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-37">CALCITE-37</a>]
-  Document JSON model file format (as <a href="model.md">model.md</a>).
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-238">CALCITE-238</a>]
-  Add adapter that generates TPC-H data
-* Improve exception message in `AvaticaConnection`; add
-  `ExceptionMessageTest`.
-* Implement micro-benchmarks via
-  <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a>.
-
-API changes
-* Provide an option to create root schema without the "metadata" schema.
-* Schema SPI:
-  * [<a href="https://issues.apache.org/jira/browse/CALCITE-175">CALCITE-175</a>]
-    Modify Schema SPI to allow caching
-  * Get sub-schemas defined by a Schema SPI, and cache their `OptiqSchema`
-    wrappers. (Tobi Vollebregt and Julian Hyde)
-* SqlAdvisor callable from client via JDBC.
-
-Bug-fixes and internal changes
-* Add Apache incubator proposal.
-* Rename RELEASE.md to HISTORY.md.
-* Upgrade maven-release-plugin.
-* Upgrade to linq4j-0.3.
-* Code generation improvements:
- * Move code-generation optimizer to linq4j;
- * Improve translation of strict functions;
- * Mark most methods in `SqlFunctions` as `@Deterministic`;
- * Support `static final` constants generated by linq4j.
- * Avoid excessive box and unbox of primitives when using `Object[]` storage.
- * In JDBC result set, avoid row computation on each accessor call.
-* Test composite join conditions in various flavors of outer join.
-* Use `fromTrait` of the just previously converted `RelNode` instead
-  of the original `RelNode`.
-* Disable a MongoDB test, pending
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-270">CALCITE-270</a>].
-* Hush warnings from `SplunkAdapterTest` if Splunk is not available.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-252">CALCITE-252</a>]
-  Scalar sub-query that returns 0 rows should become NULL value
-* `SplunkAdapterTest` now uses the same Foodmart database as `JdbcTest`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-242">CALCITE-242</a>]
-  SplunkAdapterTest fails
-* Remove some obsolete classes.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-205">CALCITE-205</a>]
-  Suspicious map.get in VolcanoPlanner.reregister
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.6">0.6</a> / 2014-04-11
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-214">CALCITE-214</a>]
-  Modify Frameworks to allow Schema to be re-used
-  Obsoletes `name` field of `ReflectiveSchema`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-237">CALCITE-237</a>]
-  Allow user-defined aggregate functions (UDAs) to be defined in a model
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-227">CALCITE-227</a>]
-  Extend `EXTRACT` function to support `DATE`, `TIME` and `TIMESTAMP` values
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-222">CALCITE-222</a>]
-  User-defined table macros
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-179">CALCITE-179</a>]
-  Optiq on Windows
-  * Add `sqlline.bat` and fix issues running `sqlline` under Cygwin.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-195">CALCITE-195</a>]
-  Push aggregation into MongoDB adapter
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-193">CALCITE-193</a>]
-  Implement OFFSET and LIMIT in MongoDB adapter
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-164">CALCITE-164</a>]
-  Improve query performance of optiq over MongoDB
-* Add Phoenix (HBase) SQL dialect (Bruno Dumon)
-
-API changes
-* Obsolete `RexImpTable.AggregateImplementor` and rename `AggImplementor2`.
-  (**This is a breaking change**.)
-* Convert `CombinedParser.jj` into freemarker template to allow
-  custom parser implementations. (Venki Korukanti)
-* Extend `Planner` to pass a custom `ConvertletTable` and custom SQL parser.
-* In `Frameworks`, add a way to specify list of `TraitDef`s that will be used
-  by planner. (Jinfeng Ni)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-198">CALCITE-198</a>]
-  Use `RexExecutor` to evaluate projections and filters
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-219">CALCITE-219</a>]
-  Parse `ALTER scope SET option = value` statement
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-215">CALCITE-215</a>]
-  A Schema should not have to remember its name and parent
-  (**This is a breaking change**.)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-180">CALCITE-180</a>]
-  Common base class for TableFunction, ScalarFunction
-  (**This is a breaking change**.)
-* Add methods for dealing with symbols; deprecate
-  `SqlLiteral.booleanValue(SqlNode)`, `SqlLiteral.symbolValue(SqlNode)`.
-* Add `RelOptPlanner.clear()`; now it is safe to call `transform` twice.
-  (Jinfeng Ni)
-* Remove APIs deprecated for 0.5.
-* Move around some operator classes and singletons.
-
-Bug fixes and internal changes
-* Upgrade to linq4j-0.2.
-* `FETCH` and `LIMIT` are ignored during SQL-to-RelNode translation.
-  (Venki Korukanti)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-245">CALCITE-245</a>]
-  Off-by-one translation of ON clause of JOIN
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-191">CALCITE-191</a>]
-  Rotate time/date/timestamp vals to local timezone
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-244">CALCITE-244</a>]
-  `RelOptTableImpl.create` always expects `QueryableTable` type in
-  `OptiqSchema.TableEntry`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-225">CALCITE-225</a>]
-  Optiq doesn't correctly decorrelate queries
-* Clean up package-info.  Remove duplicates in test packages so they
-  don't conflict with those in non-test packages.
-* Add `Pair.adjacents(Iterable)`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-199">CALCITE-199</a>]
-  Various `ANY` type conditions aren't correctly being considered
-  (Jacques Nadeau)
-* Add files to `.gitignore` that shouldn't be checked in when using
-  Eclipse. (Jacques Nadeau)
-* Add class `ControlFlowException`, and make it base class of
-  existing control-flow exception classes.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-232">CALCITE-232</a>]
-  Sum and avg of empty set should be null as per SQL specification
-* Add `SqlUnresolvedFunction`, to improve how return type of
-  user-defined functions is resolved. (Vladimir Sitnikov)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-228">CALCITE-228</a>]
-  Error while compiling generated Java code when using UDF in expression
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-226">CALCITE-226</a>]
-  User-defined functions should work without explicit schema prefix
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-229">CALCITE-229</a>]
-  Join between different JDBC schemas not implementable
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-230">CALCITE-230</a>]
-  RemoveSortRule derives trait set from sort, should derive it from sort's child
-* Test view and sub-query with `ORDER BY` and `LIMIT`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-223">CALCITE-223</a>]
-  Add `NOTICE` and `LICENSE` files in all generated JAR files
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-209">CALCITE-209</a>]
-  Consistent strategy for line-endings in tests
-  Convert uses of `NL` in tests to Linux newline "\n".
-  This makes string constants simpler.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-218">CALCITE-218</a>]
-  Functions case sensitive when using `Lex.MYSQL`
-* Add tests that a query with aggregate expressions in the `SELECT`
-  clause is considered an aggregate query, even if there is no `GROUP BY`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-216">CALCITE-216</a>]
-  Inconsistent use of provided operator table causes inability to
-  add aggregate functions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-200">CALCITE-200</a>]
-  Javadoc generation fails under JDK 1.8
-* Add class `XmlOutput` (based on `org.eigenbase.xom.XMLOutput`) and remove
-  dependency on eigenbase-xom.
-* Performance: Don't create stack-trace for exceptions used for control-flow.
-  (Vladimir Sitnikov)
-* Performance: Tune `RexProgramBuilder` by using `Pair` rather than `String` as
-  expression key. (Vladimir Sitnikov)
-* Fix NPE using TRIM function with JDBC. (Bruno Dumon)
-* Add dependency on
-  <a href="https://github.com/julianhyde/hydromatic-resource">hydromatic-resource-maven-plugin</a>
-  and obsolete our copy of the resource framework.
-* Fix race condition in `SpaceList`.
-* In planner, use `RelTrait.subsumes` rather than `equals` in an assert.
-  (Jinfeng Ni)
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.5">0.5</a> / 2014-03-14
-
-New features
-* Allow `quoting`, `quotedCasing`, `unquotedCasing`, and `caseSensitive`
-  properties to be specified explicitly (Vladimir Sitnikov)
-* Recognize more kinds of materializations, including filter-on-project (where
-  project contains expressions) and some kinds of aggregation.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-128">CALCITE-128</a>]
-  Support `WITH` queries (common table expressions)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-53">CALCITE-53</a>]
-  Allow `WHEN` clause in simple `CASE` expression to have multiple values
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-156">CALCITE-156</a>]
-  Optiq should recognize 'SYSTEM TABLE', 'JOIN', 'INDEX' as table types
-* Support querying ARRAY columns from JDBC source. (Gabriel Reid)
-
-API changes
-* Add `ProjectRelBase.copy(RelTraitSet, RelNode, List&lt;RexNode&gt;,
-  RelDataType)` and make `ProjectRelBase.copy(RelTraitSet, RelNode)` final.
-  (**This is a breaking change** for sub-classes of `ProjectRelBase`.)
-* Change `RexBuilder.makeRangeReference` parameter type.
-* `RexBuilder.makeInputRef` replaces `RelOptUtil.createInputRef`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-160">CALCITE-160</a>]
-  Allow comments in schema definitions
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-147">CALCITE-147</a>]
-  Create a new kind of `SqlCall` that keeps operands in fields, not an operands
-  array
-  * Very widely used parse tree nodes with complex operands, including
-    `SqlSelect`, `SqlJoin`, `SqlInsert`, and a new node type `SqlOrderBy`, are
-    now sub-classes of `SqlCall` but not `SqlBasicCall`.
-  * (**This is a breaking change** to code that assumes that, say,
-    `SqlSelect` has an `operands` field.)
-* Convert all enum constants to upper-case.
-  (**This is a breaking change**.)
-
-Bug-fixes and internal changes
-* Generate optiq-core-VERSION-tests.jar not parent-VERSION-tests.jar.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-176">CALCITE-176</a>]
-  ORDER BY expression doesn't work with SELECT \*
-* Fix VARCHAR casts sent to hsqldb source (Bruno Dumon)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-143">CALCITE-143</a>]
-  Remove dependency on eigenbase-resgen
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-173">CALCITE-173</a>]
-  Case-insensitive table names are not supported for `Casing.UNCHANGED`
-* `DATE.getLimit` now returns `Calendar` in GMT time zone (Vladimir Sitnikov)
-* Set `en_US` locale in tests that match against error numbers, dates
-  (Vladimir Sitnikov)
-* Use 1 test thread per CPU to avoid thread starvation on dual core CPUs
-  (Vladimir Sitnikov)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-174">CALCITE-174</a>]
-  Move hsqldb to test scope
-* Add unit tests for `RexExecutorImpl`.
-* Correct JSON model examples in Javadoc comments. (Karel Vervaeke)
-* Move test reference logs from `src/test/java` to `src/test/resources`
-  (reduces the number of 'untracked files' reported by git)
-* Tune `Util.SpaceList`, fix race condition, and move into new utility class
-  `Spaces`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-163">CALCITE-163</a>]
-  Equi-join warning
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-157">CALCITE-157</a>]
-  Handle `SQLFeatureNotSupported` when calling `setQueryTimeout`
-  (Karel Vervaeke)
-* Fix Optiq on Windows. (All tests and checkstyle checks pass.)
-* In checkstyle, support Windows-style file separator, otherwise build fails in
-  Windows due to suppressions not used. (Vladimir Sitnikov)
-* Enable MongoDB tests when `-Dcalcite.test.mongodb=true`.
-* Cleanup cache exception-handling and an assert.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-153">CALCITE-153</a>]
-  Error using MongoDB adapter: Failed to set setXIncludeAware(true)
-* Disable spark engine unless Spark libraries are on the class path and
-  `spark=true` is specified in the connect string.
-* Fix path to `mongo-zips-model.json` in HOWTO. (Mariano Luna)
-* Fix bug deriving the type of a join-key.
-* Fix the value of `ONE_MINUS_EPSILON`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-158">CALCITE-158</a>]
-  Optiq fails when call `Planner.transform()` multiple times, each with
-  different ruleset
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-148">CALCITE-148</a>]
- Less verbose description of collation. Also, optimize `RelTraitSet` creation
- and amortize `RelTraitSet.toString()`.
-* Add generics to SQL parser.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-145">CALCITE-145</a>]
-  Unexpected upper-casing of keywords when using java lexer
-* Remove duplicate `maven-source-plugin`.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-141">CALCITE-141</a>]
-  Downgrade to guava-11.0.2. (This is necessary for Hadoop compatibility.
-  Later versions of Guava can also be used.)
-* Upgrade to spark-0.9.0. (Because this version of spark is available from
-  maven-central, we can make optiq-spark part of the regular build, and remove
-  the spark profile.)
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.18">0.4.18</a> / 2014-02-14
-
-API and functionality changes
-* Configurable lexical policy
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-33">CALCITE-33</a>]
-      SQL parser should allow different identifier quoting
-    * [<a href="https://issues.apache.org/jira/browse/CALCITE-34">CALCITE-34</a>]
-      Policy for case-sensitivity of identifiers should be configurable
-    * New connect-string parameter "lex", with allowable values
-      "ORACLE", "MYSQL", "SQL_SERVER", "JAVA" sets policy to be like those
-      databases, in terms of quote string, whether quoted and unquoted
-      identifiers are converted to upper/lower case, and whether
-      identifiers are matched case-sensitively. "JAVA" is case-sensitive,
-      even for unquoted identifiers. It should be possible
-      for each connection to have its own settings for these. Objects
-      shared between sessions (views, materialized views) might
-      require more work.
-    * Added various internals to make it easy for developers to do the
-      right thing. When you need to look up a schema, table or
-      column/field name, you should use a catalog reader, and it will
-      apply the right case-sensitivity policy.
-    * Enable optiq consumer to utilize different lexical settings in
-      Frameworks/Planner. (Jacques Nadeau)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-135">CALCITE-115</a>]
-  Add a PARSE_TREE hook point with SqlNode parameter
-* Change planner rules to use `ProjectFactory` for creating
-  projects. (John Pullokkaran)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-131">CALCITE-131</a>]
-  Add interfaces for metadata (statistics)
-  (**This is a breaking change**.)
-* Update Avatica to allow `Cursor` & `Accessor` implementations to throw
-  `SQLException`. (Jacques Nadeau)
-* Separate cost model (`RelOptCostFactory`) from planner. Allow
-  `VolcanoPlanner` to be sub-classed with different cost factory.
-    * Remove references to VolcanoCost from RelSubset, so clients can
-      use a different `RelOptCost`. (Harish Butani)
-    * Make `VolcanoCost` immutable.
-* Break `SqlTypeStrategies` into `OperandTypes`, `ReturnTypes` and
-  `InferTypes`, and rename its static members to upper-case, per
-  checkstyle. (**This is a breaking change**.)
-* Add a mechanism for defining configuration parameters and have them
-  appear in the responses to `AvaticaDatabaseMetaData` methods.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-113">CALCITE-113</a>]
-  User-defined scalar functions
-* Add rules to short-cut a query if `LIMIT 0` is present. Also remove
-  sort, aggregation, join if their inputs are known to be empty, and
-  propagate the fact that the relational expressions are known to be
-  empty up the tree. (We already do this for union, filter, project.)
-* `RexNode` and its sub-classes are now immutable.
-
-Bug fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-61">CALCITE-16</a>]
-  Upgrade to janino-2.7
-* Upgrade to guava-15.0 (guava-14.0.1 still allowed), sqlline-1.1.7,
-  maven-surefire-plugin-2.16, linq4j-0.1.13.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-136">CALCITE-136</a>]
-  Support Hive dialect
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-138">CALCITE-138</a>]
-  SqlDataTypeSpec.clone handles collection types wrong
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-137">CALCITE-137</a>]
-  If a subset is created that is subsumed by an existing subset, its
-  'best' is not assigned
-    * If best rel in a Volcano subset doesn't have metadata, see if
-      other rels have metadata.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-127">CALCITE-127</a>]
-  EnumerableCalcRel can't support 3+ AND conditions (Harish Butani)
-* Fix push-down of datetime literals to JDBC data sources.
-* Add `Util.startsWith(List, List)` and `Util.hashCode(double)`.
-* Add maven-checkstyle-plugin, enable in "verify" phase, and fix exceptions.
-* Fix `SqlValidator` to rely on `RelDataType` to do field name matching.  Fix
-  `RelDataTypeImpl` to correctly use the case sensitive flag rather than
-  ignoring it.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-119">CALCITE-119</a>]
-  Comparing Java type long with SQL type INTEGER gives wrong answer
-* Enable multi-threaded testing, and fix race conditions.
-    * Two of the race conditions involved involving trait caches. The
-      other was indeterminacy in type system when precision was not
-      specified but had a default; now we canonize TIME to TIME(0), for
-      instance.
-* Convert files to `us-ascii`.
-* Work around
-  [<a href="http://jira.codehaus.org/browse/JANINO-169">JANINO-169</a>].
-* Refactor SQL validator testing infrastructure so SQL parser is
-  configurable.
-* Add `optiq-mat-plugin` to README.
-* Fix the check for duplicate subsets in a rule match.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-112">CALCITE-112</a>]
-  Java boolean column should be treated as SQL boolean
-* Fix escaped unicode characters above 0x8000. Add tests for unicode
-  strings.
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.17">0.4.17</a> / 2014-01-13
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-106">CALCITE-106</a>]
-  Make `Schema` and `Table` SPIs simpler to implement, and make them
-  re-usable across connections
-  (**This is a breaking change**.)
-* Make it easier to define sub-classes of rule operands. The new class
-  `RelOptRuleOperandChildren` contains the children of an operand and
-  the policy for dealing with them. Existing rules now use the new
-  methods to construct operands: `operand()`, `leaf()`, `any()`, `none()`,
-  `unordered()`. The previous methods are now deprecated and will be
-  removed before 0.4.18. (**This is a breaking change**.)
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-101">CALCITE-101</a>]
-  Enable phased access to the Optiq engine
-* List-handling methods in `Util`: add methods `skipLast`, `last`, `skip`;
-  remove `subList`, `butLast`.
-* Convert `SqlIdentifier.names` from `String[]` to `ImmutableList<String>`.
-* Rename `OptiqAssert.assertThat()` to `that()`, to avoid clash with junit's
-  `Assert.assertThat()`.
-* Usability improvements for `RelDataTypeFactory.FieldInfoBuilder`. It
-  now has a type-factory, so you can just call `build()`.
-* Rework `HepProgramBuilder` into a fluent API.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-105">CALCITE-105</a>]
-  Externalize RelNode to and from JSON
-
-Tuning
-* If `EnumerableAggregateRel` has no aggregate functions, generate a
-   call to `Enumerable.distinct()`, thereby saving the effort of
-   building trivial accumulators.
-* Default rule set now does not introduce `CalcRel` until a later phase
-  of planning. This reduces the number of trivial projects and calcs
-  created, merged, and elimated.
-* Reduce the amount of time spent creating record types that
-  already exist.
-* More efficient implementation of `Util.isDistinct` for small lists.
-* When an internal record has 0 fields, rather than generating a
-  synthetic class and lots of instances that are all the same, use the
-  new `Unit` class, which is a singleton.
-* To take advantage of asymmetric hash join added recently in linq4j,
-  tweak cost of `EnumerableJoinRel` so that join is cheaper if the
-  larger input is on the left, and more expensive if it is a cartesian
-  product.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-70">CALCITE-70</a>]
-  Joins seem to be very expensive in memory
-* Make planning process more efficient by not sorting the list of
-  matched rules each cycle. It is sorted if tracing is enabled;
-  otherwise we scan to find the most important element. For this list,
-  replace `LinkedList` with `ChunkList`, which has an O(1) remove and add,
-  a fast O(n) get, and fast scan.
-
-Other
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-87">CALCITE-87</a>]
-  Constant folding
-  * Rules for constant-expression reduction, and to simplify/eliminate
-    `VALUES` operator.
-* Graph algorithms: Implement breadth-first iterator and cycle-detector.
-* Fix bug in planner which occurred when two `RelNode`s have identical
-  digest but different row-type.
-* Fix link to optiq-csv tutorial.
-* Fix bugs in `RemoveTrivialProjectRule.strip`, `JdbcProjectRel.implement`
-  and `SortRel.computeSelfCost`.
-* Reformat code, and remove `@author` tags.
-* Upgrade to eigenbase-xom-1.3.4, eigenbase-properties-1.1.4,
-  eigenbase-resgen-1.3.6.
-* Upgrade to linq4j-0.1.12.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-97">CALCITE-97</a>]
-  Correlated EXISTS
-* Fix a bug in `VolcanoCost`.
-* Add class `FoodMartQuerySet`, that contains the 6,700 foodmart queries.
-* Fix factory class names in `UnregisteredDriver`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-96">CALCITE-96</a>]
-  LIMIT against a table in a clone schema causes UnsupportedOperationException
-* Disable spark module by default.
-* Allow `CloneSchema` to be specified in terms of url, driver, user,
-  password; not just dataSource.
-* Wrap internal error in `SQLException`.
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.16">0.4.16</a> / 2013-11-24
-
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-69">CALCITE-69</a>]
-  Can't join on string columns and other problems with expressions in the join
-  condition
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-74">CALCITE-74</a>]
-  JOIN ... USING fails in 3-way join with UnsupportedOperationException.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-65">CALCITE-65</a>]
-  Fix issues in the JDBC driver, and in particular to DatabaseMetaData methods,
-  to make Squirrel-SQL run better.
-* Fix JDBC column, table, schema names for when the table is not in a schema of
-  depth 1.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-85">CALCITE-85</a>]
-  Adding a table to the root schema causes breakage in OptiqPrepareImpl
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-84">CALCITE-84</a>]
-  Extract Optiq's JDBC driver as a new JDBC driver framework, Avatica.
-  Other projects can use this to implement a JDBC driver by implementing
-  just a few methods. If you wish to use Optiq's JDBC driver, you will
-  now need to include optiq-avatica.jar in addition to optiq-core.jar.
-  Avatica does not depend on anything besides the standard Java library.
-* Support for parameters in PreparedStatement.
-* First steps in recognizing complex materializations. Internally we introduce a
-  concept called a "star table", virtual table composed of real tables joined
-  together via many-to-one relationships. The queries that define
-  materializations and end-user queries are canonized in terms of star tables.
-  Matching (not done yet) will then be a matter of looking for sort, groupBy,
-  project. It is not yet possible to define a star in an Optiq model file.
-* Add section to <a href="howto.md">HOWTO</a> on implementing adapters.
-* Fix data type conversions when creating a clone table in memory.
-* Fix how strings are escaped in JsonBuilder.
-* Test suite now depends on an embedded hsqldb database, so you can run
-  <code>mvn test</code> right after pulling from git. You can instead use a
-  MySQL database if you specify '-Dcalcite.test.db=mysql', but you need to
-  manually populate it.
-* Fix a planner issue which occurs when the left and right children of join are
-  the same relational expression, caused by a self-join query.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-76">CALCITE-76</a>]
-  Precedence of the item operator, <code>map[index]</code>; remove the space
-  before '[' when converting parse tree to string.
-* Allow <code>CAST(expression AS ANY)</code>, and fix an issue with the ANY type
-  and NULL values.
-* Handle null timestamps and dates coming out of JDBC adapter.
-* Add <code>jdbcDriver</code> attribute to JDBC schema in model, for drivers
-  that do not auto-register.
-* Allow join rules to match any subclass of JoinRelBase.
-* Push projects, filters and sorts down to MongoDB. (Fixes
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-57">CALCITE-57</a>],
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-60">CALCITE-60</a>] and
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-72">CALCITE-72</a>].)
-* Add instructions for loading FoodMart data set into MongoDB, and how to enable
-  tracing.
-* Now runs on JDK 1.8 (still runs on JDK 1.6 and JDK 1.7).
-* Upgrade to junit-4.11 (avoiding the dodgy junit-4.1.12).
-* Upgrade to linq4j-0.1.11.
-
-## <a href="https://github.com/apache/incubator-calcite/releases/tag/optiq-parent-0.4.15">0.4.15</a> / 2013-10-14
-
-* Lots of good stuff that this margin is too small to contain. See
-  <a href="reference.md">SQL language reference</a> and
-  <a href="model.md">JSON model reference</a>.
-
-# Optiq-csv release history
-
-Optiq-csv-0.3 was the last independent release of optiq-csv. From
-calcite-0.9.2 onwards, the code was included as the
-calcite-example-csv module.
-
-* Upgrade to calcite-0.9.1
-* Support gzip-compressed CSV and JSON files (recognized by '.gz' suffix)
-* Cleanup, and fix minor timezone issue in a test
-* Support for date types (date, time, timestamp) (Martijn van den Broek)
-* Upgrade to optiq-0.8, optiq-avatica-0.8, linq4j-0.4
-* Add support for JSON files (recognized by '.json' suffix)
-* Upgrade maven-release-plugin to version 2.4.2
-* Upgrade to optiq-0.6, linq4j-0.2
-* Add NOTICE and LICENSE files in generated JAR file
-
-## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.3">0.3</a> / 2014-03-21
-
-* Upgrade to optiq-0.5
-* Add workaround to
-  [<a href="https://github.com/jline/jline2/issues/62">JLINE2-62</a>]
-  to `sqlline.bat` (windows) and `sqlline` (windows using cygwin)
-* Fix classpath construction: `sqlline.bat` copies dependencies to
-  `target/dependencies`; `sqlline` constructs `target/classpath.txt`
-* Build, checkstyle and tests now succeed on windows (both native and cygwin)
-* Models can now contain comments
-* [<a href="https://github.com/julianhyde/optiq-csv/issues/2">OPTIQ-CSV-2</a>]
-  Update tutorial to reflect changes to Optiq's JDBC adapter
-
-## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.2">0.2</a> / 2014-02-18
-
-* Add test case for
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-112">CALCITE-112</a>]
-* Add `sqlline.bat`, Windows SQL shell (based on fix for
-  [<a href="https://issues.apache.org/jira/browse/DRILL-338">DRILL-338</a>])
-* Upgrade to optiq-0.4.18, sqlline-1.1.7
-* Return a single object for single-col enumerator (Gabriel Reid)
-* Enable maven-checkstyle-plugin; fix checkstyle exceptions
-
-## <a href="https://github.com/julianhyde/optiq-csv/releases/tag/optiq-csv-0.1">0.1</a> / 2014-01-13
-
-* Add release notes and history
-* Enable maven-release-plugin
-* Upgrade to optiq-0.4.17, linq4j-0.1.12, sqlline-1.1.6
-* Upgrade tutorial for new Schema and Table SPIs
-* Fixes for optiq SPI changes in
-  [<a href="https://issues.apache.org/jira/browse/CALCITE-106">CALCITE-106</a>]
-* Enable oraclejdk8 in Travis CI
-* Fix bug where non-existent directory would give NPE; instead print warning
-* Add an example of a planner rule
-* Add `CsvTableFactory`, an example of a custom table
-* Add a view to tutorial
-* Split into scenario with a "simple" schema that generates tables
-  (`CsvTable`) that just execute and a "smart" schema that generates
-  tables (`CsvSmartTable`) that undergo optimization
-* Make `CsvEnumerator` a top-level class
-* Implement the algorithms to sniff names and types from the first
-  row, and to return an enumerator of all rows
-* Read column types from header of CSV file
-
-# Linq4j release history
-
-Linq4j-0.4 was the last independent release of linq4j. From
-calcite-0.9.2 onwards, the code was included as calcite-linq4j, and
-features added to linq4j in a particular calcite release are described
-with the other changes in that release.
-
-## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.4">0.4</a> / 2014-05-28
-
-* Fix <a href="https://github.com/julianhyde/linq4j/issues/27">#27</a>,
-  "Incorrectly inlines non-final variable".
-* Maven build process now deploys web site.
-* Implement `Enumerable` methods: `any`, `all`,
-  `contains` with `EqualityComparer`, `first`, `first` with predicate.
-
-## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.3">0.3</a> / 2014-04-21
-
-* Move optimizer visitor from optiq to linq4j; add
-  `ExpressionType.modifiesLvalue` to avoid invalid inlining.
-* Fix <a href="https://github.com/julianhyde/linq4j/issues/17">#17</a>,
-  "Assign constant expressions to 'static final' members";
-  add `@Deterministic` annotation to help deduce which expressions are
-  constant.
-* Multi-pass optimization: some of the variables might be avoided and
-  inlined after the first pass.
-* Various other peephole optimizations: `Boolean.valueOf(const)`,
-  'not' expressions (`!const`, `!!a`, `!(a==b)`, `!(a!=b)`, `!(a>b)`,
-  etc.),
-  '?' expressions coming from `CASE` (`a ? booleanConstant : b` and `a
-  ? b : booleanConstant`).
-* Implement left, right and full outer join.
-* Clean build on cygwin/Windows.
-
-## <a href="https://github.com/julianhyde/linq4j/releases/tag/linq4j-0.2">0.2</a> / 2014-04-11
-
-* Fix <a href="https://github.com/julianhyde/linq4j/issues/8">#8</a>,
-  "Javadoc generation fails under JDK 1.8".
-* Fix <a href="https://github.com/julianhyde/linq4j/issues/15">#15</a>,
-  "`Expressions.ifThenElse` does not work".
-* Use `HashMap` for searching of declarations to reuse; consider both
-  `optimizing` and `optimize` flags when reusing.
-* Implement `equals` and `hashCode` for expressions. Hash codes for
-  complex expressio

<TRUNCATED>


[02/19] incubator-calcite git commit: [maven-release-plugin] prepare release calcite-1.3.0-incubating

Posted by jh...@apache.org.
[maven-release-plugin] prepare release calcite-1.3.0-incubating


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

Branch: refs/heads/master
Commit: 495f1859f84b41ae70b2099c3d15c696a49a5100
Parents: 4307b80
Author: Julian Hyde <jh...@apache.org>
Authored: Thu May 21 13:24:26 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu May 21 13:24:26 2015 -0700

----------------------------------------------------------------------
 avatica-server/pom.xml |  4 ++--
 avatica/pom.xml        |  4 ++--
 core/pom.xml           |  4 ++--
 example/csv/pom.xml    |  4 ++--
 example/pom.xml        |  4 ++--
 linq4j/pom.xml         |  4 ++--
 mongodb/pom.xml        |  4 ++--
 plus/pom.xml           |  4 ++--
 pom.xml                | 16 ++++++++--------
 spark/pom.xml          |  4 ++--
 splunk/pom.xml         |  4 ++--
 ubenchmark/pom.xml     |  2 +-
 12 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/avatica-server/pom.xml
----------------------------------------------------------------------
diff --git a/avatica-server/pom.xml b/avatica-server/pom.xml
index c176079..15d7dc6 100644
--- a/avatica-server/pom.xml
+++ b/avatica-server/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-avatica-server</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Avatica Server</name>
   <description>JDBC server.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/avatica/pom.xml
----------------------------------------------------------------------
diff --git a/avatica/pom.xml b/avatica/pom.xml
index 603b025..31ebb53 100644
--- a/avatica/pom.xml
+++ b/avatica/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-avatica</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Avatica</name>
   <description>JDBC driver framework.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index d898cc4..ffca322 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-core</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Core</name>
   <description>Core Calcite APIs and engine.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/example/csv/pom.xml
----------------------------------------------------------------------
diff --git a/example/csv/pom.xml b/example/csv/pom.xml
index 974f31e..b673d1e 100644
--- a/example/csv/pom.xml
+++ b/example/csv/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite-example</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-example-csv</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Example CSV</name>
   <description>An example Calcite provider that reads CSV files</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/example/pom.xml
----------------------------------------------------------------------
diff --git a/example/pom.xml b/example/pom.xml
index df9d4b1..660ccd2 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -20,13 +20,13 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <!-- The basics. -->
   <artifactId>calcite-example</artifactId>
   <packaging>pom</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Examples</name>
   <description>Calcite examples</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/linq4j/pom.xml
----------------------------------------------------------------------
diff --git a/linq4j/pom.xml b/linq4j/pom.xml
index 14ee452..846f899 100644
--- a/linq4j/pom.xml
+++ b/linq4j/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-linq4j</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Linq4j</name>
   <description>Calcite APIs for LINQ (Language-Integrated Query) in Java</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/mongodb/pom.xml b/mongodb/pom.xml
index 409ae51..2222ff4 100644
--- a/mongodb/pom.xml
+++ b/mongodb/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-mongodb</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite MongoDB</name>
   <description>MongoDB adapter for Calcite</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/plus/pom.xml
----------------------------------------------------------------------
diff --git a/plus/pom.xml b/plus/pom.xml
index 51d08e7..76c4d87 100644
--- a/plus/pom.xml
+++ b/plus/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-plus</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Plus</name>
   <description>Miscellaneous extras for Calcite</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 187321d..7dc1f2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
   <groupId>org.apache.calcite</groupId>
   <artifactId>calcite</artifactId>
   <packaging>pom</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
 
   <!-- More project information. -->
   <name>Calcite</name>
@@ -61,7 +61,7 @@ limitations under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</developerConnection>
     <url>https://github.com/apache/incubator-calcite</url>
-    <tag>HEAD</tag>
+    <tag>calcite-1.3.0-incubating</tag>
   </scm>
 
   <modules>
@@ -88,34 +88,34 @@ limitations under the License.
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
         <type>test-jar</type>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica-server</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-core</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-core</artifactId>
         <type>test-jar</type>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-linq4j</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.3.0-incubating</version>
       </dependency>
 
       <!-- Now third-party dependencies, sorted by groupId and artifactId. -->

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/spark/pom.xml
----------------------------------------------------------------------
diff --git a/spark/pom.xml b/spark/pom.xml
index 24f915c..d010263 100644
--- a/spark/pom.xml
+++ b/spark/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-spark</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Spark</name>
 
   <properties>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/splunk/pom.xml
----------------------------------------------------------------------
diff --git a/splunk/pom.xml b/splunk/pom.xml
index 8898c43..61c0acb 100644
--- a/splunk/pom.xml
+++ b/splunk/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <artifactId>calcite-splunk</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating-SNAPSHOT</version>
+  <version>1.3.0-incubating</version>
   <name>Calcite Splunk</name>
   <description>Splunk adapter for Calcite; also a JDBC driver for Splunk</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/495f1859/ubenchmark/pom.xml
----------------------------------------------------------------------
diff --git a/ubenchmark/pom.xml b/ubenchmark/pom.xml
index 85c1de5..bc40d9d 100644
--- a/ubenchmark/pom.xml
+++ b/ubenchmark/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating-SNAPSHOT</version>
+    <version>1.3.0-incubating</version>
   </parent>
 
   <properties>


[07/19] incubator-calcite git commit: Enable Travis CI on new-master branch and bug-fix branches named "NNN-description"

Posted by jh...@apache.org.
Enable Travis CI on new-master branch and bug-fix branches named "NNN-description"


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

Branch: refs/heads/master
Commit: 20f591246448778e010ba822b5b9103dcda945b5
Parents: 37535f8
Author: Julian Hyde <jh...@apache.org>
Authored: Wed May 27 17:55:41 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed May 27 17:55:41 2015 -0700

----------------------------------------------------------------------
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/20f59124/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 6e872fb..f193dd8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,8 +23,10 @@ jdk:
 branches:
   only:
     - master
+    - new-master
     - javadoc
     - /^branch-.*$/
+    - /^[0-9]+-.*$/
 script:
   mvn -Dsurefire.useFile=false test site
 git:


[12/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/howto.md
----------------------------------------------------------------------
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
new file mode 100644
index 0000000..9aabeda
--- /dev/null
+++ b/site/_docs/howto.md
@@ -0,0 +1,810 @@
+---
+layout: docs
+title: HOWTO
+permalink: /docs/howto.html
+---
+
+<!--
+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.
+-->
+{% assign sourceRoot = "http://github.com/apache/incubator-calcite/blob/master" %}
+
+Here's some miscellaneous documentation about using Calcite and its various
+adapters.
+
+## Building from a source distribution
+
+Prerequisites are maven (3.2.1 or later)
+and Java (JDK 1.7 or later, 1.8 preferred) on your path.
+
+Unpack the source distribution `.tar.gz` or `.zip` file,
+`cd` to the root directory of the unpacked source,
+then build using maven:
+
+{% highlight bash %}
+$ tar xvfz calcite-1.3.0-incubating-source.tar.gz
+$ cd calcite-1.3.0-incubating
+$ mvn install
+{% endhighlight %}
+
+[Running tests](#running-tests) describes how to run more or fewer
+tests.
+
+## Building from git
+
+Prerequisites are git, maven (3.2.1 or later)
+and Java (JDK 1.7 or later, 1.8 preferred) on your path.
+
+Create a local copy of the github repository,
+`cd` to its root directory,
+then build using maven:
+
+{% highlight bash %}
+$ git clone git://github.com/apache/incubator-calcite.git
+$ cd incubator-calcite
+$ mvn install
+{% endhighlight %}
+
+[Running tests](#running-tests) describes how to run more or fewer
+tests.
+
+## Running tests
+
+The test suite will run by default when you build, unless you specify
+`-DskipTests`:
+
+{% highlight bash %}
+# Note: "mvn clean install" does not work; use "mvn clean" then "mvn install"
+$ mvn clean 
+$ mvn -DskipTests install
+{% endhighlight %}
+
+There are other options that control which tests are run, and in what
+environment, as follows.
+
+* `-Dcalcite.test.db=DB` (where db is `h2`, `hsqldb`, `mysql`, or `postgresql`) allows you
+  to change the JDBC data source for the test suite. Calcite's test
+  suite requires a JDBC data source populated with the foodmart data
+  set.
+   * `hsqldb`, the default, uses an in-memory hsqldb database.
+   * All others access a test virtual machine
+     (see [integration tests](#running-integration-tests) below).
+     `mysql` and `postgresql` might be somewhat faster than hsqldb, but you need
+     to populate it (i.e. provision a VM).
+* `-Dcalcite.debug` prints extra debugging information to stdout.
+* `-Dcalcite.test.slow` enables tests that take longer to execute. For
+  example, there are tests that create virtual TPC-H and TPC-DS schemas
+  in-memory and run tests from those benchmarks.
+* `-Dcalcite.test.splunk=true` enables tests that run against Splunk.
+  Splunk must be installed and running.
+
+## Running integration tests
+
+For testing Calcite's external adapters, a test virtual machine should be used.
+The VM includes H2, HSQLDB, MySQL, MongoDB, and PostgreSQL.
+
+Test VM requires 5GiB of disk space and it takes 30 minutes to build.
+
+Note: you can use [calcite-test-dataset](https://github.com/vlsi/calcite-test-dataset)
+ to populate your own database, however it is recommended to use test VM so the test environment can be reproduced.
+
+### VM preparation
+
+0) Install dependencies: [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
+
+1) Clone https://github.com/vlsi/calcite-test-dataset.git at the same level as calcite repository.
+For instance:
+
+{% highlight bash %}
+code
+  +-- calcite
+  +-- calcite-test-dataset
+{% endhighlight %}
+
+Note: integration tests search for ../calcite-test-dataset or ../../calcite-test-dataset.
+ You can specify full path via calcite.test.dataset system property.
+
+2) Build and start the VM:
+
+{% highlight bash %}
+cd calcite-test-dataset && mvn install
+{% endhighlight %}
+
+### VM management
+
+Test VM is provisioned by Vagrant, so regular Vagrant `vagrant up` and `vagrant halt` should be used to start and stop the VM.
+The connection strings for different databases are listed in [calcite-test-dataset](https://github.com/vlsi/calcite-test-dataset) readme.
+
+### Suggested test flow
+
+Note: test VM should be started before you launch integration tests. Calcite itself does not start/stop the VM.
+
+Command line:
+
+* Executing regular unit tests (does not require external data): no change. `mvn test` or `mvn install`.
+* Executing all tests, for all the DBs: `mvn verify -Pit`. `it` stands for "integration-test". `mvn install -Pit` works as well.
+* Executing just tests for external DBs, excluding unit tests: `mvn -Dtest=foo -DfailIfNoTests=false -Pit verify`
+* Executing just MongoDB tests: `cd mongo; mvn verify -Pit`
+
+From within IDE:
+
+* Executing regular unit tests: no change.
+* Executing MongoDB tests: run `MongoAdapterIT.java` as usual (no additional properties are required)
+* Executing MySQL tests: run `JdbcTest` and `JdbcAdapterTest` with setting `-Dcalcite.test.db=mysql`
+* Executing PostgreSQL tests: run `JdbcTest` and `JdbcAdapterTest` with setting `-Dcalcite.test.db=postgresql`
+
+### Integration tests technical details
+
+Tests with external data are executed at maven's integration-test phase.
+We do not currently use pre-integration-test/post-integration-test, however we could use that in future.
+The verification of build pass/failure is performed at verify phase.
+Integration tests should be named `...IT.java`, so they are not picked up on unit test execution.
+
+## Contributing
+
+We welcome contributions.
+
+If you are planning to make a large contribution, talk to us first! It
+helps to agree on the general approach. Log a
+[JIRA case](https://issues.apache.org/jira/browse/CALCITE) for your
+proposed feature or start a discussion on the dev list.
+
+Fork the github repository, and create a branch for your feature.
+
+Develop your feature and test cases, and make sure that `mvn
+install` succeeds. (Run extra tests if your change warrants it.)
+
+Commit your change to your branch, and use a comment that starts with
+the JIRA case number, like this:
+
+`[CALCITE-345] AssertionError in RexToLixTranslator comparing to date literal`
+
+If your change had multiple commits, use `git rebase -i master` to
+combine them into a single commit, and to bring your code up to date
+with the latest on the main line.
+
+Then push your commit(s) to github, and create a pull request from
+your branch to the incubator-calcite master branch. Update the JIRA case
+to reference your pull request, and a committer will review your
+changes.
+
+## Getting started
+
+Calcite is a community, so the first step to joining the project is to introduce yourself.
+Join the [developers list](http://mail-archives.apache.org/mod_mbox/incubator-calcite-dev/)
+and send an email.
+
+If you have the chance to attend a [meetup](http://www.meetup.com/Apache-Calcite/),
+or meet [members of the community](http://calcite.incubator.apache.org/team-list.html)
+at a conference, that's also great.
+
+Choose an initial task to work on. It should be something really simple,
+such as a bug fix or a [Jira task that we have labeled
+"newbie"](https://issues.apache.org/jira/issues/?jql=labels%20%3D%20newbie%20%26%20project%20%3D%20Calcite%20%26%20status%20%3D%20Open).
+Follow the [contributing guidelines](#contributing) to get your change committed.
+
+After you have made several useful contributions we may
+[invite you to become a committer](https://community.apache.org/contributors/).
+We value all contributions that help to build a vibrant community, not just code.
+You can contribute by testing the code, helping verify a release,
+writing documentation or the web site,
+or just by answering questions on the list.
+
+## Tracing
+
+To enable tracing, add the following flags to the java command line:
+
+`-Dcalcite.debug=true -Djava.util.logging.config.file=core/src/test/resources/logging.properties`
+
+The first flag causes Calcite to print the Java code it generates
+(to execute queries) to stdout. It is especially useful if you are debugging
+mysterious problems like this:
+
+`Exception in thread "main" java.lang.ClassCastException: Integer cannot be cast to Long
+  at Baz$1$1.current(Unknown Source)`
+
+The second flag specifies a config file for
+the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
+framework. Put the following into core/src/test/resources/logging.properties:
+
+{% highlight properties %}
+handlers= java.util.logging.ConsoleHandler
+.level= INFO
+org.apache.calcite.plan.RelOptPlanner.level=FINER
+java.util.logging.ConsoleHandler.level=ALL
+{% endhighlight %}
+
+The line `org.apache.calcite.plan.RelOptPlanner.level=FINER` tells the planner to produce
+fairly verbose output. You can modify the file to enable other loggers, or to change levels.
+For instance, if you change `FINER` to `FINEST` the planner will give you an account of the
+planning process so detailed that it might fill up your hard drive.
+
+## CSV adapter
+
+See the [tutorial](/docs/tutorial.html).
+
+## MongoDB adapter
+
+First, download and install Calcite,
+and <a href="http://www.mongodb.org/downloads">install MongoDB</a>.
+
+Note: you can use MongoDB from integration test virtual machine above.
+
+Import MongoDB's zipcode data set into MongoDB:
+
+{% highlight bash %}
+$ curl -o /tmp/zips.json http://media.mongodb.org/zips.json
+$ mongoimport --db test --collection zips --file /tmp/zips.json
+Tue Jun  4 16:24:14.190 check 9 29470
+Tue Jun  4 16:24:14.469 imported 29470 objects
+{% endhighlight %}
+
+Log into MongoDB to check it's there:
+
+{% highlight bash %}
+$ mongo
+MongoDB shell version: 2.4.3
+connecting to: test
+> db.zips.find().limit(3)
+{ "city" : "ACMAR", "loc" : [ -86.51557, 33.584132 ], "pop" : 6055, "state" : "AL", "_id" : "35004" }
+{ "city" : "ADAMSVILLE", "loc" : [ -86.959727, 33.588437 ], "pop" : 10616, "state" : "AL", "_id" : "35005" }
+{ "city" : "ADGER", "loc" : [ -87.167455, 33.434277 ], "pop" : 3205, "state" : "AL", "_id" : "35006" }
+> exit
+bye
+{% endhighlight %}
+
+Connect using the
+[mongo-zips-model.json]({{ sourceRoot }}/mongodb/src/test/resources/mongo-zips-model.json)
+Calcite model:
+
+{% highlight bash %}
+$ ./sqlline
+sqlline> !connect jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json admin admin
+Connecting to jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json
+Connected to: Calcite (version 1.x.x)
+Driver: Calcite JDBC Driver (version 1.x.x)
+Autocommit status: true
+Transaction isolation: TRANSACTION_REPEATABLE_READ
+sqlline> !tables
++------------+--------------+-----------------+---------------+
+| TABLE_CAT  | TABLE_SCHEM  |   TABLE_NAME    |  TABLE_TYPE   |
++------------+--------------+-----------------+---------------+
+| null       | mongo_raw    | zips            | TABLE         |
+| null       | mongo_raw    | system.indexes  | TABLE         |
+| null       | mongo        | ZIPS            | VIEW          |
+| null       | metadata     | COLUMNS         | SYSTEM_TABLE  |
+| null       | metadata     | TABLES          | SYSTEM_TABLE  |
++------------+--------------+-----------------+---------------+
+sqlline> select count(*) from zips;
++---------+
+| EXPR$0  |
++---------+
+| 29467   |
++---------+
+1 row selected (0.746 seconds)
+sqlline> !quit
+Closing: org.apache.calcite.jdbc.FactoryJdbc41$CalciteConnectionJdbc41
+$
+{% endhighlight %}
+
+## Splunk adapter
+
+To run the test suite and sample queries against Splunk,
+load Splunk's `tutorialdata.zip` data set as described in
+<a href="http://docs.splunk.com/Documentation/Splunk/6.0.2/PivotTutorial/GetthetutorialdataintoSplunk">the Splunk tutorial</a>.
+
+(This step is optional, but it provides some interesting data for the sample
+queries. It is also necessary if you intend to run the test suite, using
+`-Dcalcite.test.splunk=true`.)
+
+## Implementing an adapter
+
+New adapters can be created by implementing `CalcitePrepare.Context`:
+
+{% highlight java %}
+import org.apache.calcite.adapter.java.JavaTypeFactory;
+import org.apache.calcite.jdbc.CalcitePrepare;
+import org.apache.calcite.jdbc.CalciteRootSchema;
+
+public class AdapterContext implements CalcitePrepare.Context {
+  @Override
+  public JavaTypeFactory getTypeFactory() {
+    // adapter implementation
+    return typeFactory;
+  }
+
+  @Override
+  public CalciteRootSchema getRootSchema() {
+    // adapter implementation
+    return rootSchema;
+  }
+}
+{% endhighlight %}
+
+### Testing adapter in Java
+
+The example below shows how SQL query can be submitted to
+`CalcitePrepare` with a custom context (`AdapterContext` in this
+case). Calcite prepares and implements the query execution, using the
+resources provided by the `Context`. `CalcitePrepare.PrepareResult`
+provides access to the underlying enumerable and methods for
+enumeration. The enumerable itself can naturally be some adapter
+specific implementation.
+
+{% highlight java %}
+import org.apache.calcite.jdbc.CalcitePrepare;
+import org.apache.calcite.prepare.CalcitePrepareImpl;
+import org.junit.Test;
+
+public class AdapterContextTest {
+  @Test
+  public void testSelectAllFromTable() {
+    AdapterContext ctx = new AdapterContext();
+    String sql = "SELECT * FROM TABLENAME";
+    Class elementType = Object[].class;
+    CalcitePrepare.PrepareResult<Object> prepared =
+        new CalcitePrepareImpl().prepareSql(ctx, sql, null, elementType, -1);
+    Object enumerable = prepared.getExecutable();
+    // etc.
+  }
+}
+{% endhighlight %}
+
+### JavaTypeFactory
+
+When Calcite compares types (instances of `RelDataType`), it requires them to be the same
+object. If there are two distinct type instances that refer to the
+same Java type, Calcite may fail to recognize that they match.  It is
+recommended to:
+
+* Use a single instance of `JavaTypeFactory` within the calcite context;
+* Store the types so that the same object is always returned for the same type.
+
+## Set up PGP signing keys (for Calcite committers)
+
+Follow instructions [here](http://www.apache.org/dev/release-signing) to
+create a key pair. (On Mac OS X, I did `brew install gpg` and
+`gpg --gen-key`.)
+
+Add your public key to the `KEYS` file by following instructions in
+the `KEYS` file.
+
+## Making a snapshot (for Calcite committers)
+
+Before you start:
+
+* Set up signing keys as described above.
+* Make sure you are using JDK 1.7 (not 1.8).
+* Make sure build and tests succeed with `-Dcalcite.test.db=hsqldb` (the default)
+
+{% highlight bash %}
+# Set passphrase variable without putting it into shell history
+read -s GPG_PASSPHRASE
+
+# Make sure that there are no junk files in the sandbox
+git clean -xn
+mvn clean
+
+mvn -Papache-release -Dgpg.passphrase=${GPG_PASSPHRASE} install
+{% endhighlight %}
+
+When the dry-run has succeeded, change `install` to `deploy`.
+
+## Making a release (for Calcite committers)
+
+Before you start:
+
+* Set up signing keys as described above.
+* Make sure you are using JDK 1.7 (not 1.8).
+* Check that `README`, `README.md` and `doc/howto.md` have the correct version number.
+* Set `version.major` and `version.minor` in `pom.xml`.
+* Make sure build and tests succeed, including with
+  -Dcalcite.test.db={mysql,hsqldb}, -Dcalcite.test.slow=true,
+  -Dcalcite.test.mongodb=true, -Dcalcite.test.splunk=true.
+* Trigger a
+  <a href="https://scan.coverity.com/projects/2966">Coverity scan</a>
+  by merging the latest code into the `julianhyde/coverity_scan` branch,
+  and when it completes, make sure that there are no important issues.
+* Make sure that
+  <a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20CALCITE%20AND%20status%20%3D%20Resolved%20and%20fixVersion%20is%20null">
+  every "resolved" JIRA case</a> (including duplicates) has
+  a fix version assigned (most likely the version we are
+  just about to release)
+
+Create a release branch named after the release, e.g. `branch-1.1`, and push it to Apache.
+
+{% highlight bash %}
+$ git checkout -b branch-X.Y
+$ git push -u origin branch-X.Y
+{% endhighlight %}
+
+We will use the branch for the entire the release process. Meanwhile,
+we do not allow commits to the master branch. After the release is
+final, we can use `git merge --ff-only` to append the changes on the
+release branch onto the master branch. (Apache does not allow reverts
+to the master branch, which makes it difficult to clean up the kind of
+messy commits that inevitably happen while you are trying to finalize
+a release.)
+
+Now, set up your environment and do a dry run. The dry run will not
+commit any changes back to git and gives you the opportunity to verify
+that the release process will complete as expected.
+
+If any of the steps fail, clean up (see below), fix the problem, and
+start again from the top.
+
+{% highlight bash %}
+# Set passphrase variable without putting it into shell history
+read -s GPG_PASSPHRASE
+
+# Make sure that there are no junk files in the sandbox
+git clean -xn
+mvn clean
+
+# Do a dry run of the release:prepare step, which sets version numbers.
+mvn -DdryRun=true -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare-dry.log
+{% endhighlight %}
+
+Check the artifacts:
+
+* In the `target` directory should be these 8 files, among others:
+  * apache-calcite-X.Y.Z-incubating-src.tar.gz
+  * apache-calcite-X.Y.Z-incubating-src.tar.gz.asc
+  * apache-calcite-X.Y.Z-incubating-src.tar.gz.md5
+  * apache-calcite-X.Y.Z-incubating-src.tar.gz.sha1
+  * apache-calcite-X.Y.Z-incubating-src.zip
+  * apache-calcite-X.Y.Z-incubating-src.zip.asc
+  * apache-calcite-X.Y.Z-incubating-src.zip.md5
+  * apache-calcite-X.Y.Z-incubating-src.zip.sha1
+* Note that the file names start `apache-calcite-` and include
+  `incubating` in the version.
+* In the two source distros `.tar.gz` and `.zip` (currently there is
+  no binary distro), check that all files belong to a directory called
+  `apache-calcite-X.Y.Z-incubating-src`.
+* That directory must contain files `DISCLAIMER`, `NOTICE`, `LICENSE`,
+  `README`, `README.md`
+  * Check that the version in `README` is correct
+* In each .jar (for example
+  `core/target/calcite-core-X.Y.Z-incubating.jar` and
+  `mongodb/target/calcite-mongodb-X.Y.Z-incubating-sources.jar`), check
+  that the `META-INF` directory contains `DEPENDENCIES`, `LICENSE`,
+  `NOTICE` and `git.properties`
+* In each .jar, check that `org-apache-calcite-jdbc.properties` is
+  present and does not contain un-substituted `${...}` variables
+* Check PGP, per [this](https://httpd.apache.org/dev/verification.html)
+
+Now, remove the `-DdryRun` flag and run the release for real.
+
+{% highlight bash %}
+# Prepare sets the version numbers, creates a tag, and pushes it to git.
+mvn -DdryRun=false -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare.log
+
+# Perform checks out the tagged version, builds, and deploys to the staging repository
+mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:perform 2>&1 | tee /tmp/perform.log
+{% endhighlight %}
+
+Verify the staged artifacts in the Nexus repository:
+
+* Go to [https://repository.apache.org/](https://repository.apache.org/) and login
+* Under `Build Promotion`, click `Staging Repositories`
+* In the `Staging Repositories` tab there should be a line with profile `org.apache.calcite`
+* Navigate through the artifact tree and make sure the .jar, .pom, .asc files are present
+* Check the box on in the first column of the row,
+  and press the 'Close' button to publish the repository at
+  https://repository.apache.org/content/repositories/orgapachecalcite-1000
+  (or a similar URL)
+
+Upload the artifacts via subversion to a staging area,
+https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN:
+
+{% highlight bash %}
+# Create a subversion workspace, if you haven't already
+mkdir -p ~/dist/dev
+pushd ~/dist/dev
+svn co https://dist.apache.org/repos/dist/dev/incubator/calcite
+popd
+
+# Move the files into a directory
+cd target
+mkdir ~/dist/dev/calcite/apache-calcite-X.Y.Z-incubating-rcN
+mv apache-calcite-* ~/dist/dev/calcite/apache-calcite-X.Y.Z-incubating-rcN
+
+# Check in
+cd ~/dist/dev/calcite
+svn add apache-calcite-X.Y.Z-incubating-rcN
+svn ci
+{% endhighlight %}
+
+## Cleaning up after a failed release attempt (for Calcite committers)
+
+{% highlight bash %}
+# Make sure that the tag you are about to generate does not already
+# exist (due to a failed release attempt)
+git tag
+
+# If the tag exists, delete it locally and remotely
+git tag -d apache-calcite-X.Y.Z-incubating
+git push origin :refs/tags/apache-calcite-X.Y.Z-incubating
+
+# Remove modified files
+mvn release:clean
+
+# Check whether there are modified files and if so, go back to the
+# original git commit
+git status
+git reset --hard HEAD
+{% endhighlight %}
+
+## Validate a release
+
+{% highlight bash %}
+# Check that the signing key (e.g. 2AD3FAE3) is pushed
+gpg --recv-keys key
+
+# Check keys
+curl -O https://dist.apache.org/repos/dist/release/incubator/calcite/KEYS
+
+# Sign/check md5 and sha1 hashes
+# (Assumes your O/S has 'md5' and 'sha1' commands.)
+function checkHash() {
+  cd "$1"
+  for i in *.{zip,pom,gz}; do
+    if [ ! -f $i ]; then
+      continue
+    fi
+    if [ -f $i.md5 ]; then
+      if [ "$(cat $i.md5)" = "$(md5 -q $i)" ]; then
+        echo $i.md5 present and correct
+      else
+        echo $i.md5 does not match
+      fi
+    else
+      md5 -q $i > $i.md5
+      echo $i.md5 created
+    fi
+    if [ -f $i.sha1 ]; then
+      if [ "$(cat $i.sha1)" = "$(sha1 -q $i)" ]; then
+        echo $i.sha1 present and correct
+      else
+        echo $i.sha1 does not match
+      fi
+    else
+      sha1 -q $i > $i.sha1
+      echo $i.sha1 created
+    fi
+  done
+}
+checkHash apache-calcite-X.Y.Z-incubating-rcN
+{% endhighlight %}
+
+## Get approval for a release via Apache voting process (for Calcite committers)
+
+Release vote on dev list
+
+{% highlight text %}
+To: dev@calcite.incubator.apache.org
+Subject: [VOTE] Release apache-calcite-X.Y.Z-incubating (release candidate N)
+
+Hi all,
+
+I have created a build for Apache Calcite X.Y.Z-incubating, release candidate N.
+
+Thanks to everyone who has contributed to this release.
+<Further details about release.> You can read the release notes here:
+https://github.com/apache/incubator-calcite/blob/XXXX/site/_docs/history.md
+
+The commit to be voted upon:
+http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/NNNNNN
+
+Its hash is XXXX.
+
+The artifacts to be voted on are located here:
+https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN/
+
+The hashes of the artifacts are as follows:
+src.tar.gz.md5 XXXX
+src.tar.gz.sha1 XXXX
+src.zip.md5 XXXX
+src.zip.sha1 XXXX
+
+A staged Maven repository is available for review at:
+https://repository.apache.org/content/repositories/orgapachecalcite-NNNN
+
+Release artifacts are signed with the following key:
+https://people.apache.org/keys/committer/jhyde.asc
+
+Please vote on releasing this package as Apache Calcite X.Y.Z-incubating.
+
+The vote is open for the next 72 hours and passes if a majority of
+at least three +1 PPMC votes are cast.
+
+[ ] +1 Release this package as Apache Calcite X.Y.Z-incubating
+[ ]  0 I don't feel strongly about it, but I'm okay with the release
+[ ] -1 Do not release this package because...
+
+
+Here is my vote:
+
++1 (binding)
+
+Julian
+{% endhighlight %}
+
+After vote finishes, send out the result:
+
+{% highlight text %}
+Subject: [RESULT] [VOTE] Release apache-calcite-X.Y.Z-incubating (release candidate N)
+To: dev@calcite.incubator.apache.org
+
+Thanks to everyone who has tested the release candidate and given
+their comments and votes.
+
+The tally is as follows.
+
+N binding +1s:
+<names>
+
+N non-binding +1s:
+<names>
+
+No 0s or -1s.
+
+Therefore I am delighted to announce that the proposal to release
+Apache Calcite X.Y.Z-incubating has passed.
+
+I'll now start a vote on the general list. Those of you in the IPMC,
+please recast your vote on the new thread.
+
+Julian
+{% endhighlight %}
+
+Use the [Apache URL shortener](http://s.apache.org) to generate
+shortened URLs for the vote proposal and result emails. Examples:
+[s.apache.org/calcite-1.2-vote](http://s.apache.org/calcite-1.2-vote) and
+[s.apache.org/calcite-1.2-result](http://s.apache.org/calcite-1.2-result).
+
+Propose a vote on the incubator list.
+
+{% highlight text %}
+To: general@incubator.apache.org
+Subject: [VOTE] Release Apache Calcite X.Y.Z (incubating)
+
+Hi all,
+
+The Calcite community has voted on and approved a proposal to release
+Apache Calcite X.Y.Z (incubating).
+
+Proposal:
+http://s.apache.org/calcite-X.Y.Z-vote
+
+Vote result:
+N binding +1 votes
+N non-binding +1 votes
+No -1 votes
+http://s.apache.org/calcite-X.Y.Z-result
+
+The commit to be voted upon:
+http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/NNNNNN
+
+Its hash is XXXX.
+
+The artifacts to be voted on are located here:
+https://dist.apache.org/repos/dist/dev/incubator/calcite/apache-calcite-X.Y.Z-incubating-rcN/
+
+The hashes of the artifacts are as follows:
+src.tar.gz.md5 XXXX
+src.tar.gz.sha1 XXXX
+src.zip.md5 XXXX
+src.zip.sha1 XXXX
+
+A staged Maven repository is available for review at:
+https://repository.apache.org/content/repositories/orgapachecalcite-NNNN
+
+Release artifacts are signed with the following key:
+https://people.apache.org/keys/committer/jhyde.asc
+
+Pursuant to the Releases section of the Incubation Policy and with
+the endorsement of NNN of our mentors we would now like to request
+the permission of the Incubator PMC to publish the release. The vote
+is open for 72 hours, or until the necessary number of votes (3 +1)
+is reached.
+
+[ ] +1 Release this package as Apache Calcite X.Y.Z incubating
+[ ] -1 Do not release this package because...
+
+Julian Hyde, on behalf of Apache Calcite PPMC
+{% endhighlight %}
+
+After vote finishes, send out the result:
+
+{% highlight text %}
+To: general@incubator.apache.org
+Subject: [RESULT] [VOTE] Release Apache Calcite X.Y.Z (incubating)
+
+This vote passes with N +1s and no 0 or -1 votes:
++1 <name> (mentor)
+
+There was some feedback during voting. I shall open a separate
+thread to discuss.
+
+Thanks everyone. We’ll now roll the release out to the mirrors.
+
+Julian
+{% endhighlight %}
+
+## Publishing a release (for Calcite committers)
+
+After a successful release vote, we need to push the release
+out to mirrors, and other tasks.
+
+In JIRA, search for all issues resolved in this release,
+and do a bulk update changing their status to "Closed",
+with a change comment
+"Resolved in release X.Y.Z-incubating (YYYY-MM-DD)"
+(fill in release number and date appropriately).
+
+Promote the staged nexus artifacts.
+
+* Go to [https://repository.apache.org/](https://repository.apache.org/) and login
+* Under "Build Promotion" click "Staging Repositories"
+* In the line with "orgapachecalcite-xxxx", check the box
+* Press "Release" button
+
+Check the artifacts into svn.
+
+{% highlight bash %}
+# Get the release candidate.
+mkdir -p ~/dist/dev
+cd ~/dist/dev
+svn co https://dist.apache.org/repos/dist/dev/incubator/calcite
+
+# Copy the artifacts. Note that the copy does not have '-rcN' suffix.
+mkdir -p ~/dist/release
+cd ~/dist/release
+svn co https://dist.apache.org/repos/dist/release/incubator/calcite
+cd calcite
+cp -rp ../../dev/calcite/apache-calcite-X.Y.Z-incubating-rcN apache-calcite-X.Y.Z-incubating
+svn add apache-calcite-X.Y.Z-incubating
+
+# Check in.
+svn ci
+{% endhighlight %}
+
+Svnpubsub will publish to
+https://dist.apache.org/repos/dist/release/incubator/calcite and propagate to
+http://www.apache.org/dyn/closer.cgi/incubator/calcite within 24 hours.
+
+If there are now more than 2 releases, clear out the oldest ones:
+
+{% highlight bash %}
+cd ~/dist/release/calcite
+svn rm apache-calcite-X.Y.Z-incubating
+svn ci
+{% endhighlight %}
+
+The old releases will remain available in the
+[release archive](http://archive.apache.org/dist/incubator/calcite/).
+
+Add a release note by copying
+[site/_posts/2015-03-13-release-1.1.0-incubating.md]({{ sourceRoot }}/site/_posts/2015-03-13-release-1.1.0-incubating.md),
+[publish the site](#publish-the-web-site),
+and check that it appears in the contents in [news](http://localhost:4000/news/).
+
+## Publishing the web site (for Calcite committers)
+{: #publish-the-web-site}
+
+See instructions in
+[site/README.md]({{ sourceRoot }}/site/README.md).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/index.md
----------------------------------------------------------------------
diff --git a/site/_docs/index.md b/site/_docs/index.md
new file mode 100644
index 0000000..d53aa47
--- /dev/null
+++ b/site/_docs/index.md
@@ -0,0 +1,137 @@
+---
+layout: docs
+title: Background
+permalink: /docs/index.html
+---
+
+Apache Calcite is a dynamic data management framework.
+
+It contains many of the pieces that comprise a typical database
+management system, but omits some key functions: storage of data,
+algorithms to process data, and a repository for storing metadata.
+
+Calcite intentionally stays out of the business of storing and
+processing data. As we shall see, this makes it an excellent choice
+for mediating between applications and one or more data storage
+locations and data processing engines. It is also a perfect foundation
+for building a database: just add data.
+
+To illustrate, let's create an empty instance of Calcite and then
+point it at some data.
+
+{% highlight java %}
+public static class HrSchema {
+  public final Employee[] emps = 0;
+  public final Department[] depts = 0;
+}
+Class.forName("org.apache.calcite.jdbc.Driver");
+Properties info = new Properties();
+info.setProperty("lex", "JAVA");
+Connection connection = DriverManager.getConnection("jdbc:calcite:", info);
+CalciteConnection calciteConnection =
+    connection.unwrap(CalciteConnection.class);
+ReflectiveSchema.create(calciteConnection,
+    calciteConnection.getRootSchema(), "hr", new HrSchema());
+Statement statement = calciteConnection.createStatement();
+ResultSet resultSet = statement.executeQuery(
+    "select d.deptno, min(e.empid)\n"
+    + "from hr.emps as e\n"
+    + "join hr.depts as d\n"
+    + "  on e.deptno = d.deptno\n"
+    + "group by d.deptno\n"
+    + "having count(*) > 1");
+print(resultSet);
+resultSet.close();
+statement.close();
+connection.close();
+{% endhighlight %}
+
+Where is the database? There is no database. The connection is
+completely empty until `ReflectiveSchema.create` registers a Java
+object as a schema and its collection fields `emps` and `depts` as
+tables.
+
+Calcite does not want to own data; it does not even have favorite data
+format. This example used in-memory data sets, and processed them
+using operators such as `groupBy` and `join` from the linq4j
+library. But Calcite can also process data in other data formats, such
+as JDBC. In the first example, replace
+
+{% highlight java %}
+ReflectiveSchema.create(calciteConnection,
+    calciteConnection.getRootSchema(), "hr", new HrSchema());
+{% endhighlight %}
+
+with
+
+{% highlight java %}
+Class.forName("com.mysql.jdbc.Driver");
+BasicDataSource dataSource = new BasicDataSource();
+dataSource.setUrl("jdbc:mysql://localhost");
+dataSource.setUsername("username");
+dataSource.setPassword("password");
+JdbcSchema.create(calciteConnection.getRootSchema(), "name", dataSource,
+    null, "hr");
+{% endhighlight %}
+
+and Calcite will execute the same query in JDBC. To the application,
+the data and API are the same, but behind the scenes the
+implementation is very different. Calcite uses optimizer rules to push
+the `JOIN` and `GROUP BY` operations to the source database.
+
+In-memory and JDBC are just two familiar examples. Calcite can handle
+any data source and data format. To add a data source, you need to
+write an adapter that tells Calcite what collections in the data
+source it should consider "tables".
+
+For more advanced integration, you can write optimizer
+rules. Optimizer rules allow Calcite to access data of a new format,
+allow you to register new operators (such as a better join algorithm),
+and allow Calcite to optimize how queries are translated to
+operators. Calcite will combine your rules and operators with built-in
+rules and operators, apply cost-based optimization, and generate an
+efficient plan.
+
+### Writing an adapter
+
+The subproject under example/csv provides a CSV adapter, which is
+fully functional for use in applications but is also simple enough to
+serve as a good template if you are writing your own adapter.
+
+See the <a href="tutorial.html">tutorial</a> for information on using
+the CSV adapter and writing other adapters.
+
+See the <a href="howto.html">HOWTO</a> for more information about
+using other adapters, and about using Calcite in general.
+
+## Status
+
+The following features are complete.
+
+* Query parser, validator and optimizer
+* Support for reading models in JSON format
+* Many standard functions and aggregate functions
+* JDBC queries against Linq4j and JDBC back-ends
+* Linq4j front-end
+* SQL features: SELECT, FROM (including JOIN syntax), WHERE, GROUP BY
+  (including GROUPING SETS), aggregate functions (including
+  COUNT(DISTINCT ...) and FILTER), HAVING, ORDER BY (including NULLS
+  FIRST/LAST), set operations (UNION, INTERSECT, MINUS), sub-queries
+  (including correlated sub-queries), windowed aggregates, LIMIT
+  (syntax as <a
+  href="http://www.postgresql.org/docs/8.4/static/sql-select.html#SQL-LIMIT">Postgres</a>);
+  more details in the [SQL reference](reference.html)
+* Local and remote JDBC drivers; see [Avatica](avatica.html)
+* Several [adapters](adapter.html)
+
+
+## Disclaimer
+
+Apache Calcite is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Incubator. Incubation is
+required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making
+process have stabilized in a manner consistent with other successful
+ASF projects. While incubation status is not necessarily a reflection
+of the completeness or stability of the code, it does indicate that
+the project has yet to be fully endorsed by the ASF.

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/lattice.md
----------------------------------------------------------------------
diff --git a/site/_docs/lattice.md b/site/_docs/lattice.md
new file mode 100644
index 0000000..7c38f1c
--- /dev/null
+++ b/site/_docs/lattice.md
@@ -0,0 +1,133 @@
+---
+layout: docs
+title: Lattices
+permalink: /docs/lattice.html
+---
+<!--
+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.
+-->
+A lattice is a framework for creating and populating materialized views,
+and for recognizing that a materialized view can be used to solve a
+particular query.
+
+A lattice represents a star (or snowflake) schema, not a general
+schema. In particular, all relationships must be many-to-one, heading
+from a fact table at the center of the star.
+
+The name derives from the mathematics: a
+<a href="http://en.wikipedia.org/wiki/Lattice_(order)">lattice</a>
+is a
+<a href="http://en.wikipedia.org/wiki/Partially_ordered_set">partially
+ordered set</a> where any two elements have a unique greatest lower
+bound and least upper bound.
+
+[<a href="#ref-hru96">HRU96</a>] observed that the set of possible
+materializations of a data cube forms a lattice, and presented an
+algorithm to choose a good set of materializations. Calcite's
+recommendation algorithm is derived from this.
+
+The lattice definition uses a SQL statement to represent the star. SQL
+is a useful short-hand to represent several tables joined together,
+and assigning aliases to the column names (it more convenient than
+inventing a new language to represent relationships, join conditions
+and cardinalities).
+
+Unlike regular SQL, order is important. If you put A before B in the
+FROM clause, and make a join between A and B, you are saying that
+there is a many-to-one foreign key relationship from A to B. (E.g. in
+the example lattice, the Sales fact table occurs before the Time
+dimension table, and before the Product dimension table. The Product
+dimension table occurs before the ProductClass outer dimension table,
+further down an arm of a snowflake.)
+
+A lattice implies constraints. In the A to B relationship, there is a
+foreign key on A (i.e. every value of A's foreign key has a
+corresponding value in B's key), and a unique key on B (i.e. no key
+value occurs more than once). These constraints are really important,
+because it allows the planner to remove joins to tables whose columns
+are not being used, and know that the query results will not change.
+
+Calcite does not check these constraints. If they are violated,
+Calcite will return wrong results.
+
+A lattice is a big, virtual join view. It is not materialized (it
+would be several times larger than the star schema, because of
+denormalization) and you probably wouldn't want to query it (far too
+many columns). So what is it useful for? As we said above, (a) the
+lattice declares some very useful primary and foreign key constraints,
+(b) it helps the query planner map user queries onto
+filter-join-aggregate materialized views (the most useful kind of
+materialized view for DW queries), (c) gives Calcite a framework
+within which to gather stats about data volumes and user queries, (d)
+allows Calcite to automatically design and populate materialized
+views.
+
+Most star schema models force you to choose whether a column is a
+dimension or a measure. In a lattice, every column is a dimension
+column. (That is, it can become one of the columns in the GROUP BY clause
+to query the star schema at a particular dimensionality). Any column
+can also be used in a measure; you define measures by giving the
+column and an aggregate function.
+
+If "unit_sales" tends to be used much more often as a measure rather
+than a dimension, that's fine. Calcite's algorithm should notice that
+it is rarely aggregated, and not be inclined to create tiles that
+aggregate on it. (By "should" I mean "could and one day will". The
+algorithm does not currently take query history into account when
+designing tiles.)
+
+But someone might want to know whether orders with fewer than 5 items
+were more or less profitable than orders with more than 100. All of a
+sudden, "unit_sales" has become a dimension. If there's virtually zero
+cost to declaring a column a dimension column, I figured let's make
+them all dimension columns.
+
+The model allows for a particular table to be used more than once,
+with a different table alias. You could use this to model say
+OrderDate and ShipDate, with two uses to the Time dimension table.
+
+Most SQL systems require that the column names in a view are unique.
+This is hard to achieve in a lattice, because you often include
+primary and foreign key columns in a join. So Calcite lets you refer
+to columns in two ways. If the column is unique, you can use its name,
+["unit_sales"]. Whether or not it is unique in the lattice, it will be
+unique in its table, so you can use it qualified by its table alias.
+Examples:
+
+* ["sales", "unit_sales"]
+* ["ship_date", "time_id"]
+* ["order_date", "time_id"]
+
+A "tile" is a materialized table in a lattice, with a particular
+dimensionality. (What Kylin calls a "cuboid".) The "tiles" attribute
+of the <a href="model.html#lattice">lattice JSON element</a>
+defines an initial set of tiles to materialize.
+
+If you run the algorithm, you can omit the tiles attribute. Calcite
+will choose an initial set. If you include the tiles attribute, the
+algorithm will start with that list and then start finding other tiles
+that are complementary (i.e. "fill in the gaps" left by the initial
+tiles).
+
+### References
+
+<ul>
+<li>[<a name="ref-hru96">HRU96</a>] V. Harinarayan, A. Rajaraman and J. Ullman.
+    <a href="http://web.eecs.umich.edu/~jag/eecs584/papers/implementing_data_cube.pdf">Implementing
+    data cubes efficiently</a>.
+    In <i>Proc. ACM SIGMOD Conf.</i>, Montreal, 1996.</li>
+</ul>
+

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/model.md
----------------------------------------------------------------------
diff --git a/site/_docs/model.md b/site/_docs/model.md
new file mode 100644
index 0000000..b08b2ab
--- /dev/null
+++ b/site/_docs/model.md
@@ -0,0 +1,447 @@
+---
+layout: docs
+title: JSON models
+permalink: /docs/model.html
+---
+<!--
+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.
+-->
+Calcite models can be represented as JSON files.
+This page describes the structure of those files.
+
+Models can also be built programmatically using the `Schema` SPI.
+
+## Elements
+
+### Root
+
+{% highlight json %}
+{
+  version: '1.0',
+  defaultSchema: 'mongo',
+  schemas: [ Schema... ]
+}
+{% endhighlight %}
+
+`version` (required string) must have value `1.0`.
+
+`defaultSchema` (optional string). If specified, it is
+the name (case-sensitive) of a schema defined in this model, and will
+become the default schema for connections to Calcite that use this model.
+
+`schemas` (optional list of <a href="#schema">Schema</a> elements).
+
+### Schema
+
+Occurs within `root.schemas`.
+
+{% highlight json %}
+{
+  name: 'foodmart',
+  path: ['lib'],
+  cache: true,
+  materializations: [ Materialization... ]
+}
+{% endhighlight %}
+
+`name` (required string) is the name of the schema.
+
+`type` (optional string, default `map`) indicates sub-type. Values are:
+
+* `map` for <a href="#map-schema">Map Schema</a>
+* `custom` for <a href="#custom-schema">Custom Schema</a>
+* `jdbc` for <a href="#jdbc-schema">JDBC Schema</a>
+
+`path` (optional list) is the SQL path that is used to
+resolve functions used in this schema. If specified it must be a list,
+and each element of the list must be either a string or a list of
+strings. For example,
+
+{% highlight json %}
+  path: [ ['usr', 'lib'], 'lib' ]
+{% endhighlight %}
+
+declares a path with two elements: the schema '/usr/lib' and the
+schema '/lib'. Most schemas are at the top level, so you can use a
+string.
+
+`materializations` (optional list of
+<a href="#materialization">Materialization</a>) defines the tables
+in this schema that are materializations of queries.
+
+`cache` (optional boolean, default true) tells Calcite whether to
+cache metadata (tables, functions and sub-schemas) generated
+by this schema.
+
+* If `false`, Calcite will go back to the schema each time it needs
+  metadata, for example, each time it needs a list of tables in order to
+  validate a query against the schema.
+
+* If `true`, Calcite will cache the metadata the first time it reads
+  it. This can lead to better performance, especially if name-matching is
+  case-insensitive.
+
+However, it also leads to the problem of cache staleness.
+A particular schema implementation can override the
+`Schema.contentsHaveChangedSince` method to tell Calcite
+when it should consider its cache to be out of date.
+
+Tables, functions and sub-schemas explicitly created in a schema are
+not affected by this caching mechanism. They always appear in the schema
+immediately, and are never flushed.
+
+### Map Schema
+
+Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
+
+{% highlight json %}
+{
+  name: 'foodmart',
+  type: 'map',
+  tables: [ Table... ],
+  functions: [ Function... ]
+}
+{% endhighlight %}
+
+`name`, `type`, `path`, `cache`, `materializations` inherited from
+<a href="#schema">Schema</a>.
+
+`tables` (optional list of <a href="#table">Table</a> elements)
+defines the tables in this schema.
+
+`functions` (optional list of <a href="#function">Function</a> elements)
+defines the functions in this schema.
+
+### Custom Schema
+
+Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
+
+{% highlight json %}
+{
+  name: 'mongo',
+  type: 'custom',
+  factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
+  operand: {
+    host: 'localhost',
+    database: 'test'
+  }
+}
+{% endhighlight %}
+
+`name`, `type`, `path`, `cache`, `materializations` inherited from
+<a href="#schema">Schema</a>.
+
+`factory` (required string) is the name of the factory class for this
+schema. Must implement interface `org.apache.calcite.schema.SchemaFactory`
+and have a public default constructor.
+
+`operand` (optional map) contains attributes to be passed to the
+factory.
+
+### JDBC Schema
+
+Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
+
+{% highlight json %}
+{
+  name: 'foodmart',
+  type: 'jdbc',
+  jdbcDriver: TODO,
+  jdbcUrl: TODO,
+  jdbcUser: TODO,
+  jdbcPassword: TODO,
+  jdbcCatalog: TODO,
+  jdbcSchema: TODO
+}
+{% endhighlight %}
+
+`name`, `type`, `path`, `cache`, `materializations` inherited from
+<a href="#schema">Schema</a>.
+
+`jdbcDriver` (optional string) is the name of the JDBC driver class. It not
+specified, uses whichever class the JDBC DriverManager chooses.
+
+`jdbcUrl` (optional string) is the JDBC connect string, for example
+"jdbc:mysql://localhost/foodmart".
+
+`jdbcUser` (optional string) is the JDBC user name.
+
+`jdbcPassword` (optional string) is the JDBC password.
+
+`jdbcCatalog` (optional string) is the name of the initial catalog in the JDBC
+data source.
+
+`jdbcSchema` (optional string) is the name of the initial schema in the JDBC
+data source.
+
+### Materialization
+
+Occurs within `root.schemas.materializations`.
+
+{% highlight json %}
+{
+  view: 'V',
+  table: 'T',
+  sql: 'select deptno, count(*) as c, sum(sal) as s from emp group by deptno'
+}
+{% endhighlight %}
+
+`view` (optional string) TODO
+
+`table` (optional string) TODO
+
+`sql` (optional string, or list of strings that will be concatenated as a
+ multi-line string) is the SQL definition of the materialization.
+
+### Table
+
+Occurs within `root.schemas.tables`.
+
+{% highlight json %}
+{
+  name: 'sales_fact',
+  columns: [ Column... ]
+}
+{% endhighlight %}
+
+`name` (required string) is the name of this table. Must be unique within the schema.
+
+`type` (optional string, default `custom`) indicates sub-type. Values are:
+
+* `custom` for <a href="#custom-table">Custom Table</a>
+* `view` for <a href="#view">View</a>
+
+`columns` (optional list of <a href="#column">Column</a> elements)
+
+### View
+
+Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
+
+{% highlight json %}
+{
+  name: 'female_emps',
+  type: 'view',
+  sql: "select * from emps where gender = 'F'",
+  modifiable: true
+}
+{% endhighlight %}
+
+`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
+
+`sql` (required string, or list of strings that will be concatenated as a
+ multi-line string) is the SQL definition of the view.
+
+`path` (optional list) is the SQL path to resolve the query. If not
+specified, defaults to the current schema.
+
+`modifiable` (optional boolean) is whether the view is modifiable.
+If null or not specified, Calcite deduces whether the view is modifiable.
+
+A view is modifiable if contains only SELECT, FROM, WHERE (no JOIN, aggregation
+or sub-queries) and every column:
+
+* is specified once in the SELECT clause; or
+* occurs in the WHERE clause with a `column = literal` predicate; or
+* is nullable.
+
+The second clause allows Calcite to automatically provide the correct value for
+hidden columns. It is useful in multi-tenant environments, where the `tenantId`
+column is hidden, mandatory (NOT NULL), and has a constant value for a
+particular view.
+
+Errors regarding modifiable views:
+
+* If a view is marked `modifiable: true` and is not modifiable, Calcite throws
+  an error while reading the schema.
+* If you submit an INSERT, UPDATE or UPSERT command to a non-modifiable view,
+  Calcite throws an error when validating the statement.
+* If a DML statement creates a row that would not appear in the view
+  (for example, a row in `female_emps`, above, with `gender = 'M'`),
+  Calcite throws an error when executing the statement.
+
+### Custom Table
+
+Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
+
+{% highlight json %}
+{
+  name: 'female_emps',
+  type: 'custom',
+  factory: 'TODO',
+  operand: {
+    todo: 'TODO'
+  }
+}
+{% endhighlight %}
+
+`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
+
+`factory` (required string) is the name of the factory class for this
+table. Must implement interface `org.apache.calcite.schema.TableFactory`
+and have a public default constructor.
+
+`operand` (optional map) contains attributes to be passed to the
+factory.
+
+### Column
+
+Occurs within `root.schemas.tables.columns`.
+
+{% highlight json %}
+{
+  name: 'empno'
+}
+{% endhighlight %}
+
+`name` (required string) is the name of this column.
+
+### Function
+
+Occurs within `root.schemas.functions`.
+
+{% highlight json %}
+{
+  name: 'MY_PLUS',
+  className: 'com.example.functions.MyPlusFunction',
+  methodName: 'apply',
+  path: []
+}
+{% endhighlight %}
+
+`name` (required string) is the name of this function.
+
+`className` (required string) is the name of the class that implements this
+function.
+
+`methodName` (optional string) is the name of the method that implements this
+function.
+
+`path` (optional list of string) is the path for resolving this function.
+
+### Lattice
+
+Occurs within `root.schemas.lattices`.
+
+{% highlight json %}
+{
+  name: 'star',
+  sql: [
+    'select 1 from "foodmart"."sales_fact_1997" as "s"',
+    'join "foodmart"."product" as "p" using ("product_id")',
+    'join "foodmart"."time_by_day" as "t" using ("time_id")',
+    'join "foodmart"."product_class" as "pc" on "p"."product_class_id" = "pc"."product_class_id"'
+  ],
+  auto: false,
+  algorithm: true,
+  algorithmMaxMillis: 10000,
+  rowCountEstimate: 86837,
+  defaultMeasures: [ {
+    agg: 'count'
+  } ],
+  tiles: [ {
+    dimensions: [ 'the_year', ['t', 'quarter'] ],
+    measures: [ {
+      agg: 'sum',
+      args: 'unit_sales'
+    }, {
+      agg: 'sum',
+      args: 'store_sales'
+    }, {
+      agg: 'count'
+    } ]
+  } ]
+}
+{% endhighlight %}
+
+`name` (required string) is the name of this lattice.
+
+`sql` (required string, or list of strings that will be concatenated as a
+multi-line string) is the SQL statement that defines the fact table, dimension
+tables, and join paths for this lattice.
+
+`auto` (optional boolean, default true) is whether to materialize tiles on need
+as queries are executed.
+
+`algorithm` (optional boolean, default false) is whether to use an optimization
+algorithm to suggest and populate an initial set of tiles.
+
+`algorithmMaxMillis` (optional long, default -1, meaning no limit) is the
+maximum number of milliseconds for which to run the algorithm. After this point,
+takes the best result the algorithm has come up with so far.
+
+`rowCountEstimate` (optional double, default 1000.0) estimated number of rows in
+the star
+
+`tiles` (optional list of <a href="#tile">Tile</a> elements) is a list of
+materialized aggregates to create up front.
+
+`defaultMeasures`  (optional list of <a href="#measure">Measure</a> elements)
+is a list of measures that a tile should have by default.
+Any tile defined in `tiles` can still define its own measures, including
+measures not on this list. If not specified, the default list of measures is
+just 'count(*)':
+
+{% highlight json %}
+[ { name: 'count' } ]
+{% endhighlight %}
+
+See also: <a href="lattice.md">Lattices</a>.
+
+### Tile
+
+Occurs within `root.schemas.lattices.tiles`.
+
+{% highlight json %}
+{
+  dimensions: [ 'the_year', ['t', 'quarter'] ],
+  measures: [ {
+    agg: 'sum',
+    args: 'unit_sales'
+  }, {
+    agg: 'sum',
+    args: 'store_sales'
+  }, {
+    agg: 'count'
+  } ]
+}
+{% endhighlight %}
+
+`dimensions` is a list of dimensions (columns from the star), like a `GROUP BY`
+clause. Each element is either a string (the unique label of the column within
+the star) or a string list (a column name qualified by a table name).
+
+`measures` (optional list of <a href="#measure">Measure</a> elements) is a list
+of aggregate functions applied to arguments. If not specified, uses the
+lattice's default measure list.
+
+### Measure
+
+Occurs within `root.schemas.lattices.defaultMeasures`
+and `root.schemas.lattices.tiles.measures`.
+
+{% highlight json %}
+{
+  agg: 'sum',
+  args: [ 'unit_sales' ]
+}
+{% endhighlight %}
+
+`agg` is the name of an aggregate function (usually 'count', 'sum', 'min',
+'max').
+
+`args` (optional) is a column label (string), or list of zero or more columns.
+If a list, each element is either a string (the unique label of the column
+within the star) or a string list (a column name qualified by a table name).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/_docs/reference.md
----------------------------------------------------------------------
diff --git a/site/_docs/reference.md b/site/_docs/reference.md
new file mode 100644
index 0000000..02b4674
--- /dev/null
+++ b/site/_docs/reference.md
@@ -0,0 +1,587 @@
+---
+layout: docs
+title: SQL language
+permalink: /docs/reference.html
+---
+<!--
+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.
+-->
+The page describes the SQL dialect recognized by Calcite's default SQL parser.
+
+## Grammar
+
+SQL grammar in [BNF](http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form)-like
+form.
+
+{% highlight SQL %}
+statement:
+      setStatement
+  |   explain
+  |   insert
+  |   update
+  |   merge
+  |   delete
+  |   query
+
+setStatement:
+      ALTER ( SYSTEM | SESSION ) SET identifier = expression
+
+explain:
+      EXPLAIN PLAN
+      [ WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION ]
+      [ EXCLUDING ATTRIBUTES | INCLUDING [ ALL ] ATTRIBUTES ]
+      FOR ( insert | update | merge | delete | query )
+
+insert:
+      ( INSERT | UPSERT ) INTO tablePrimary
+      [ '(' column [, column ]* ')' ]
+      query
+
+update:
+      UPDATE tablePrimary
+      SET assign [, assign ]*
+      [ WHERE booleanExpression ]
+
+assign:
+      identifier '=' expression
+
+merge:
+      MERGE INTO tablePrimary [ [ AS ] alias ]
+      USING tablePrimary
+      ON booleanExpression
+      [ WHEN MATCHED THEN UPDATE SET assign [, assign ]* ]
+      [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ]
+
+delete:
+      DELETE FROM tablePrimary [ [ AS ] alias ]
+      [ WHERE booleanExpression ]
+
+query:
+      [ WITH withItem [ , withItem ]* query ]
+  |   {
+          select
+      |   query UNION [ ALL ] query
+      |   query EXCEPT query
+      |   query INTERSECT query
+      }
+      [ ORDER BY orderItem [, orderItem ]* ]
+      [ LIMIT { count | ALL } ]
+      [ OFFSET start { ROW | ROWS } ]
+      [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ]
+
+withItem:
+      name
+      [ '(' column [, column ]* ')' ]
+      AS '(' query ')'
+
+orderItem:
+      expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
+
+select:
+      SELECT [ STREAM ] [ ALL | DISTINCT ]
+          { * | projectItem [, projectItem ]* }
+      FROM tableExpression
+      [ WHERE booleanExpression ]
+      [ GROUP BY { groupItem [, groupItem ]* } ]
+      [ HAVING booleanExpression ]
+      [ WINDOW windowName AS windowSpec [, windowName AS windowSpec ]* ]
+
+projectItem:
+      expression [ [ AS ] columnAlias ]
+  |   tableAlias . *
+
+tableExpression:
+      tableReference [, tableReference ]*
+  |   tableExpression [ NATURAL ] [ LEFT | RIGHT | FULL ] JOIN tableExpression [ joinCondition ]
+
+joinCondition:
+      ON booleanExpression
+  |   USING '(' column [, column ]* ')'
+
+tableReference:
+      [ LATERAL ]
+      tablePrimary
+      [ [ AS ] alias [ '(' columnAlias [, columnAlias ]* ')' ] ]
+
+tablePrimary:
+      [ TABLE ] [ [ catalogName . ] schemaName . ] tableName
+  |   '(' query ')'
+  |   values
+  |   UNNEST '(' expression ')'
+  |   '(' TABLE expression ')'
+
+values:
+      VALUES expression [, expression ]*
+
+groupItem:
+      expression
+  |   '(' ')'
+  |   '(' expression [, expression ]* ')'
+  |   CUBE '(' expression [, expression ]* ')'
+  |   ROLLUP '(' expression [, expression ]* ')'
+  |   GROUPING SETS '(' groupItem [, groupItem ]* ')'
+
+windowRef:
+      windowName
+  |   windowSpec
+
+windowSpec:
+      [ windowName ]
+      '('
+      [ ORDER BY orderItem [, orderItem ]* ]
+      [ PARTITION BY expression [, expression ]* ]
+      [
+          RANGE numericOrIntervalExpression { PRECEDING | FOLLOWING }
+      |   ROWS numericExpression { PRECEDING | FOLLOWING }
+      ]
+      ')'
+{% endhighlight %}
+
+In *merge*, at least one of the WHEN MATCHED and WHEN NOT MATCHED clauses must
+be present.
+
+In *orderItem*, if *expression* is a positive integer *n*, it denotes
+the <em>n</em>th item in the SELECT clause.
+
+An aggregate query is a query that contains a GROUP BY or a HAVING
+clause, or aggregate functions in the SELECT clause. In the SELECT,
+HAVING and ORDER BY clauses of an aggregate query, all expressions
+must be constant within the current group (that is, grouping constants
+as defined by the GROUP BY clause, or constants), or aggregate
+functions, or a combination of constants and aggregate
+functions. Aggregate and grouping functions may only appear in an
+aggregate query, and only in a SELECT, HAVING or ORDER BY clause.
+
+A scalar sub-query is a sub-query used as an expression. It can occur
+in most places where an expression can occur (such as the SELECT
+clause, WHERE clause, or as an argument to an aggregate
+function). If the sub-query returns no rows, the value is NULL; if it
+returns more than one row, it is an error.
+
+A sub-query can occur in the FROM clause of a query and also in IN
+and EXISTS expressions.  A sub-query that occurs in IN and
+EXISTS expressions may be correlated; that is, refer to tables in
+the FROM clause of an enclosing query.
+
+## Identifiers
+
+Identifiers are the names of tables, columns and other metadata
+elements used in a SQL query.
+
+Unquoted identifiers, such as emp, must start with a letter and can
+only contain letters, digits, and underscores. They are implicitly
+converted to upper case.
+
+Quoted identifiers, such as `"Employee Name"`, start and end with
+double quotes.  They may contain virtually any character, including
+spaces and other punctuation.  If you wish to include a double quote
+in an identifier, use another double quote to escape it, like this:
+`"An employee called ""Fred""."`.
+
+In Calcite, matching identifiers to the name of the referenced object is
+case-sensitive.  But remember that unquoted identifiers are implicitly
+converted to upper case before matching, and if the object it refers
+to was created using an unquoted identifier for its name, then its
+name will have been converted to upper case also.
+
+## Data types
+
+### Scalar types
+
+| Data type   | Description               | Range and examples   |
+|:----------- |:------------------------- |:---------------------|
+| BOOLEAN     | Logical values            | Values: TRUE, FALSE, UNKNOWN
+| TINYINT     | 1 byte signed integer     | Range is -255 to 256
+| SMALLINT    | 2 byte signed integer     | Range is -32768 to 32767
+| INTEGER, INT | 4 byte signed integer    | Range is -2147483648 to 2147483647
+| BIGINT      | 8 byte signed integer     | Range is -9223372036854775808 to 9223372036854775807
+| DECIMAL(p, s) | Fixed point             | Example: 123.45 is a DECIMAL(5, 2) value.
+| NUMERIC     | Fixed point               |
+| REAL, FLOAT | 4 byte floating point     | 6 decimal digits precision
+| DOUBLE      | 8 byte floating point     | 15 decimal digits precision
+| CHAR(n), CHARACTER(n) | Fixed-width character string | 'Hello', '' (empty string), _latin1'Hello', n'Hello', _UTF16'Hello', 'Hello' 'there' (literal split into multiple parts)
+| VARCHAR(n), CHARACTER VARYING(n) | Variable-length character string | As CHAR(n)
+| BINARY(n)   | Fixed-width binary string | x'45F0AB', x'' (empty binary string), x'AB' 'CD' (multi-part binary string literal)
+| VARBINARY(n), BINARY VARYING(n) | Variable-length binary string | As BINARY(n)
+| DATE        | Date                      | Example: DATE '1969-07-20'
+| TIME        | Time of day               | Example: TIME '20:17:40'
+| TIMESTAMP [ WITHOUT TIME ZONE ] | Date and time | Example: TIMESTAMP '1969-07-20 20:17:40'
+| TIMESTAMP WITH TIME ZONE | Date and time with time zone | Example: TIMESTAMP '1969-07-20 20:17:40 America/Los Angeles'
+| INTERVAL timeUnit [ TO timeUnit ] | Date time interval | Examples: INTERVAL '1:5' YEAR TO MONTH, INTERVAL '45' DAY
+| Anchored interval | Date time interval  | Example: (DATE '1969-07-20', DATE '1972-08-29')
+
+Where:
+
+{% highlight SQL %}
+timeUnit:
+  YEAR | MONTH | DAY | HOUR | MINUTE | SECOND
+{% endhighlight %}
+
+Note:
+
+* DATE, TIME and TIMESTAMP have no time zone. There is not even an implicit
+  time zone, such as UTC (as in Java) or the local time zone. It is left to
+  the user or application to supply a time zone.
+
+### Non-scalar types
+
+| Type     | Description
+|:-------- |:-----------------------------------------------------------
+| ANY      | A value of an unknown type
+| ROW      | Row with 1 or more columns
+| MAP      | Collection of keys mapped to values
+| MULTISET | Unordered collection that may contain duplicates
+| ARRAY    | Ordered, contiguous collection that may contain duplicates
+| CURSOR   | Cursor over the result of executing a query
+
+## Operators and functions
+
+### Comparison operators
+
+| Operator syntax                                   | Description
+|:------------------------------------------------- |:-----------
+| value1 = value2                                   | Equals
+| value1 <> value2                                  | Not equal
+| value1 > value2                                   | Greater than
+| value1 >= value2                                  | Greater than or equal
+| value1 < value2                                   | Less than
+| value1 <= value2                                  | Less than or equal
+| value IS NULL                                     | Whether *value* is null
+| value IS NOT NULL                                 | Whether *value* is not null
+| value1 IS DISTINCT FROM value2                    | Whether two values are not equal, treating null values as the same
+| value1 IS NOT DISTINCT FROM value2                | Whether two values are equal, treating null values as the same
+| value1 BETWEEN value2 AND value3                  | Whether *value1* is greater than or equal to *value2* and less than or equal to *value3*
+| value1 NOT BETWEEN value2 AND value3              | Whether *value1* is less than *value2* or greater than *value3*
+| string1 LIKE string2 [ ESCAPE string3 ]           | Whether *string1* matches pattern *string2*
+| string1 NOT LIKE string2 [ ESCAPE string3 ]       | Whether *string1* does not match pattern *string2*
+| string1 SIMILAR TO string2 [ ESCAPE string3 ]     | Whether *string1* matches regular expression *string2*
+| string1 NOT SIMILAR TO string2 [ ESCAPE string3 ] | Whether *string1* does not match regular expression *string2*
+| value IN (value [, value]* )                      | Whether *value* is equal to a value in a list
+| value NOT IN (value [, value]* )                  | Whether *value* is not equal to every value in a list
+| value IN (sub-query)                              | Whether *value* is equal to a row returned by *sub-query*
+| value NOT IN (sub-query)                          | Whether *value* is not equal to every row returned by *sub-query*
+| EXISTS (sub-query)                                | Whether *sub-query* returns at least one row
+
+### Logical operators
+
+| Operator syntax        | Description
+|:---------------------- |:-----------
+| boolean1 OR boolean2   | Whether *boolean1* is TRUE or *boolean2* is TRUE
+| boolean1 AND boolean2  | Whether *boolean1* and *boolean2* are both TRUE
+| NOT boolean            | Whether *boolean* is not TRUE; returns UNKNOWN if *boolean* is UNKNOWN
+| boolean IS FALSE       | Whether *boolean* is FALSE; returns FALSE if *boolean* is UNKNOWN
+| boolean IS NOT FALSE   | Whether *boolean* is not FALSE; returns TRUE if *boolean* is UNKNOWN
+| boolean IS TRUE        | Whether *boolean* is TRUE; returns FALSE if *boolean* is UNKNOWN
+| boolean IS NOT TRUE    | Whether *boolean* is not TRUE; returns TRUE if *boolean* is UNKNOWN
+| boolean IS UNKNOWN     | Whether *boolean* is UNKNOWN
+| boolean IS NOT UNKNOWN | Whether *boolean* is not UNKNOWN
+
+### Arithmetic operators and functions
+
+| Operator syntax           | Description
+|:------------------------- |:-----------
+| + numeric                 | Returns *numeric*
+|:- numeric                 | Returns negative *numeric*
+| numeric1 + numeric2       | Returns *numeric1* plus *numeric2*
+| numeric1 - numeric2       | Returns *numeric1* minus *numeric2*
+| numeric1 * numeric2       | Returns *numeric1* multiplied by *numeric2*
+| numeric1 / numeric2       | Returns *numeric1* divided by *numeric2*
+| POWER(numeric1, numeric2) | Returns *numeric1* raised to the power of *numeric2*
+| ABS(numeric)              | Returns the absolute value of *numeric*
+| MOD(numeric, numeric)     | Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
+| SQRT(numeric)             | Returns the square root of *numeric*
+| LN(numeric)               | Returns the natural logarithm (base *e*) of *numeric*
+| LOG10(numeric)            | Returns the base 10 logarithm of *numeric*
+| EXP(numeric)              | Returns *e* raised to the power of *numeric*
+| CEIL(numeric)             | Rounds *numeric* up, and returns the smallest number that is greater than or equal to *numeric*
+| FLOOR(numeric)            | Rounds *numeric* down, and returns the largest number that is less than or equal to *numeric*
+
+### Character string operators and functions
+
+| Operator syntax            | Description
+|:-------------------------- |:-----------
+| string &#124;&#124; string | Concatenates two character strings.
+| CHAR_LENGTH(string)        | Returns the number of characters in a character string
+| CHARACTER_LENGTH(string)   | As CHAR_LENGTH(*string*)
+| UPPER(string)              | Returns a character string converted to upper case
+| LOWER(string)              | Returns a character string converted to lower case
+| POSITION(string1 IN string2) | Returns the position of the first occurrence of *string1* in *string2*
+| TRIM( { BOTH &#124; LEADING &#124; TRAILING } string1 FROM string2) | Removes the longest string containing only the characters in *string1* from the start/end/both ends of *string1*
+| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a substring of *string1* with *string2*
+| SUBSTRING(string FROM integer)  | Returns a substring of a character string starting at a given point.
+| SUBSTRING(string FROM integer FOR integer) | Returns a substring of a character string starting at a given point with a given length.
+| INITCAP(string)            | Returns *string* with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.
+
+Not implemented:
+
+* SUBSTRING(string FROM regexp FOR regexp)
+
+### Binary string operators and functions
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| binary &#124;&#124; binary | Concatenates two binary strings.
+| POSITION(binary1 IN binary2) | Returns the position of the first occurrence of *binary1* in *binary2*
+| OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ]) | Replaces a substring of *binary1* with *binary2*
+| SUBSTRING(binary FROM integer) | Returns a substring of *binary* starting at a given point
+| SUBSTRING(binary FROM integer FOR integer) | Returns a substring of *binary* starting at a given point with a given length
+
+### Date/time functions
+
+| Operator syntax           | Description
+|:------------------------- |:-----------
+| LOCALTIME                 | Returns the current date and time in the session time zone in a value of datatype TIME
+| LOCALTIME(precision)      | Returns the current date and time in the session time zone in a value of datatype TIME, with *precision* digits of precision
+| LOCALTIMESTAMP            | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP
+| LOCALTIMESTAMP(precision) | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP, with *precision* digits of precision
+| CURRENT_TIME              | Returns the current time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
+| CURRENT_DATE              | Returns the current date in the session time zone, in a value of datatype DATE
+| CURRENT_TIMESTAMP         | Returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
+| EXTRACT(timeUnit FROM datetime) | Extracts and returns the value of a specified datetime field from a datetime value expression
+| FLOOR(datetime TO timeUnit) | Rounds *datetime* down to *timeUnit*
+| CEIL(datetime TO timeUnit) | Rounds *datetime* up to *timeUnit*
+
+Not implemented:
+
+* EXTRACT(timeUnit FROM interval)
+* CEIL(interval)
+* FLOOR(interval)
+* datetime - datetime timeUnit [ TO timeUnit ]
+* interval OVERLAPS interval
+* \+ interval
+* \- interval
+* interval + interval
+* interval - interval
+* interval / interval
+* datetime + interval
+* datetime - interval
+
+### System functions
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| USER            | Equivalent to CURRENT_USER
+| CURRENT_USER    | User name of current execution context
+| SESSION_USER    | Session user name
+| SYSTEM_USER     | Returns the name of the current data store user as identified by the operating system
+| CURRENT_PATH    | Returns a character string representing the current lookup scope for references to user-defined routines and types
+| CURRENT_ROLE    | Returns the current active role
+
+### Conditional functions and operators
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| CASE value<br/>WHEN value1 [, value11 ]* THEN result1<br/>[ WHEN valueN [, valueN1 ]* THEN resultN ]*<br/>[ ELSE resultZ ]<br/> END | Simple case
+| CASE<br/>WHEN condition1 THEN result1<br/>[ WHEN conditionN THEN resultN ]*<br/>[ ELSE resultZ ]<br/>END | Searched case
+| NULLIF(value, value) | Returns NULL if the values are the same.<br/><br/>For example, <code>NULLIF(5, 5)</code> returns NULL; <code>NULLIF(5, 0)</code> returns 5.
+| COALESCE(value, value [, value]* ) | Provides a value if the first value is null.<br/><br/>For example, <code>COALESCE(NULL, 5)</code> returns 5.
+
+### Type conversion
+
+| Operator syntax | Description
+|:--------------- | :----------
+| CAST(value AS type) | Converts a value to a given type.
+
+### Value constructors
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| ROW (value [, value]* ) | Creates a row from a list of values.
+| (value [, value]* )     | Creates a row from a list of values.
+| map [ key ]     | Returns the element of a map with a particular key.
+| array [ index ] | Returns the element at a particular location in an array.
+| ARRAY [ value [, value ]* ] | Creates an array from a list of values.
+| MAP [ key, value [, key, value ]* ] | Creates a map from a list of key-value pairs.
+
+### Collection functions
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| ELEMENT(value)  | Returns the sole element of a array or multiset; null if the collection is empty; throws if it has more than one element.
+| CARDINALITY(value) | Returns the number of elements in an array or multiset.
+
+See also: UNNEST relational operator converts a collection to a relation.
+
+### JDBC function escape
+
+#### Numeric
+
+| Operator syntax                | Description
+|:------------------------------ |:-----------
+| {fn LOG10(numeric)}            | Returns the base-10 logarithm of *numeric*
+| {fn POWER(numeric1, numeric2)} | Returns *numeric1* raised to the power of *numeric2*
+
+Not implemented:
+
+* {fn ABS(numeric)} - Returns the absolute value of *numeric*
+* {fn ACOS(numeric)} - Returns the arc cosine of *numeric*
+* {fn ASIN(numeric)} - Returns the arc sine of *numeric*
+* {fn ATAN(numeric)} - Returns the arc tangent of *numeric*
+* {fn ATAN2(numeric, numeric)}
+* {fn CEILING(numeric)} - Rounds *numeric* up, and returns the smallest number that is greater than or equal to *numeric*
+* {fn COS(numeric)} - Returns the cosine of *numeric*
+* {fn COT(numeric)}
+* {fn DEGREES(numeric)} - Converts *numeric* from radians to degrees
+* {fn EXP(numeric)} - Returns *e* raised to the power of *numeric*
+* {fn FLOOR(numeric)} - Rounds *numeric* down, and returns the largest number that is less than or equal to *numeric*
+* {fn LOG(numeric)} - Returns the natural logarithm (base *e*) of *numeric*
+* {fn MOD(numeric1, numeric2)} - Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
+* {fn PI()} - Returns a value that is closer than any other value to *pi*
+* {fn RADIANS(numeric)} - Converts *numeric* from degrees to radians
+* {fn RAND(numeric)}
+* {fn ROUND(numeric, numeric)}
+* {fn SIGN(numeric)}
+* {fn SIN(numeric)} - Returns the sine of *numeric*
+* {fn SQRT(numeric)} - Returns the square root of *numeric*
+* {fn TAN(numeric)} - Returns the tangent of *numeric*
+* {fn TRUNCATE(numeric, numeric)}
+
+#### String
+
+| Operator syntax | Description
+|:--------------- |:-----------
+| {fn LOCATE(string1, string2)} | Returns the position in *string2* of the first occurrence of *string1*. Searches from the beginning of the second CharacterExpression, unless the startIndex parameter is specified.
+| {fn INSERT(string1, start, length, string2)} | Inserts *string2* into a slot in *string1*
+| {fn LCASE(string)}            | Returns a string in which all alphabetic characters in *string* have been converted to lower case
+
+Not implemented:
+
+* {fn ASCII(string)} - Convert a single-character string to the corresponding ASCII code, an integer between 0 and 255
+* {fn CHAR(string)}
+* {fn CONCAT(character, character)} - Returns the concatenation of character strings
+* {fn DIFFERENCE(string, string)}
+* {fn LEFT(string, integer)}
+* {fn LENGTH(string)}
+* {fn LOCATE(string1, string2 [, integer])} - Returns the position in *string2* of the first occurrence of *string1*. Searches from the beginning of *string2*, unless *integer* is specified.
+* {fn LTRIM(string)}
+* {fn REPEAT(string, integer)}
+* {fn REPLACE(string, string, string)}
+* {fn RIGHT(string, integer)}
+* {fn RTRIM(string)}
+* {fn SOUNDEX(string)}
+* {fn SPACE(integer)}
+* {fn SUBSTRING(string, integer, integer)}
+* {fn UCASE(string)} - Returns a string in which all alphabetic characters in *string* have been converted to upper case
+
+#### Date/time
+
+Not implemented:
+
+* {fn CURDATE()}
+* {fn CURTIME()}
+* {fn DAYNAME(date)}
+* {fn DAYOFMONTH(date)}
+* {fn DAYOFWEEK(date)}
+* {fn DAYOFYEAR(date)}
+* {fn HOUR(time)}
+* {fn MINUTE(time)}
+* {fn MONTH(date)}
+* {fn MONTHNAME(date)}
+* {fn NOW()}
+* {fn QUARTER(date)}
+* {fn SECOND(time)}
+* {fn TIMESTAMPADD(interval, count, timestamp)}
+* {fn TIMESTAMPDIFF(interval, timestamp, timestamp)}
+* {fn WEEK(date)}
+* {fn YEAR(date)}
+
+#### System
+
+Not implemented:
+
+* {fn DATABASE()}
+* {fn IFNULL(value, value)}
+* {fn USER(value, value)}
+* {fn CONVERT(value, type)}
+
+### Aggregate functions
+
+Syntax:
+
+{% highlight SQL %}
+aggregateCall:
+        agg( [ DISTINCT ] value [, value]* ) [ FILTER ( WHERE condition ) ]
+    |   agg(*) [ FILTER ( WHERE condition ) ]
+{% endhighlight %}
+
+If `FILTER` is present, the aggregate function only considers rows for which
+*condition* evaluates to TRUE.
+
+If `DISTINCT` is present, duplicate argument values are eliminated before being
+passed to the aggregate function.
+
+| Operator syntax                    | Description
+|:---------------------------------- |:-----------
+| COUNT( [ DISTINCT ] value [, value]* ) | Returns the number of input rows for which *value* is not null (wholly not null if *value* is composite)
+| COUNT(*)                           | Returns the number of input rows
+| AVG( [ DISTINCT ] numeric)         | Returns the average (arithmetic mean) of *numeric* across all input values
+| SUM( [ DISTINCT ] numeric)         | Returns the sum of *numeric* across all input values
+| MAX( [ DISTINCT ] value)           | Returns the maximum value of *value* across all input values
+| MIN( [ DISTINCT ] value)           | Returns the minimum value of *value* across all input values
+| STDDEV_POP( [ DISTINCT ] numeric)  | Returns the population standard deviation of *numeric* across all input values
+| STDDEV_SAMP( [ DISTINCT ] numeric) | Returns the sample standard deviation of *numeric* across all input values
+| VAR_POP( [ DISTINCT ] value)       | Returns the population variance (square of the population standard deviation) of *numeric* across all input values
+| VAR_SAMP( [ DISTINCT ] numeric)    | Returns the sample variance (square of the sample standard deviation) of *numeric* across all input values
+| COVAR_POP(numeric1, numeric2)      | Returns the population covariance of the pair (*numeric1*, *numeric2*) across all input values
+| COVAR_SAMP(numeric1, numeric2)     | Returns the sample covariance of the pair (*numeric1*, *numeric2*) across all input values
+| REGR_SXX(numeric1, numeric2)       | Returns the sum of squares of the dependent expression in a linear regression model
+| REGR_SYY(numeric1, numeric2)       | Returns the sum of squares of the independent expression in a linear regression model
+
+Not implemented:
+
+* REGR_AVGX(numeric1, numeric2)
+* REGR_AVGY(numeric1, numeric2)
+* REGR_COUNT(numeric1, numeric2)
+* REGR_INTERCEPT(numeric1, numeric2)
+* REGR_R2(numeric1, numeric2)
+* REGR_SLOPE(numeric1, numeric2)
+* REGR_SXY(numeric1, numeric2)
+
+### Window functions
+
+| Operator syntax                           | Description
+|:----------------------------------------- |:-----------
+| COUNT(value [, value ]* ) OVER window     | Returns the number of rows in *window* for which *value* is not null (wholly not null if *value* is composite)
+| COUNT(*) OVER window                      | Returns the number of rows in *window*
+| AVG(numeric) OVER window                  | Returns the average (arithmetic mean) of *numeric* across all values in *window*
+| SUM(numeric) OVER window                  | Returns the sum of *numeric* across all values in *window*
+| MAX(value) OVER window                    | Returns the maximum value of *value* across all values in *window*
+| MIN(value) OVER window                    | Returns the minimum value of *value* across all values in *window*
+| RANK() OVER window                        | Returns the rank of the current row with gaps; same as ROW_NUMBER of its first peer
+| DENSE_RANK() OVER window                  | Returns the rank of the current row without gaps; this function counts peer groups
+| ROW_NUMBER() OVER window                  | Returns the number of the current row within its partition, counting from 1
+| FIRST_VALUE(value) OVER window            | Returns *value* evaluated at the row that is the first row of the window frame
+| LAST_VALUE(value) OVER window             | Returns *value* evaluated at the row that is the last row of the window frame
+| LEAD(value, offset, default) OVER window  | Returns *value* evaluated at the row that is *offset* rows after the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
+| LAG(value, offset, default) OVER window   | Returns *value* evaluated at the row that is *offset* rows before the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
+| NTILE(value) OVER window                  | Returns an integer ranging from 1 to *value*, dividing the partition as equally as possible
+
+Not implemented:
+
+* COUNT(DISTINCT value) OVER window
+* FIRST_VALUE(value) IGNORE NULLS OVER window
+* LAST_VALUE(value) IGNORE NULLS OVER window
+* PERCENT_RANK(value) OVER window
+* CUME_DIST(value) OVER window
+* NTH_VALUE(value, nth) OVER window
+
+### Grouping functions
+
+| Operator syntax      | Description
+|:-------------------- |:-----------
+| GROUPING(expression) | Returns 1 if expression is rolled up in the current row's grouping set, 0 otherwise
+| GROUP_ID()           | Returns an integer that uniquely identifies the combination of grouping keys
+| GROUPING_ID(expression [, expression ] * ) | Returns a bit vector of the given grouping expressions


[06/19] incubator-calcite git commit: Clean up

Posted by jh...@apache.org.
Clean up


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

Branch: refs/heads/master
Commit: 37535f886bb5d7c4bd816ea62f4c2e8328cbaa54
Parents: bb91b5e
Author: Julian Hyde <jh...@apache.org>
Authored: Fri May 22 13:53:37 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed May 27 17:47:15 2015 -0700

----------------------------------------------------------------------
 avatica/src/main/java/org/apache/calcite/avatica/SqlType.java  | 4 ++--
 core/src/main/java/org/apache/calcite/model/JsonRoot.java      | 6 ++++--
 .../main/java/org/apache/calcite/rel/rules/LoptJoinTree.java   | 4 ++--
 .../main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java  | 1 +
 .../java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java   | 2 +-
 ubenchmark/src/main/java/org/apache/calcite/StatementTest.java | 6 +++---
 6 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/avatica/src/main/java/org/apache/calcite/avatica/SqlType.java
----------------------------------------------------------------------
diff --git a/avatica/src/main/java/org/apache/calcite/avatica/SqlType.java b/avatica/src/main/java/org/apache/calcite/avatica/SqlType.java
index 9e4b2ba..e34bee6 100644
--- a/avatica/src/main/java/org/apache/calcite/avatica/SqlType.java
+++ b/avatica/src/main/java/org/apache/calcite/avatica/SqlType.java
@@ -513,8 +513,8 @@ public enum SqlType {
    *
    * <p>The JDBC standard describes the mapping in table <a href="#B6">B-6</a>.
    */
-  public static boolean canGet(Method aClass, SqlType sqlType) {
-    final EnumSet<SqlType> sqlTypes = GET_LIST.get(aClass);
+  public static boolean canGet(Method method, SqlType sqlType) {
+    final EnumSet<SqlType> sqlTypes = GET_LIST.get(method);
     return sqlTypes != null && sqlTypes.contains(sqlType);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/core/src/main/java/org/apache/calcite/model/JsonRoot.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/model/JsonRoot.java b/core/src/main/java/org/apache/calcite/model/JsonRoot.java
index ba73e5b..44703aa 100644
--- a/core/src/main/java/org/apache/calcite/model/JsonRoot.java
+++ b/core/src/main/java/org/apache/calcite/model/JsonRoot.java
@@ -28,11 +28,12 @@ import java.util.List;
  *
  * <p>Schema structure is as follows:</p>
  *
+ * <!-- CHECKSTYLE: OFF -->
  * <pre>{@code Root}
  *   {@link JsonSchema} (in collection {@link JsonRoot#schemas schemas})
  *     {@link JsonTable} (in collection {@link JsonMapSchema#tables tables})
- *       {@link JsonColumn} (in collection {@link JsonTable#columns columns}
- *       {@link JsonStream} (in field {@link JsonTable#stream stream}
+ *       {@link JsonColumn} (in collection {@link JsonTable#columns columns})
+ *       {@link JsonStream} (in field {@link JsonTable#stream stream})
  *     {@link JsonView}
  *     {@link JsonFunction} (in collection {@link JsonMapSchema#functions functions})
  *     {@link JsonLattice} (in collection {@link JsonSchema#lattices lattices})
@@ -41,6 +42,7 @@ import java.util.List;
  *         {@link JsonMeasure} (in collection {@link JsonTile#measures measures})
  *     {@link JsonMaterialization} (in collection {@link JsonSchema#materializations materializations})
  * </pre>
+ * <!-- CHECKSTYLE: ON -->
  */
 public class JsonRoot {
   public String version;

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
index 55e41c7..126659b 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
@@ -190,8 +190,8 @@ public class LoptJoinTree {
 
   /** Binary tree node that has two children. */
   protected static class Node extends BinaryTree {
-    private BinaryTree left;
-    private BinaryTree right;
+    private final BinaryTree left;
+    private final BinaryTree right;
 
     public Node(BinaryTree left, BinaryTree right, LoptJoinTree parent) {
       super(parent);

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
index e75cc7c..a41e1aa 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
@@ -623,6 +623,7 @@ public class LoptMultiJoin {
    * @param joinTree join tree to be examined
    * @param childFactors bitmap to be set
    */
+  @Deprecated // to be removed before 2.0
   public void getChildFactors(LoptJoinTree joinTree,
       ImmutableBitSet.Builder childFactors) {
     for (int child : joinTree.getTreeOrder()) {

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
index 0f7ca67..7a724b9 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
@@ -1450,7 +1450,7 @@ public class SqlStdOperatorTable extends ReflectiveSqlOperatorTable {
 
   /**
    * The internal "$SCALAR_QUERY" operator returns a scalar value from a
-   * record type. It asusmes the record type only has one field, and returns
+   * record type. It assumes the record type only has one field, and returns
    * that field as the output.
    */
   public static final SqlInternalOperator SCALAR_QUERY =

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/37535f88/ubenchmark/src/main/java/org/apache/calcite/StatementTest.java
----------------------------------------------------------------------
diff --git a/ubenchmark/src/main/java/org/apache/calcite/StatementTest.java b/ubenchmark/src/main/java/org/apache/calcite/StatementTest.java
index 09bfdf8..b8a7d2f 100644
--- a/ubenchmark/src/main/java/org/apache/calcite/StatementTest.java
+++ b/ubenchmark/src/main/java/org/apache/calcite/StatementTest.java
@@ -197,9 +197,7 @@ public class StatementTest {
     }
   }
 
-  // Disable checkstyle, so it doesn't complain about fields like "customer_id".
-  //CHECKSTYLE: OFF
-
+  /** Pojo schema containing "emps" and "depts" tables. */
   public static class HrSchema {
     @Override public String toString() {
       return "HrSchema";
@@ -218,6 +216,7 @@ public class StatementTest {
     };
   }
 
+  /** Employee record. */
   public static class Employee {
     public final int empid;
     public final int deptno;
@@ -240,6 +239,7 @@ public class StatementTest {
     }
   }
 
+  /** Department record. */
   public static class Department {
     public final int deptno;
     public final String name;


[03/19] incubator-calcite git commit: [maven-release-plugin] prepare for next development iteration

Posted by jh...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/master
Commit: 6b16ca59f1ee4a3adfd6a701a9b1f72eebf28aa6
Parents: 495f185
Author: Julian Hyde <jh...@apache.org>
Authored: Thu May 21 13:32:32 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu May 21 13:32:32 2015 -0700

----------------------------------------------------------------------
 avatica-server/pom.xml |  4 ++--
 avatica/pom.xml        |  4 ++--
 core/pom.xml           |  4 ++--
 example/csv/pom.xml    |  4 ++--
 example/pom.xml        |  4 ++--
 linq4j/pom.xml         |  4 ++--
 mongodb/pom.xml        |  4 ++--
 plus/pom.xml           |  4 ++--
 pom.xml                | 16 ++++++++--------
 spark/pom.xml          |  4 ++--
 splunk/pom.xml         |  4 ++--
 ubenchmark/pom.xml     |  2 +-
 12 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/avatica-server/pom.xml
----------------------------------------------------------------------
diff --git a/avatica-server/pom.xml b/avatica-server/pom.xml
index 15d7dc6..c1413b8 100644
--- a/avatica-server/pom.xml
+++ b/avatica-server/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-avatica-server</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Avatica Server</name>
   <description>JDBC server.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/avatica/pom.xml
----------------------------------------------------------------------
diff --git a/avatica/pom.xml b/avatica/pom.xml
index 31ebb53..3e241db 100644
--- a/avatica/pom.xml
+++ b/avatica/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-avatica</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Avatica</name>
   <description>JDBC driver framework.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index ffca322..f863efc 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-core</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Core</name>
   <description>Core Calcite APIs and engine.</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/example/csv/pom.xml
----------------------------------------------------------------------
diff --git a/example/csv/pom.xml b/example/csv/pom.xml
index b673d1e..c573eca 100644
--- a/example/csv/pom.xml
+++ b/example/csv/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite-example</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-example-csv</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Example CSV</name>
   <description>An example Calcite provider that reads CSV files</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/example/pom.xml
----------------------------------------------------------------------
diff --git a/example/pom.xml b/example/pom.xml
index 660ccd2..fdf57cb 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -20,13 +20,13 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <!-- The basics. -->
   <artifactId>calcite-example</artifactId>
   <packaging>pom</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Examples</name>
   <description>Calcite examples</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/linq4j/pom.xml
----------------------------------------------------------------------
diff --git a/linq4j/pom.xml b/linq4j/pom.xml
index 846f899..508006a 100644
--- a/linq4j/pom.xml
+++ b/linq4j/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-linq4j</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Linq4j</name>
   <description>Calcite APIs for LINQ (Language-Integrated Query) in Java</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/mongodb/pom.xml b/mongodb/pom.xml
index 2222ff4..bc1ac3d 100644
--- a/mongodb/pom.xml
+++ b/mongodb/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-mongodb</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite MongoDB</name>
   <description>MongoDB adapter for Calcite</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/plus/pom.xml
----------------------------------------------------------------------
diff --git a/plus/pom.xml b/plus/pom.xml
index 76c4d87..57dfcbb 100644
--- a/plus/pom.xml
+++ b/plus/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-plus</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Plus</name>
   <description>Miscellaneous extras for Calcite</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7dc1f2a..f92c82b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
   <groupId>org.apache.calcite</groupId>
   <artifactId>calcite</artifactId>
   <packaging>pom</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
 
   <!-- More project information. -->
   <name>Calcite</name>
@@ -61,7 +61,7 @@ limitations under the License.
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</developerConnection>
     <url>https://github.com/apache/incubator-calcite</url>
-    <tag>calcite-1.3.0-incubating</tag>
+    <tag>HEAD</tag>
   </scm>
 
   <modules>
@@ -88,34 +88,34 @@ limitations under the License.
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica</artifactId>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica</artifactId>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
         <type>test-jar</type>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-avatica-server</artifactId>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-core</artifactId>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-core</artifactId>
         <type>test-jar</type>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.calcite</groupId>
         <artifactId>calcite-linq4j</artifactId>
-        <version>1.3.0-incubating</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
       </dependency>
 
       <!-- Now third-party dependencies, sorted by groupId and artifactId. -->

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/spark/pom.xml
----------------------------------------------------------------------
diff --git a/spark/pom.xml b/spark/pom.xml
index d010263..ff3e745 100644
--- a/spark/pom.xml
+++ b/spark/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-spark</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Spark</name>
 
   <properties>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/splunk/pom.xml
----------------------------------------------------------------------
diff --git a/splunk/pom.xml b/splunk/pom.xml
index 61c0acb..bf890e3 100644
--- a/splunk/pom.xml
+++ b/splunk/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <artifactId>calcite-splunk</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.0-incubating</version>
+  <version>1.4.0-incubating-SNAPSHOT</version>
   <name>Calcite Splunk</name>
   <description>Splunk adapter for Calcite; also a JDBC driver for Splunk</description>
 

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/6b16ca59/ubenchmark/pom.xml
----------------------------------------------------------------------
diff --git a/ubenchmark/pom.xml b/ubenchmark/pom.xml
index bc40d9d..cbb4413 100644
--- a/ubenchmark/pom.xml
+++ b/ubenchmark/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.calcite</groupId>
     <artifactId>calcite</artifactId>
-    <version>1.3.0-incubating</version>
+    <version>1.4.0-incubating-SNAPSHOT</version>
   </parent>
 
   <properties>


[08/19] incubator-calcite git commit: [CALCITE-355] Web site

Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/fonts/fontawesome-webfont.woff
----------------------------------------------------------------------
diff --git a/site/fonts/fontawesome-webfont.woff b/site/fonts/fontawesome-webfont.woff
new file mode 100755
index 0000000..628b6a5
Binary files /dev/null and b/site/fonts/fontawesome-webfont.woff differ

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/help/index.md
----------------------------------------------------------------------
diff --git a/site/help/index.md b/site/help/index.md
new file mode 100644
index 0000000..599e926
--- /dev/null
+++ b/site/help/index.md
@@ -0,0 +1,32 @@
+---
+layout: page
+title: Getting Help
+---
+
+Need help with Calcite? Try these resources.
+
+## Mailing Lists
+
+The best option is to send email to the developers list
+[dev@calcite.incubator.apache.org](mailto:dev@calcite.incubator.apache.org). All
+of the historic traffic is available in the
+[archive](http://mail-archives.apache.org/mod_mbox/calcite-dev/). To
+subscribe to the user list, please send email to
+[dev-subscribe@calcite.incubator.apache.org](mailto:dev-subscribe@calcite.incubator.apache.org).
+
+## Bug Reports
+
+Please file any issues you encounter or fixes you'd like on the
+[Calcite Jira](https://issues.apache.org/jira/browse/CALCITE). We welcome
+patches!
+
+## StackOverflow
+
+[StackOverflow](http://stackoverflow.com) is a wonderful resource for
+any developer. Take a look over there to see if someone has answered
+your question.
+
+## Browse the code
+
+One of the advantages of open source software is that you can browse the code.
+The code is available on [github](https://github.com/apache/incubator-calcite/tree/master).

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/img/logo.png
----------------------------------------------------------------------
diff --git a/site/img/logo.png b/site/img/logo.png
new file mode 100644
index 0000000..b883465
Binary files /dev/null and b/site/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/index.html
----------------------------------------------------------------------
diff --git a/site/index.html b/site/index.html
new file mode 100644
index 0000000..da560c5
--- /dev/null
+++ b/site/index.html
@@ -0,0 +1,34 @@
+---
+layout: default
+title: Apache Calcite &bull; Dynamic data management framework
+overview: true
+---
+
+<section class="intro">
+  <div class="grid">
+    <div class="unit whole center-on-mobiles">
+      <p class="first">The foundation for your next high-performance database.</p>
+    </div>
+  </div>
+</section>
+<section class="features">
+  <div class="grid">
+    <div class="unit one-third">
+      <h2>Standard SQL</h2>
+      <p>Industry-standard SQL parser, validator and JDBC driver.</p>
+      <a href="/docs/reference.html">SQL &rarr;</a>
+    </div>
+    <div class="unit one-third">
+      <h2>Query optimization</h2>
+      <p>Represent your query in relational algebra, transform using
+        planning rules, and optimize according to a cost model.</p>
+      <a href="/docs/algebra.html">Relational algebra &rarr;</a>
+    </div>
+    <div class="unit one-third">
+      <h2>Any data, anywhere</h2>
+      <p>Connect to third-party data sources, browse metadata, and optimize by pushing the computation to the data.</p>
+      <a href="/docs/adapter.html">Adapters &rarr;</a>
+    </div>
+    <div class="clear"></div>
+  </div>
+</section>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/js/html5shiv.min.js
----------------------------------------------------------------------
diff --git a/site/js/html5shiv.min.js b/site/js/html5shiv.min.js
new file mode 100644
index 0000000..d4c731a
--- /dev/null
+++ b/site/js/html5shiv.min.js
@@ -0,0 +1,4 @@
+/**
+* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag
 ()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"
 ==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/js/respond.min.js
----------------------------------------------------------------------
diff --git a/site/js/respond.min.js b/site/js/respond.min.js
new file mode 100644
index 0000000..80a7b69
--- /dev/null
+++ b/site/js/respond.min.js
@@ -0,0 +1,5 @@
+/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
+ * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
+ *  */
+
+!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:
 o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeC
 hild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substr
 ing(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("
 //"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/news/index.html
----------------------------------------------------------------------
diff --git a/site/news/index.html b/site/news/index.html
new file mode 100644
index 0000000..4a6490f
--- /dev/null
+++ b/site/news/index.html
@@ -0,0 +1,19 @@
+---
+layout: news
+title: News
+permalink: /news/
+author: all
+---
+
+{% for post in site.posts %}
+  {% include news_item.html %}
+{% endfor %}
+
+<p></p>
+
+<h2>Calcite Twitter</h2>
+
+<p>The official <a href="https://twitter.com/apachecalcite">@ApacheCalcite</a>
+Twitter account pushes announcements about Calcite. If you give a talk about
+Calcite, let us know and we'll tweet it out and add it to the news section
+of the website.</p>

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/news/releases/index.html
----------------------------------------------------------------------
diff --git a/site/news/releases/index.html b/site/news/releases/index.html
new file mode 100644
index 0000000..153d022
--- /dev/null
+++ b/site/news/releases/index.html
@@ -0,0 +1,10 @@
+---
+layout: news
+title: Releases
+permalink: /news/releases/
+author: all
+---
+
+{% for post in site.categories.release %}
+  {% include news_item.html %}
+{% endfor %}

http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/5c049bc8/site/talks/index.md
----------------------------------------------------------------------
diff --git a/site/talks/index.md b/site/talks/index.md
new file mode 100644
index 0000000..5744db7
--- /dev/null
+++ b/site/talks/index.md
@@ -0,0 +1,28 @@
+---
+layout: page
+title: Calcite Talks
+---
+
+Want to learn more about Calcite?
+
+Watch some presentations and read through some slide decks about Calcite.
+
+## Slides
+
+* Apache Calcite overview
+
+    Julian Hyde at Apache Kylin meetup 2014
+
+    <iframe src="//www.slideshare.net/slideshow/embed_code/key/fCGsAedsQiq53V"
+    width="425" height="355" frameborder="0" marginwidth="0" marginheight="0"
+    scrolling="no" style="border:1px solid #CCC; border-width:1px;
+    margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
+
+
+* <a href="http://www.slideshare.net/julianhyde/how-to-integrate-splunk-with-any-data-solution">How to integrate Splunk with any data solution</a> (Splunk User Conference, 2012)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-drill-user-group-2013.pdf?raw=true">Drill / SQL / Optiq</a> (2013)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-richrelevance-2013.pdf?raw=true">SQL on Big Data using Optiq</a> (2013)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-nosql-now-2013.pdf?raw=true">SQL Now!</a> (NoSQL Now! conference, 2013)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/hive-cbo-summit-2014.pdf?raw=true">Cost-based optimization in Hive</a> (<a href="https://www.youtube.com/watch?v=vpG5noIbEFs">video</a>) (Hadoop Summit, 2014)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/dmmq-summit-2014.pdf?raw=true">Discardable, in-memory materialized query for Hadoop</a> (<a href="https://www.youtube.com/watch?v=CziGOa8GXqI">video</a>) (Hadoop Summit, 2014)
+* <a href="https://github.com/julianhyde/share/blob/master/slides/hive-cbo-seattle-2014.pdf?raw=true">Cost-based optimization in Hive 0.14</a> (Seattle, 2014)