Modified: calcite/site/docs/history.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/history.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/history.html (original)
+++ calcite/site/docs/history.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 
@@ -109,7 +109,17 @@
 Downloads are available on the
 <a href="/downloads/">downloads page</a>.</p>
 
-<h2 id="v1-12-0"><a 
href="https://github.com/apache/calcite/releases/tag/calcite-1.12.0";>1.12.0</a> 
/ under development</h2>
+<h2 id="v1-12-0"><a 
href="https://github.com/apache/calcite/releases/tag/calcite-1.12.0";>1.12.0</a> 
/ 2017-03-24</h2>
+
+<p><a href="../news/2017/03/24/release-1.12.0">Features of note</a> this 
release are
+JDK 9 support,
+the new file/web and Apache Pig adapters,
+general improvements to the Druid adapter,
+more helpful error messages if you get a table or column name wrong,
+improved the plans for correlated sub-queries,
+support for <code class="highlighter-rouge">TUMBLE</code>, <code 
class="highlighter-rouge">HOP</code> and <code 
class="highlighter-rouge">SESSION</code> window functions in streaming and 
regular queries,
+experimental support for <code 
class="highlighter-rouge">MATCH_RECOGNIZE</code> clause for complex-event 
processing (CEP),
+several new built-in functions to comply with the ODBC/JDBC standard.</p>
 
 <p>Compatibility: This release is tested
 on Linux, macOS, Microsoft Windows;
@@ -121,21 +131,259 @@ other software versions as specified in
 <h3 id="new-features">New features</h3>
 
 <ul>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1666";>CALCITE-1666</a>]
+Support for modifiable views with extended columns (Kevin Liew)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1655";>CALCITE-1655</a>]
+Druid adapter: add <code class="highlighter-rouge">IN</code> filter (Slim 
Bouguerra)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1641";>CALCITE-1641</a>]
+Add parser and validator support for <code 
class="highlighter-rouge">MATCH_RECOGNIZE</code>, a new clause for
+complex-event processing (CEP) (Zhiqiang-He)
+    <ul>
+      <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1686";>CALCITE-1686</a>]
+Only allow <code class="highlighter-rouge">FINAL</code> and other functions 
inside <code class="highlighter-rouge">MATCH_RECOGNIZE</code> (Zhiqiang-He)</li>
+      <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1689";>CALCITE-1689</a>]
+Remove <code class="highlighter-rouge">PATTERN_DEFINE_AS</code> in 
SqlStdOperatorTable; <code class="highlighter-rouge">MATCH_RECOGNIZE</code> now 
uses
+<code class="highlighter-rouge">AS</code> (Zhiqiang-He)</li>
+    </ul>
+  </li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1668";>CALCITE-1668</a>]
+Simplify <code class="highlighter-rouge">1 = 1</code> to <code 
class="highlighter-rouge">TRUE</code>, <code class="highlighter-rouge">1 &gt; 
2</code> to <code class="highlighter-rouge">FALSE</code> (Kevin Risden)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1598";>CALCITE-1598</a>]
+Pig adapter (Eli Levine)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1661";>CALCITE-1661</a>]
+Druid adapter: Support aggregation functions on <code 
class="highlighter-rouge">DECIMAL</code> columns</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1615";>CALCITE-1615</a>]
+Support <code class="highlighter-rouge">HOP</code> and <code 
class="highlighter-rouge">SESSION</code> functions in the <code 
class="highlighter-rouge">GROUP BY</code> clause
+(Julian Hyde and Haohui Mai)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1494";>CALCITE-1494</a>]
+More efficient plan for correlated sub-queries, omitting value-generating
+scans where possible</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1638";>CALCITE-1638</a>]
+Simplify <code class="highlighter-rouge">$x = $x</code> to <code 
class="highlighter-rouge">$x is not null</code></li>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-884";>CALCITE-884</a>]
 File adapter (Henry Olson)
     <ul>
+      <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1704";>CALCITE-1704</a>]
+Execute queries on CSV files using simple <code 
class="highlighter-rouge">sqlline</code> command</li>
+      <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1676";>CALCITE-1676</a>]
+Scan directory for .csv, .json and .gz files</li>
       <li>Allow multiple Calcite columns to be derived from one HTML column,
 e.g. Location → Lat, Lon</li>
       <li>Improved pattern match: added <code 
class="highlighter-rouge">matchSeq</code> to allow selection of
 <i>n</i>th match</li>
       <li>Add replace patterns to cell parsing logic</li>
-      <li>Add handling for tables without <code 
class="highlighter-rouge">&amp;lt;TH&amp;gt;</code> elements</li>
-      <li>Unit tests using local files; URL tests are contingent on network
-access</li>
-      <li>Ability to parse HTML from local files</li>
-      <li>Derived from CSV adapter</li>
+      <li>Add handling for tables without <code 
class="highlighter-rouge">&lt;TH&gt;</code> elements</li>
+      <li>Unit tests using local files (URL tests are contingent on network
+access)</li>
+      <li>Ability to parse HTML, CSV and JSON from local files</li>
+      <li>Combine the <a 
href="https://github.com/HenryOlson/optiq-web";>optiq-web</a>
+project with code from the
+<a href="/org/apache/calcite/adapter/csv/package-summary.html">CSV 
adapter</a></li>
+    </ul>
+  </li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1652";>CALCITE-1652</a>]
+Allow <code class="highlighter-rouge">GROUPING</code> function to have 
multiple arguments, like <code class="highlighter-rouge">GROUPING_ID</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1634";>CALCITE-1634</a>]
+Make <code class="highlighter-rouge">RelBuilder.distinct</code> no-op if input 
is already distinct; use it in
+<code class="highlighter-rouge">RelDecorrelator</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1635";>CALCITE-1635</a>]
+Add <code class="highlighter-rouge">MinRowCount</code> metadata</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1628";>CALCITE-1628</a>]
+Add an alternative match pattern for <code 
class="highlighter-rouge">SemiJoinRule</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1618";>CALCITE-1618</a>]
+<code class="highlighter-rouge">SortProjectTransposeRule</code> should check 
for monotonicity preserving <code class="highlighter-rouge">CAST</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1510";>CALCITE-1510</a>]
+In <code class="highlighter-rouge">INSERT</code>/<code 
class="highlighter-rouge">UPSERT</code> without an explicit target column list, 
allow fewer source
+columns than table (Kevin Liew)
+    <ul>
+      <li>Check for default value only when target field is null
+(Rajeshbabu Chintaguntla)</li>
+    </ul>
+  </li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1603";>CALCITE-1603</a>]
+Support <code class="highlighter-rouge">TUMBLE</code> window function in the 
<code class="highlighter-rouge">GROUP BY</code> clause (Julian Hyde and
+Haohui Mai)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1606";>CALCITE-1606</a>]
+Add datetime scalar functions (Laurent Goujon)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1604";>CALCITE-1604</a>]
+Add JDBC/ODBC scalar functions <code 
class="highlighter-rouge">DATABASE</code>, <code 
class="highlighter-rouge">IFNULL</code>, <code 
class="highlighter-rouge">USER</code> (Laurent Goujon)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1549";>CALCITE-1549</a>]
+More helpful error message when schema, table or column not found</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-420";>CALCITE-420</a>]
+Add <code class="highlighter-rouge">REPLACE</code> function, callable with and 
without JDBC escape syntax (Riccardo
+Tommasini)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1557";>CALCITE-1557</a>]
+Add numeric scalar functions (Laurent Goujon)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1258";>CALCITE-1258</a>]
+JDK9</li>
+</ul>
+
+<h4 id="bug-fixes-api-changes-and-minor-enhancements">Bug-fixes, API changes 
and minor enhancements</h4>
+
+<ul>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1716";>CALCITE-1716</a>]
+Fix Cassandra integration tests</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1715";>CALCITE-1715</a>]
+Downgrade to Guava 19.0 to fix Cassandra incompatibility</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1706";>CALCITE-1706</a>]
+Disable <code 
class="highlighter-rouge">DruidAggregateFilterTransposeRule</code>, because it 
causes fine-grained
+aggregations to be pushed to Druid</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1695";>CALCITE-1695</a>]
+Add class <code class="highlighter-rouge">RexSimplify</code>, providing an 
explicit <code class="highlighter-rouge">RexExecutor</code> for methods to
+simplify <code class="highlighter-rouge">RexNode</code>s</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1694";>CALCITE-1694</a>]
+Pig adapter: Use the shaded Avatica dependency instead</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1561";>CALCITE-1561</a>]
+Make <code class="highlighter-rouge">PigTest</code> cluster aware of data 
files; hopefully this will prevent
+intermittent test failures (Eli Levine)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1696";>CALCITE-1696</a>]
+Support <code class="highlighter-rouge">RexLocalRef</code> for <code 
class="highlighter-rouge">EXPLAIN PLAN AS JSON</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1683";>CALCITE-1683</a>]
+Druid-specific rules to transpose <code 
class="highlighter-rouge">Filter</code> with other relations
+(Nishant Bangarwa)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1684";>CALCITE-1684</a>]
+Change default precision of <code class="highlighter-rouge">VARCHAR</code> and 
<code class="highlighter-rouge">VARBINARY</code> types from 1 to
+“unspecified” (Kevin Liew)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1691";>CALCITE-1691</a>]
+<code class="highlighter-rouge">ClassCastException</code> in <code 
class="highlighter-rouge">RelOptUtil.containsNullableFields</code>, attempting 
to
+convert executor to <code class="highlighter-rouge">RexExecutorImpl</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1688";>CALCITE-1688</a>]
+Infinite loop during materialization substitution if query contains <code 
class="highlighter-rouge">Union</code>,
+<code class="highlighter-rouge">Minus</code> or <code 
class="highlighter-rouge">Intersect</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1665";>CALCITE-1665</a>]
+<code class="highlighter-rouge">HAVING</code> support in <code 
class="highlighter-rouge">RelToSqlConverter</code> (Zhiqiang He)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1673";>CALCITE-1673</a>]
+In CSV adapter, query with <code class="highlighter-rouge">ORDER BY</code> or 
<code class="highlighter-rouge">GROUP BY</code> on <code 
class="highlighter-rouge">TIMESTAMP</code> column
+throws CompileException (Gangadhar Kairi)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1674";>CALCITE-1674</a>]
+<code class="highlighter-rouge">LIKE</code> does not match value that contains 
newline (Mark Payne)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1675";>CALCITE-1675</a>]
+Two-level column name cannot be resolved in <code 
class="highlighter-rouge">ORDER BY</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1667";>CALCITE-1667</a>]
+Forbid calls to JDK APIs that use the default locale, time zone or character
+set</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1656";>CALCITE-1656</a>]
+Improve cost function in <code class="highlighter-rouge">DruidQuery</code> to 
encourage early column pruning
+(Nishant Bangarwa)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1664";>CALCITE-1664</a>]
+<code class="highlighter-rouge">CAST('&lt;string&gt;' as TIMESTAMP)</code> 
wrongly adds part of sub-second fraction to the
+value</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1659";>CALCITE-1659</a>]
+Simplifying <code class="highlighter-rouge">CAST('YYYY-MM-DD hh:mm:ss.SSS' as 
TIMESTAMP)</code> should round the
+sub-second fraction (Remus Rusanu)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1439";>CALCITE-1439</a>]
+Handle errors during constant reduction</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1653";>CALCITE-1653</a>]
+Pass an expression executor to <code 
class="highlighter-rouge">RexUtil.simplify</code> for constant reduction (Remus
+Rusanu)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1601";>CALCITE-1601</a>]
+<code class="highlighter-rouge">DateRangeRules</code> loses OR filters</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1637";>CALCITE-1637</a>]
+Add mutable equivalents for all relational expressions (e.g. <code 
class="highlighter-rouge">MutableFilter</code>)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1621";>CALCITE-1621</a>]
+Add a cast around the NULL literal in aggregate rules (Anton Mushin)
+    <ul>
+      <li>Add <code 
class="highlighter-rouge">RexBuilder.makeNullLiteral(RelDataType)</code></li>
     </ul>
   </li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1649";>CALCITE-1649</a>]
+Data type mismatch in <code 
class="highlighter-rouge">EnumerableMergeJoin</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1636";>CALCITE-1636</a>]
+JDBC adapter generates wrong SQL for self join with sub-query 
(Zhiqiang-He)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1633";>CALCITE-1633</a>]
+In plans, output <code class="highlighter-rouge">Correlate.joinType</code> 
attribute in lower-case, same as
+<code class="highlighter-rouge">Join.joinType</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1632";>CALCITE-1632</a>]
+Return type of “datetime + interval” expression</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-365";>CALCITE-365</a>]
+<code class="highlighter-rouge">AssertionError</code> while translating query 
with <code class="highlighter-rouge">WITH</code> and correlated sub-query</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1623";>CALCITE-1623</a>]
+Make sure <code class="highlighter-rouge">DATE</code>, <code 
class="highlighter-rouge">TIME</code> and <code 
class="highlighter-rouge">TIMESTAMP</code> literals have <code 
class="highlighter-rouge">Calendar</code> with GMT
+timezone</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1619";>CALCITE-1619</a>]
+<code class="highlighter-rouge">CAST</code> is ignored by rules pushing 
operators into <code class="highlighter-rouge">DruidQuery</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1617";>CALCITE-1617</a>]
+Druid adapter: Send timestamp literals to Druid as local time, not UTC</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1500";>CALCITE-1500</a>]
+Decouple materialization and lattice substitution from <code 
class="highlighter-rouge">VolcanoPlanner</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1589";>CALCITE-1589</a>]
+Druid adapter: <code class="highlighter-rouge">timeseries</code> query shows 
all days, even if no data</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1572";>CALCITE-1572</a>]
+<code class="highlighter-rouge">JdbcSchema</code> throws exception when 
detecting nullable columns (Wu Xiang)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1610";>CALCITE-1610</a>]
+<code class="highlighter-rouge">RelBuilder</code> sort-combining optimization 
treats aliases incorrectly (Jess
+Balint)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1595";>CALCITE-1595</a>]
+<code class="highlighter-rouge">RelBuilder.call</code> throws <code 
class="highlighter-rouge">NullPointerException</code> if argument types are 
invalid
+(Jess Balint)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1602";>CALCITE-1602</a>]
+Remove uses of deprecated APIs</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1569";>CALCITE-1569</a>]
+Code generation for fields of type <code 
class="highlighter-rouge">java.sql.Date</code> (Zhen Wang)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1582";>CALCITE-1582</a>]
+<code class="highlighter-rouge">RelToSqlConverter</code> doesn’t handle 
cartesian join (Jess Balint)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1597";>CALCITE-1597</a>]
+Obsolete <code class="highlighter-rouge">Util.newInternal</code>, <code 
class="highlighter-rouge">.pre</code>, <code 
class="highlighter-rouge">.post</code>, <code 
class="highlighter-rouge">.permAssert</code> and
+<code class="highlighter-rouge">Throwables.propagate</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1586";>CALCITE-1586</a>]
+JDBC adapter generates wrong SQL if <code 
class="highlighter-rouge">UNION</code> has more than two inputs (Zhiqiang
+He)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1535";>CALCITE-1535</a>]
+Give error if column referenced in <code class="highlighter-rouge">ORDER 
BY</code> is ambiguous (Zhen Wang)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1594";>CALCITE-1594</a>]
+<code class="highlighter-rouge">ConventionTraitDef.getConversionData()</code> 
is not thread-safe</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1577";>CALCITE-1577</a>]
+Druid adapter: Incorrect result - limit on timestamp disappears</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1587";>CALCITE-1587</a>]
+Druid adapter: <code class="highlighter-rouge">topN</code> query returns 
approximate results</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1578";>CALCITE-1578</a>]
+Druid adapter: wrong semantics of <code class="highlighter-rouge">topN</code> 
query limit with granularity</li>
+  <li>Druid adapter: Add <code class="highlighter-rouge">enum 
Granularity</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1592";>CALCITE-1592</a>]
+<code class="highlighter-rouge">SqlToRelConverter</code> throws <code 
class="highlighter-rouge">UnsupportedOperationException</code> if query has
+<code class="highlighter-rouge">NOT ... NOT IN</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1590";>CALCITE-1590</a>]
+Support Guava version 21.0</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1575";>CALCITE-1575</a>]
+Literals may lose precision during expression reduction</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1546";>CALCITE-1546</a>]
+Wrong plan for <code class="highlighter-rouge">NOT IN</code> sub-queries with 
disjunction</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1574";>CALCITE-1574</a>]
+Memory leak in maven</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1571";>CALCITE-1571</a>]
+Could not resolve view with <code 
class="highlighter-rouge">SimpleCalciteSchema</code></li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1558";>CALCITE-1558</a>]
+<code class="highlighter-rouge">AggregateExpandDistinctAggregatesRule</code> 
gets field mapping wrong if group key
+is used in aggregate function (Zhenghua Gao)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1562";>CALCITE-1562</a>]
+Update jsr305 from 1.3.9 to 3.0.1</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1563";>CALCITE-1563</a>]
+In case-insensitive connection, non-existent tables use alphabetically
+preceding table</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1544";>CALCITE-1544</a>]
+<code class="highlighter-rouge">AggregateJoinTransposeRule</code> fails to 
preserve row type (Kurt Young)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1543";>CALCITE-1543</a>]
+Correlated scalar sub-query with multiple aggregates gives <code 
class="highlighter-rouge">AssertionError</code>
+(Kurt Young)</li>
+</ul>
+
+<h4 id="web-site-and-documentation">Web site and documentation</h4>
+
+<ul>
+  <li>Maryann Xue joins PMC</li>
+  <li>Add 3 new committers (Gian Merlino, Jess Balint, Laurent Goujon)</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1657";>CALCITE-1657</a>]
+Release Calcite 1.12.0</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1677";>CALCITE-1677</a>]
+Replace duplicate avatica docs with a redirect</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1685";>CALCITE-1685</a>]
+Site: <code class="highlighter-rouge">defaultNullCollation</code> key listed 
as <code class="highlighter-rouge">materializationsEnabled</code>
+(Kevin Liew)</li>
+  <li>Add MapD to <a href="/docs/powered_by.html">Powered by
+Calcite</a> page (Todd Mostak)</li>
+  <li>Diagram of logos of projects and products powered by Calcite</li>
+  <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1622";>CALCITE-1622</a>]
+Bugs in website example code (Damjan Jovanovic)</li>
 </ul>
 
 <h2 id="v1-11-0"><a 
href="https://github.com/apache/calcite/releases/tag/calcite-1.11.0";>1.11.0</a> 
/ 2017-01-09</h2>
@@ -267,7 +515,7 @@ Implement JDBC functions: <code class="h
 Add <code class="highlighter-rouge">AS JSON</code> as output option for <code 
class="highlighter-rouge">EXPLAIN</code></li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-1">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1559";>CALCITE-1559</a>]
@@ -357,7 +605,7 @@ Druid type is called <code class="highli
 Add sub-query support for RelStructuredTypeFlattener</li>
 </ul>
 
-<h4 id="web-site-and-documentation">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-1">Web site and documentation</h4>
 
 <ul>
   <li>Change PMC chair</li>
@@ -386,7 +634,7 @@ other software versions as specified in
 Support operator <code class="highlighter-rouge">!=</code> as an alternative 
to <code class="highlighter-rouge">&lt;&gt;</code></li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-1">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-2">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1378";>CALCITE-1378</a>]
@@ -417,7 +665,7 @@ Druid Filter translation incorrect if in
 Allow Calcite JDBC Driver minor version to be greater than 9</li>
 </ul>
 
-<h4 id="web-site-and-documentation-1">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-2">Web site and documentation</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1393";>CALCITE-1393</a>]
@@ -501,7 +749,7 @@ Convert predicates on <code class="highl
 Introduce <code class="highlighter-rouge">UnionPullUpConstantsRule</code></li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-2">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-3">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-30";>CALCITE-30</a>]
@@ -570,7 +818,7 @@ In <code class="highlighter-rouge">SqlKi
 Calcite generate wrong field names in JDBC adapter</li>
 </ul>
 
-<h4 id="web-site-and-documentation-2">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-3">Web site and documentation</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1229";>CALCITE-1229</a>]
@@ -668,7 +916,7 @@ Add <code class="highlighter-rouge">Proj
 substitution</li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-3">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-4">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1281";>CALCITE-1281</a>]
@@ -747,7 +995,7 @@ Allow <code class="highlighter-rouge">Sq
 Allow apache-rat to be run outside of release process</li>
 </ul>
 
-<h4 id="web-site-and-documentation-3">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-4">Web site and documentation</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1273";>CALCITE-1273</a>]
@@ -852,7 +1100,7 @@ In <code class="highlighter-rouge">RelBu
 Not valid to convert <code class="highlighter-rouge">Aggregate</code> on empty 
to empty if its <code class="highlighter-rouge">GROUP BY</code> key is 
empty</li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-4">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-5">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1147";>CALCITE-1147</a>]
@@ -919,7 +1167,7 @@ Upgrade Jackson</li>
 Clean up maven POM files</li>
 </ul>
 
-<h4 id="web-site-and-documentation-4">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-5">Web site and documentation</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1112";>CALCITE-1112</a>]
@@ -1080,7 +1328,7 @@ Composite <code class="highlighter-rouge
 Add description to <code 
class="highlighter-rouge">SortProjectTransposeRule</code>’s constructor</li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-5">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-6">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-1060";>CALCITE-1060</a>]
@@ -1162,7 +1410,7 @@ Exception while validating <code class="
 Rename <code class="highlighter-rouge">timezone</code> connection property to 
<code class="highlighter-rouge">timeZone</code></li>
 </ul>
 
-<h4 id="web-site-and-documentation-5">Web site and documentation</h4>
+<h4 id="web-site-and-documentation-6">Web site and documentation</h4>
 
 <ul>
   <li>Avatica
@@ -1381,7 +1629,7 @@ Add API to execute queries expressed as
   <li>In RelBuilder, build expressions by table alias</li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-6">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-7">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-948";>CALCITE-948</a>]
@@ -1505,7 +1753,7 @@ exclusions otherwise</li>
     Web site</li>
 </ul>
 
-<h4 id="bug-fixes-api-changes-and-minor-enhancements-7">Bug-fixes, API changes 
and minor enhancements</h4>
+<h4 id="bug-fixes-api-changes-and-minor-enhancements-8">Bug-fixes, API changes 
and minor enhancements</h4>
 
 <ul>
   <li>[<a 
href="https://issues.apache.org/jira/browse/CALCITE-741";>CALCITE-741</a>]

Modified: calcite/site/docs/howto.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/howto.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/howto.html (original)
+++ calcite/site/docs/howto.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 
@@ -149,14 +149,14 @@ adapters.</p>
 <h2 id="building-from-a-source-distribution">Building from a source 
distribution</h2>
 
 <p>Prerequisites are maven (3.2.1 or later)
-and Java (JDK 1.7, 1.8 or 1.9) on your path.</p>
+and Java (JDK 7, 8 or 9) on your path.</p>
 
 <p>Unpack the source distribution <code 
class="highlighter-rouge">.tar.gz</code> or <code 
class="highlighter-rouge">.zip</code> file,
 <code class="highlighter-rouge">cd</code> to the root directory of the 
unpacked source,
 then build using maven:</p>
 
-<figure class="highlight"><pre><code class="language-bash" 
data-lang="bash"><span class="gp">$ </span>tar xvfz calcite-1.11.0-source.tar.gz
-<span class="gp">$ </span><span class="nb">cd </span>calcite-1.11.0
+<figure class="highlight"><pre><code class="language-bash" 
data-lang="bash"><span class="gp">$ </span>tar xvfz calcite-1.12.0-source.tar.gz
+<span class="gp">$ </span><span class="nb">cd </span>calcite-1.12.0
 <span class="gp">$ </span>mvn install</code></pre></figure>
 
 <p><a href="#running-tests">Running tests</a> describes how to run more or 
fewer
@@ -165,7 +165,7 @@ tests.</p>
 <h2 id="building-from-git">Building from git</h2>
 
 <p>Prerequisites are git, maven (3.2.1 or later)
-and Java (JDK 1.7 or later, 1.8 preferred) on your path.</p>
+and Java (JDK 7 or later, 8 preferred) on your path.</p>
 
 <p>Create a local copy of the github repository,
 <code class="highlighter-rouge">cd</code> to its root directory,
@@ -505,7 +505,7 @@ the <code class="highlighter-rouge">KEYS
 
 <ul>
   <li>Set up signing keys as described above.</li>
-  <li>Make sure you are using JDK 1.7 (not 1.8).</li>
+  <li>Make sure you are using JDK 8 (not 7 or 9).</li>
   <li>Make sure build and tests succeed with <code 
class="highlighter-rouge">-Dcalcite.test.db=hsqldb</code> (the default)</li>
 </ul>
 
@@ -526,7 +526,7 @@ mvn -Papache-release -Dgpg.passphrase<sp
 
 <ul>
   <li>Set up signing keys as described above.</li>
-  <li>Make sure you are using JDK 1.7 (not 1.8).</li>
+  <li>Make sure you are using JDK 8 (not 7 or 9).</li>
   <li>Check that <code class="highlighter-rouge">README</code> and <code 
class="highlighter-rouge">site/_docs/howto.md</code> have the correct version 
number.</li>
   <li>Check that <code class="highlighter-rouge">NOTICE</code> has the current 
copyright year.</li>
   <li>Set <code class="highlighter-rouge">version.major</code> and <code 
class="highlighter-rouge">version.minor</code> in <code 
class="highlighter-rouge">pom.xml</code>.</li>

Modified: calcite/site/docs/index.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/index.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/index.html (original)
+++ calcite/site/docs/index.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 

Modified: calcite/site/docs/lattice.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/lattice.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/lattice.html (original)
+++ calcite/site/docs/lattice.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 

Added: calcite/site/docs/materialized_views.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/materialized_views.html?rev=1788532&view=auto
==============================================================================
--- calcite/site/docs/materialized_views.html (added)
+++ calcite/site/docs/materialized_views.html Fri Mar 24 19:09:25 2017
@@ -0,0 +1,497 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+  <meta charset="UTF-8">
+  <title>Materialized Views</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <meta name="generator" content="Jekyll v3.0.3">
+  <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>
+
+
+<body class="wrap">
+  <header role="banner">
+  <nav class="mobile-nav show-on-mobiles">
+    <ul>
+  <li class="">
+    <a href="/">Home</a>
+  </li>
+  <li class="">
+    <a href="/downloads/">Download</a>
+  </li>
+  <li class="">
+    <a href="/community/">Community</a>
+  </li>
+  <li class="">
+    <a href="/develop/">Develop</a>
+  </li>
+  <li class="">
+    <a href="/news/">News</a>
+  </li>
+  <li class="current">
+    <a href="/docs/">Docs</a>
+  </li>
+</ul>
+
+  </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">
+      <ul>
+  <li class="">
+    <a href="/">Home</a>
+  </li>
+  <li class="">
+    <a href="/downloads/">Download</a>
+  </li>
+  <li class="">
+    <a href="/community/">Community</a>
+  </li>
+  <li class="">
+    <a href="/develop/">Develop</a>
+  </li>
+  <li class="">
+    <a href="/news/">News</a>
+  </li>
+  <li class="current">
+    <a href="/docs/">Docs</a>
+  </li>
+</ul>
+
+    </nav>
+  </div>
+</header>
+
+
+    <section class="docs">
+    <div class="grid">
+
+      <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>
+        <optgroup label="Overview">      
+    </optgroup>
+    <optgroup label="Advanced">      
+    </optgroup>
+    <optgroup label="Avatica">      
+    </optgroup>
+    <optgroup label="Reference">      
+    </optgroup>
+    <optgroup label="Meta">      
+    </optgroup>
+
+  </select>
+</div>
+
+
+      <div class="unit four-fifths">
+        <article>
+          <h1>Materialized Views</h1>
+          <!--
+
+-->
+
+<p>There are several different ways to exploit materialized views in 
Calcite.</p>
+
+<ul id="markdown-toc">
+  <li><a href="#materialized-views-maintained-by-calcite" 
id="markdown-toc-materialized-views-maintained-by-calcite">Materialized views 
maintained by Calcite</a></li>
+  <li><a href="#expose-materialized-views-from-adapters" 
id="markdown-toc-expose-materialized-views-from-adapters">Expose materialized 
views from adapters</a></li>
+  <li><a href="#view-based-query-rewriting" 
id="markdown-toc-view-based-query-rewriting">View-based query rewriting</a></li>
+</ul>
+
+<h2 id="materialized-views-maintained-by-calcite">Materialized views 
maintained by Calcite</h2>
+
+<p>For details, see the <a href="/docs/lattice.html">lattices 
documentation</a>.</p>
+
+<h2 id="expose-materialized-views-from-adapters">Expose materialized views 
from adapters</h2>
+
+<p>Some adapters have their own notion of materialized views.
+For example, Apache Cassandra allows the user to define materialized views 
based on existing tables which are automatically maintained.
+The Cassandra adapter automatically exposes these materialized views to 
Calcite.
+By understanding some tables as materialized views, Calcite has the 
opportunity to automatically rewrite queries to use these views.</p>
+
+<h2 id="view-based-query-rewriting">View-based query rewriting</h2>
+
+<p>View-based query rewriting aims to take an input query which can be 
answered using a preexisting view and rewrite the query to make use of the view.
+Calcite employs two forms of view-based query rewriting.
+The first is based on view substitution before the planning phase based on an 
extension of a {SubstitutionVisitor}.
+{MaterializedViewSubstitutionVisitor} aims to substitute part of the 
relational algebra tree with an equivalent expression which makes use of a 
materialized view.</p>
+
+<p>The following example is taken from the documentation of 
{SubstitutionVisitor}:</p>
+
+<ul>
+  <li>Query: <code class="highlighter-rouge">SELECT a, c FROM t WHERE x = 5 
AND b = 4</code></li>
+  <li>Target (materialized view definition): <code 
class="highlighter-rouge">SELECT a, b, c FROM t WHERE x = 5</code></li>
+  <li>Replacement: <code class="highlighter-rouge">SELECT * FROM mv</code></li>
+  <li>Result: <code class="highlighter-rouge">SELECT a, c FROM mv WHERE b = 
4</code></li>
+</ul>
+
+<p>Note that {result} uses the materialized view table {mv} and a simplified 
condition {b = 4}.
+This can accomplish a large number of rewritings, but only those based on star 
schemas.
+This type of rewriting cannot be used for more complex views.
+{MaterializedViewJoinRule} attempts to match queries to views defined using 
arbitrary queries.
+The logic of the rule is based on <a 
href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.113";>this 
paper</a>.</p>
+
+<p>There are several limitations to the current implementation:</p>
+
+<ul>
+  <li>The query defining the view must use only inner joins</li>
+  <li>Only equality predicates are supported</li>
+  <li>Predicates on tables used in the view must exactly match predicates in 
the query</li>
+  <li>Rewriting is unoptimized and will attempt to match all views against 
each query</li>
+</ul>
+
+<p>These limitations are not fundamental the approach however and will 
hopefully be removed in the future.
+Note that the rule is currently disabled by default.
+To make use of the rule, {MaterializedViewJoinRule.INSTANCE_PROJECT} and 
{MaterializedViewJoinRule.INSTANCE_TABLE_SCAN} need to be added to the 
planner.</p>
+
+          
+
+
+
+
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+
+        </article>
+      </div>
+
+      <div class="unit one-fifth hide-on-mobiles">
+  <aside>
+    
+    <h4>Overview</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/index.html">Background</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/tutorial.html">Tutorial</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/algebra.html">Algebra</a></li>
+
+
+</ul>
+
+    
+    <h4>Advanced</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/adapter.html">Adapters</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/stream.html">Streaming</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/lattice.html">Lattices</a></li>
+
+
+</ul>
+
+    
+    <h4>Avatica</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_overview.html">Overview</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_roadmap.html">Roadmap</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_json_reference.html">JSON 
Reference</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_protobuf_reference.html">Protobuf 
Reference</a></li>
+
+
+</ul>
+
+    
+    <h4>Reference</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/model.html">JSON models</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/howto.html">HOWTO</a></li>
+
+
+</ul>
+
+    
+    <h4>Meta</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/history.html">History</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/powered_by.html">Powered by Calcite</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/apidocs">API</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/testapidocs">Test API</a></li>
+
+
+</ul>
+
+    
+  </aside>
+</div>
+
+
+      <div class="clear"></div>
+
+    </div>
+  </section>
+
+
+  <footer role="contentinfo">
+  <div id="poweredby">
+    <a href="http://www.apache.org/";>
+      <span class="sr-only">Apache</span>
+      <img src="/img/feather.png" width="190" height="77" alt="Apache 
Logo"></a>
+  </div>
+  <div id="copyright">
+  <p>The contents of this website are &copy;&nbsp;2017
+     <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>
+  </div>
+</footer>
+
+  <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>
+
+
+</body>
+</html>

Modified: calcite/site/docs/model.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/model.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/model.html (original)
+++ calcite/site/docs/model.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 

Modified: calcite/site/docs/pig_adapter.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/pig_adapter.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/pig_adapter.html (original)
+++ calcite/site/docs/pig_adapter.html Fri Mar 24 19:09:25 2017
@@ -82,858 +82,17 @@
       <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>
-    
-    <optgroup label="Overview">
-      
-
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-
+        <optgroup label="Overview">      
     </optgroup>
-    
-    <optgroup label="Advanced">
-      
-
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-
+    <optgroup label="Advanced">      
     </optgroup>
-    
-    <optgroup label="Avatica">
-      
-
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-
+    <optgroup label="Avatica">      
     </optgroup>
-    
-    <optgroup label="Reference">
-      
-
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-
+    <optgroup label="Reference">      
     </optgroup>
-    
-    <optgroup label="Meta">
-      
-
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-  
-
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-    
-  
-
-
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 

Modified: calcite/site/docs/powered_by.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/powered_by.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/powered_by.html (original)
+++ calcite/site/docs/powered_by.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 

Modified: calcite/site/docs/reference.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/reference.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/reference.html (original)
+++ calcite/site/docs/reference.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 
@@ -220,6 +220,7 @@ form.</p>
 
 <span class="n">tableReference</span><span class="p">:</span>
       <span class="n">tablePrimary</span>
+      <span class="p">[</span> <span class="n">matchRecognize</span> <span 
class="p">]</span>
       <span class="p">[</span> <span class="p">[</span> <span 
class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span 
class="p">[</span> <span class="s1">'('</span> <span 
class="n">columnAlias</span> <span class="p">[,</span> <span 
class="n">columnAlias</span> <span class="p">]</span><span class="o">*</span> 
<span class="s1">')'</span> <span class="p">]</span> <span class="p">]</span>
 
 <span class="n">tablePrimary</span><span class="p">:</span>
@@ -438,6 +439,7 @@ DECADE,
 DEFAULTS,
 DEFERRABLE,
 DEFERRED,
+<strong>DEFINE</strong>,
 DEFINED,
 DEFINER,
 DEGREE,
@@ -574,6 +576,7 @@ M,
 MAP,
 <strong>MATCH</strong>,
 MATCHED,
+<strong>MATCH_RECOGNIZE</strong>,
 <strong>MAX</strong>,
 MAXVALUE,
 <strong>MEMBER</strong>,
@@ -651,9 +654,11 @@ PARTIAL,
 PASCAL,
 PASSTHROUGH,
 PATH,
+<strong>PATTERN</strong>,
 <strong>PERCENTILE_CONT</strong>,
 <strong>PERCENTILE_DISC</strong>,
 <strong>PERCENT_RANK</strong>,
+<strong>PERMUTE</strong>,
 PLACING,
 PLAN,
 PLI,
@@ -663,6 +668,7 @@ PRECEDING,
 <strong>PRECISION</strong>,
 <strong>PREPARE</strong>,
 PRESERVE,
+<strong>PREV</strong>,
 <strong>PRIMARY</strong>,
 PRIOR,
 PRIVILEGES,
@@ -714,6 +720,7 @@ ROUTINE_SCHEMA,
 <strong>ROWS</strong>,
 ROW_COUNT,
 <strong>ROW_NUMBER</strong>,
+<strong>RUNNING</strong>,
 <strong>SAVEPOINT</strong>,
 SCALE,
 SCHEMA,
@@ -1217,11 +1224,11 @@ the user or application to supply a time
       <td style="text-align: left">Whether <em>string1</em> does not match 
regular expression <em>string2</em></td>
     </tr>
     <tr>
-      <td style="text-align: left">value IN (value [, value]* )</td>
+      <td style="text-align: left">value IN (value [, value]*)</td>
       <td style="text-align: left">Whether <em>value</em> is equal to a value 
in a list</td>
     </tr>
     <tr>
-      <td style="text-align: left">value NOT IN (value [, value]* )</td>
+      <td style="text-align: left">value NOT IN (value [, value]*)</td>
       <td style="text-align: left">Whether <em>value</em> is not equal to 
every value in a list</td>
     </tr>
     <tr>
@@ -1699,7 +1706,7 @@ the user or application to supply a time
       <td style="text-align: left">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.</td>
     </tr>
     <tr>
-      <td style="text-align: left">COALESCE(value, value [, value ]* )</td>
+      <td style="text-align: left">COALESCE(value, value [, value ]*)</td>
       <td style="text-align: left">Provides a value if the first value is 
null.<br /><br />For example, <code>COALESCE(NULL, 5)</code> returns 5.</td>
     </tr>
   </tbody>
@@ -1733,11 +1740,11 @@ the user or application to supply a time
   </thead>
   <tbody>
     <tr>
-      <td style="text-align: left">ROW (value [, value]* )</td>
+      <td style="text-align: left">ROW (value [, value ]*)</td>
       <td style="text-align: left">Creates a row from a list of values.</td>
     </tr>
     <tr>
-      <td style="text-align: left">(value [, value]* )</td>
+      <td style="text-align: left">(value [, value ]* )</td>
       <td style="text-align: left">Creates a row from a list of values.</td>
     </tr>
     <tr>
@@ -2086,8 +2093,8 @@ the user or application to supply a time
 <p>Syntax:</p>
 
 <figure class="highlight"><pre><code class="language-sql" 
data-lang="sql"><span class="n">aggregateCall</span><span class="p">:</span>
-        <span class="n">agg</span><span class="p">(</span> <span 
class="p">[</span> <span class="k">DISTINCT</span> <span class="p">]</span> 
<span class="n">value</span> <span class="p">[,</span> <span 
class="n">value</span><span class="p">]</span><span class="o">*</span> <span 
class="p">)</span> <span class="p">[</span> <span class="n">FILTER</span> <span 
class="p">(</span> <span class="k">WHERE</span> <span 
class="n">condition</span> <span class="p">)</span> <span class="p">]</span>
-    <span class="o">|</span>   <span class="n">agg</span><span 
class="p">(</span><span class="o">*</span><span class="p">)</span> <span 
class="p">[</span> <span class="n">FILTER</span> <span class="p">(</span> <span 
class="k">WHERE</span> <span class="n">condition</span> <span 
class="p">)</span> <span class="p">]</span></code></pre></figure>
+        <span class="n">agg</span><span class="p">(</span> <span 
class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span 
class="k">DISTINCT</span> <span class="p">]</span> <span class="n">value</span> 
<span class="p">[,</span> <span class="n">value</span> <span 
class="p">]</span><span class="o">*</span><span class="p">)</span> <span 
class="p">[</span> <span class="n">FILTER</span> <span class="p">(</span><span 
class="k">WHERE</span> <span class="n">condition</span><span class="p">)</span> 
<span class="p">]</span>
+    <span class="o">|</span>   <span class="n">agg</span><span 
class="p">(</span><span class="o">*</span><span class="p">)</span> <span 
class="p">[</span> <span class="n">FILTER</span> <span class="p">(</span><span 
class="k">WHERE</span> <span class="n">condition</span><span class="p">)</span> 
<span class="p">]</span></code></pre></figure>
 
 <p>If <code class="highlighter-rouge">FILTER</code> is present, the aggregate 
function only considers rows for which
 <em>condition</em> evaluates to TRUE.</p>
@@ -2104,11 +2111,11 @@ passed to the aggregate function.</p>
   </thead>
   <tbody>
     <tr>
-      <td style="text-align: left">COLLECT( [ DISTINCT ] value)</td>
+      <td style="text-align: left">COLLECT( [ ALL | DISTINCT ] value)</td>
       <td style="text-align: left">Returns a multiset of the values</td>
     </tr>
     <tr>
-      <td style="text-align: left">COUNT( [ DISTINCT ] value [, value]* )</td>
+      <td style="text-align: left">COUNT( [ ALL | DISTINCT ] value [, value 
]*)</td>
       <td style="text-align: left">Returns the number of input rows for which 
<em>value</em> is not null (wholly not null if <em>value</em> is composite)</td>
     </tr>
     <tr>
@@ -2116,35 +2123,35 @@ passed to the aggregate function.</p>
       <td style="text-align: left">Returns the number of input rows</td>
     </tr>
     <tr>
-      <td style="text-align: left">AVG( [ DISTINCT ] numeric)</td>
+      <td style="text-align: left">AVG( [ ALL | DISTINCT ] numeric)</td>
       <td style="text-align: left">Returns the average (arithmetic mean) of 
<em>numeric</em> across all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">SUM( [ DISTINCT ] numeric)</td>
+      <td style="text-align: left">SUM( [ ALL | DISTINCT ] numeric)</td>
       <td style="text-align: left">Returns the sum of <em>numeric</em> across 
all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">MAX( [ DISTINCT ] value)</td>
+      <td style="text-align: left">MAX( [ ALL | DISTINCT ] value)</td>
       <td style="text-align: left">Returns the maximum value of <em>value</em> 
across all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">MIN( [ DISTINCT ] value)</td>
+      <td style="text-align: left">MIN( [ ALL | DISTINCT ] value)</td>
       <td style="text-align: left">Returns the minimum value of <em>value</em> 
across all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">STDDEV_POP( [ DISTINCT ] numeric)</td>
+      <td style="text-align: left">STDDEV_POP( [ ALL | DISTINCT ] numeric)</td>
       <td style="text-align: left">Returns the population standard deviation 
of <em>numeric</em> across all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">STDDEV_SAMP( [ DISTINCT ] numeric)</td>
+      <td style="text-align: left">STDDEV_SAMP( [ ALL | DISTINCT ] 
numeric)</td>
       <td style="text-align: left">Returns the sample standard deviation of 
<em>numeric</em> across all input values</td>
     </tr>
     <tr>
-      <td style="text-align: left">VAR_POP( [ DISTINCT ] value)</td>
+      <td style="text-align: left">VAR_POP( [ ALL | DISTINCT ] value)</td>
       <td style="text-align: left">Returns the population variance (square of 
the population standard deviation) of <em>numeric</em> across all input 
values</td>
     </tr>
     <tr>
-      <td style="text-align: left">VAR_SAMP( [ DISTINCT ] numeric)</td>
+      <td style="text-align: left">VAR_SAMP( [ ALL | DISTINCT ] numeric)</td>
       <td style="text-align: left">Returns the sample variance (square of the 
sample standard deviation) of <em>numeric</em> across all input values</td>
     </tr>
     <tr>
@@ -2189,7 +2196,7 @@ passed to the aggregate function.</p>
   </thead>
   <tbody>
     <tr>
-      <td style="text-align: left">COUNT(value [, value ]* ) OVER window</td>
+      <td style="text-align: left">COUNT(value [, value ]*) OVER window</td>
       <td style="text-align: left">Returns the number of rows in 
<em>window</em> for which <em>value</em> is not null (wholly not null if 
<em>value</em> is composite)</td>
     </tr>
     <tr>
@@ -2269,7 +2276,7 @@ passed to the aggregate function.</p>
   </thead>
   <tbody>
     <tr>
-      <td style="text-align: left">GROUPING(expression [, expression ] * )</td>
+      <td style="text-align: left">GROUPING(expression [, expression ]*)</td>
       <td style="text-align: left">Returns a bit vector of the given grouping 
expressions</td>
     </tr>
     <tr>
@@ -2277,7 +2284,7 @@ passed to the aggregate function.</p>
       <td style="text-align: left">Returns an integer that uniquely identifies 
the combination of grouping keys</td>
     </tr>
     <tr>
-      <td style="text-align: left">GROUPING_ID(expression [, expression ] * 
)</td>
+      <td style="text-align: left">GROUPING_ID(expression [, expression 
]*)</td>
       <td style="text-align: left">Synonym for <code 
class="highlighter-rouge">GROUPING</code></td>
     </tr>
   </tbody>
@@ -2482,9 +2489,80 @@ Here are some examples:</p>
 <ul>
   <li><code class="highlighter-rouge">f(c =&gt; 3, d =&gt; 1, a =&gt; 
0)</code> is equivalent to <code class="highlighter-rouge">f(0, NULL, 3, 1, 
NULL)</code>;</li>
   <li><code class="highlighter-rouge">f(c =&gt; 3, d =&gt; 1)</code> is not 
legal, because you have not specified a value for
-<code class="highlighter-rouge">a</code> and <code 
class="highlighter-rouge">a</code> is not optional.</li>
+<code class="highlighter-rouge">a</code> and <code 
class="highlighter-rouge">a</code> is not optional.
+```</li>
 </ul>
 
+<h3 id="matchrecognize">MATCH_RECOGNIZE</h3>
+
+<p><code class="highlighter-rouge">MATCH_RECOGNIZE</code> is a SQL extension 
for recognizing sequences of
+events in complex event processing (CEP).</p>
+
+<p>It is experimental in Calcite, and yet not fully implemented.</p>
+
+<h4 id="syntax">Syntax</h4>
+
+<figure class="highlight"><pre><code class="language-sql" 
data-lang="sql"><span class="n">matchRecognize</span><span class="p">:</span>
+      <span class="n">MATCH_RECOGNIZE</span> <span class="s1">'('</span>
+      <span class="p">[</span> <span class="n">PARTITION</span> <span 
class="k">BY</span> <span class="n">expression</span> <span class="p">[,</span> 
<span class="n">expression</span> <span class="p">]</span><span 
class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">ORDER</span> <span 
class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> 
<span class="n">orderItem</span> <span class="p">]</span><span 
class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">MEASURES</span> <span 
class="n">measureColumn</span> <span class="p">[,</span> <span 
class="n">measureColumn</span> <span class="p">]</span><span class="o">*</span> 
<span class="p">]</span>
+      <span class="p">[</span> <span class="k">ON</span> <span 
class="k">ROW</span> <span class="n">PER</span> <span class="k">MATCH</span> 
<span class="o">|</span> <span class="k">ALL</span> <span class="k">ROWS</span> 
<span class="n">PER</span> <span class="k">MATCH</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">AFTER</span> <span 
class="k">MATCH</span>
+            <span class="p">(</span> <span class="n">SKIP</span> <span 
class="k">TO</span> <span class="k">NEXT</span> <span class="k">ROW</span>
+            <span class="o">|</span> <span class="n">SKIP</span> <span 
class="n">PAST</span> <span class="k">LAST</span> <span class="k">ROW</span>
+            <span class="o">|</span> <span class="n">SKIP</span> <span 
class="k">TO</span> <span class="k">FIRST</span> <span class="k">variable</span>
+            <span class="o">|</span> <span class="n">SKIP</span> <span 
class="k">TO</span> <span class="k">LAST</span> <span class="k">variable</span>
+            <span class="o">|</span> <span class="n">SKIP</span> <span 
class="k">TO</span> <span class="k">variable</span> <span class="p">)</span>
+      <span class="p">]</span>
+      <span class="n">PATTERN</span> <span class="s1">'('</span> <span 
class="n">pattern</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="n">SUBSET</span> <span 
class="k">variable</span> <span class="p">[,</span> <span 
class="k">variable</span> <span class="p">]</span><span class="o">*</span> 
<span class="p">]</span>
+      <span class="n">DEFINE</span> <span class="k">variable</span> <span 
class="k">AS</span> <span class="n">condition</span> <span class="p">[,</span> 
<span class="k">variable</span> <span class="k">AS</span> <span 
class="n">condition</span> <span class="p">]</span><span class="o">*</span>
+      <span class="s1">')'</span>
+
+<span class="n">measureColumn</span><span class="p">:</span>
+      <span class="n">expression</span> <span class="k">AS</span> <span 
class="k">alias</span>
+
+<span class="n">pattern</span><span class="p">:</span>
+      <span class="n">patternTerm</span> <span class="p">[</span><span 
class="s1">'|'</span> <span class="n">patternTerm</span> <span 
class="p">]</span><span class="o">*</span>
+
+<span class="n">patternTerm</span><span class="p">:</span>
+      <span class="n">patternFactor</span> <span class="p">[</span> <span 
class="n">patternFactor</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">patternFactor</span><span class="p">:</span>
+      <span class="n">patternPrimary</span> <span class="p">[</span> <span 
class="n">patternQuantifier</span> <span class="p">]</span>
+
+<span class="n">patternPrimary</span><span class="p">:</span>
+      <span class="k">variable</span>
+  <span class="o">|</span>   <span class="s1">'$'</span>
+  <span class="o">|</span>   <span class="s1">'^'</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span 
class="p">[</span> <span class="n">pattern</span> <span class="p">]</span> 
<span class="s1">')'</span>
+  <span class="o">|</span>   <span class="s1">'{-'</span> <span 
class="n">pattern</span> <span class="s1">'-}'</span>
+  <span class="o">|</span>   <span class="n">PERMUTE</span> <span 
class="s1">'('</span> <span class="n">pattern</span> <span class="p">[,</span> 
<span class="n">pattern</span> <span class="p">]</span><span class="o">*</span> 
<span class="s1">')'</span>
+
+<span class="n">patternQuantifier</span><span class="p">:</span>
+      <span class="s1">'*'</span>
+  <span class="o">|</span>   <span class="s1">'*?'</span>
+  <span class="o">|</span>   <span class="s1">'+'</span>
+  <span class="o">|</span>   <span class="s1">'+?'</span>
+  <span class="o">|</span>   <span class="s1">'?'</span>
+  <span class="o">|</span>   <span class="s1">'??'</span>
+  <span class="o">|</span>   <span class="s1">'{'</span> <span 
class="err">{</span> <span class="p">[</span> <span class="n">minRepeat</span> 
<span class="p">],</span> <span class="p">[</span> <span 
class="n">maxRepeat</span> <span class="p">]</span> <span class="err">}</span> 
<span class="s1">'}'</span> <span class="p">[</span><span 
class="s1">'?'</span><span class="p">]</span>
+  <span class="o">|</span>   <span class="s1">'{'</span> <span 
class="n">repeat</span> <span class="s1">'}'</span></code></pre></figure>
+
+<p>In <em>patternQuantifier</em>, <em>repeat</em> is a positive integer,
+and <em>minRepeat</em> and <em>maxRepeat</em> are non-negative integers.</p>
+
+<p>The following clauses are not implemented:</p>
+
+<ul>
+  <li><code class="highlighter-rouge">PARTITION BY</code></li>
+  <li><code class="highlighter-rouge">ORDER BY</code></li>
+  <li><code class="highlighter-rouge">MEASURES</code></li>
+  <li><code class="highlighter-rouge">ON ROW PER MATCH</code>, <code 
class="highlighter-rouge">ALL ROWS PER MATCH</code></li>
+  <li><code class="highlighter-rouge">AFTER MATCH</code></li>
+  <li><code class="highlighter-rouge">SUBSET</code></li>
+</ul>
 
           
 

Modified: calcite/site/docs/stream.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/stream.html?rev=1788532&r1=1788531&r2=1788532&view=diff
==============================================================================
--- calcite/site/docs/stream.html (original)
+++ calcite/site/docs/stream.html Fri Mar 24 19:09:25 2017
@@ -82,17 +82,17 @@
       <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>
-        <optgroup label="Overview">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+        <optgroup label="Overview">      
     </optgroup>
-        <optgroup label="Advanced">                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                
+    <optgroup label="Advanced">      
     </optgroup>
-        <optgroup label="Avatica">                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 
+    <optgroup label="Avatica">      
     </optgroup>
-        <optgroup label="Reference">                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+    <optgroup label="Reference">      
     </optgroup>
-        <optgroup label="Meta">                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                              
+    <optgroup label="Meta">      
     </optgroup>
-    
+
   </select>
 </div>
 


Reply via email to