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 2017/01/03 09:33:28 UTC

[1/4] calcite git commit: [CALCITE-1560] Remove "avatica" directory from sqlline's class path [Forced Update!]

Repository: calcite
Updated Branches:
  refs/heads/branch-1.11 0c14af450 -> 934271f21 (forced update)


[CALCITE-1560] Remove "avatica" directory from sqlline's class path


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

Branch: refs/heads/branch-1.11
Commit: d4557f1d775ceb2fa2e3aba9bce3ba880d293d93
Parents: d0fa47b
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Jan 2 23:27:40 2017 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Jan 3 01:32:57 2017 -0800

----------------------------------------------------------------------
 sqlline     | 2 +-
 sqlline.bat | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/d4557f1d/sqlline
----------------------------------------------------------------------
diff --git a/sqlline b/sqlline
index 9e111a2..b973c6b 100755
--- a/sqlline
+++ b/sqlline
@@ -37,7 +37,7 @@ if [ ! -f target/fullclasspath.txt ]; then
 fi
 
 CP=
-for module in core avatica cassandra druid elasticsearch mongodb spark splunk example/csv example/function; do
+for module in core cassandra druid elasticsearch mongodb spark splunk example/csv example/function; do
   CP=${CP}${module}/target/classes:
   CP=${CP}${module}/target/test-classes:
 done

http://git-wip-us.apache.org/repos/asf/calcite/blob/d4557f1d/sqlline.bat
----------------------------------------------------------------------
diff --git a/sqlline.bat b/sqlline.bat
index 50e9701..482a78b 100644
--- a/sqlline.bat
+++ b/sqlline.bat
@@ -23,6 +23,6 @@
 :: Copy dependency jars on first call. (To force jar refresh, remove target\dependencies)
 if not exist target\dependencies (call mvn -B dependency:copy-dependencies -DoverWriteReleases=false -DoverWriteSnapshots=false -DoverWriteIfNewer=true -DoutputDirectory=target\dependencies)
 
-java -Xmx1G -cp ".\target\dependencies\*;core\target\dependencies\*;avatica\target\dependencies\*;cassandra\target\dependencies\*;elasticsearch\target\dependencies\*;mongodb\target\dependencies\*;spark\target\dependencies\*;splunk\target\dependencies\*" sqlline.SqlLine --verbose=true %*
+java -Xmx1G -cp ".\target\dependencies\*;core\target\dependencies\*;cassandra\target\dependencies\*;elasticsearch\target\dependencies\*;mongodb\target\dependencies\*;spark\target\dependencies\*;splunk\target\dependencies\*" sqlline.SqlLine --verbose=true %*
 
 :: End sqlline.bat


[2/4] calcite git commit: Remove non-ASCII characters from Java source files

Posted by jh...@apache.org.
Remove non-ASCII characters from Java source files


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

Branch: refs/heads/branch-1.11
Commit: d0fa47b3a5fb12d5342bc30bd0da95a65eca1407
Parents: 31d68f7
Author: Julian Hyde <jh...@apache.org>
Authored: Fri Dec 30 16:11:55 2016 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Jan 3 01:32:57 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/calcite/avatica/SqlState.java |  6 +++---
 .../org/apache/calcite/avatica/RemoteDriverTest.java   |  3 ++-
 .../java/org/apache/calcite/model/JsonJdbcSchema.java  |  4 ++--
 .../main/java/org/apache/calcite/model/JsonSchema.java |  4 ++--
 .../org/apache/calcite/test/PigRelBuilderTest.java     |  2 +-
 .../org/apache/calcite/test/SqlToRelConverterTest.java | 13 +++++++------
 6 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/avatica/core/src/main/java/org/apache/calcite/avatica/SqlState.java
----------------------------------------------------------------------
diff --git a/avatica/core/src/main/java/org/apache/calcite/avatica/SqlState.java b/avatica/core/src/main/java/org/apache/calcite/avatica/SqlState.java
index 01c714f..1459757 100644
--- a/avatica/core/src/main/java/org/apache/calcite/avatica/SqlState.java
+++ b/avatica/core/src/main/java/org/apache/calcite/avatica/SqlState.java
@@ -24,11 +24,11 @@ import java.util.Map;
 /**
  * SQL error codes.
  *
- * <p>Based upon Table 33 \u2014 SQLSTATE class and subclass values in SQL:2014 section 24.1, which is
- * as follows.
+ * <p>Based upon Table 33 &mdash; SQLSTATE class and subclass values in
+ * SQL:2014 section 24.1, which is as follows.
  *
  * <table border=1>
- * <caption>Table 33 \u2014 SQLSTATE class and subclass values</caption>
+ * <caption>Table 33 &mdash; SQLSTATE class and subclass values</caption>
  * <tr>
  *   <th>Category</th>
  *   <th>Condition</th>

http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/avatica/server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java
----------------------------------------------------------------------
diff --git a/avatica/server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java b/avatica/server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java
index 4f6a984..10bf85f 100644
--- a/avatica/server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java
+++ b/avatica/server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java
@@ -1458,7 +1458,8 @@ public class RemoteDriverTest {
 
   @Test public void testUnicodeColumnNames() throws Exception {
     final String tableName = "unicodeColumn";
-    final String columnName = "\u041d\u043e\u043c\u0435\u0440\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0430"; // PhoneNumber in Russian
+    final String columnName = "\u041d\u043e\u043c\u0435\u0440\u0422\u0435\u043b"
+        + "\u0435\u0444\u043e\u043d\u0430"; // PhoneNumber in Russian
     ConnectionSpec.getDatabaseLock().lock();
     try (Connection conn = getLocalConnection();
         Statement stmt = conn.createStatement()) {

http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/core/src/main/java/org/apache/calcite/model/JsonJdbcSchema.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/model/JsonJdbcSchema.java b/core/src/main/java/org/apache/calcite/model/JsonJdbcSchema.java
index 5eb203b..761dab5 100644
--- a/core/src/main/java/org/apache/calcite/model/JsonJdbcSchema.java
+++ b/core/src/main/java/org/apache/calcite/model/JsonJdbcSchema.java
@@ -32,7 +32,7 @@ public class JsonJdbcSchema extends JsonSchema {
    */
   public String jdbcDriver;
 
-  /** JDBC connect string, for example \u201cjdbc:mysql://localhost/foodmart\u201d.
+  /** JDBC connect string, for example "jdbc:mysql://localhost/foodmart".
    *
    * <p>Optional.
    */
@@ -44,7 +44,7 @@ public class JsonJdbcSchema extends JsonSchema {
    */
   public String jdbcUser;
 
-  /** JDBC connect string, for example \u201cjdbc:mysql://localhost/foodmart\u201d.
+  /** JDBC connect string, for example "jdbc:mysql://localhost/foodmart".
    *
    * <p>Optional.
    */

http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/core/src/main/java/org/apache/calcite/model/JsonSchema.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/model/JsonSchema.java b/core/src/main/java/org/apache/calcite/model/JsonSchema.java
index f9517e8..9a643c5 100644
--- a/core/src/main/java/org/apache/calcite/model/JsonSchema.java
+++ b/core/src/main/java/org/apache/calcite/model/JsonSchema.java
@@ -55,8 +55,8 @@ public abstract class JsonSchema {
    *
    * <blockquote><pre>path: [ ['usr', 'lib'], 'lib' ]</pre></blockquote>
    *
-   * <p>declares a path with two elements: the schema \u2018/usr/lib\u2019 and the schema
-   * \u2018/lib\u2019. Most schemas are at the top level, and for these you can use a
+   * <p>declares a path with two elements: the schema '/usr/lib' and the schema
+   * '/lib'. Most schemas are at the top level, and for these you can use a
    * string.
    */
   public List<Object> path;

http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/core/src/test/java/org/apache/calcite/test/PigRelBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/PigRelBuilderTest.java b/core/src/test/java/org/apache/calcite/test/PigRelBuilderTest.java
index 38a3a3a..cc982cb 100644
--- a/core/src/test/java/org/apache/calcite/test/PigRelBuilderTest.java
+++ b/core/src/test/java/org/apache/calcite/test/PigRelBuilderTest.java
@@ -90,7 +90,7 @@ public class PigRelBuilderTest {
   @Test public void testGroup() {
     // Syntax:
     //   alias = GROUP alias { ALL | BY expression}
-    //     [, alias ALL | BY expression \u2026] [USING 'collected' | 'merge']
+    //     [, alias ALL | BY expression ...] [USING 'collected' | 'merge']
     //     [PARTITION BY partitioner] [PARALLEL n];
     // Equivalent to Pig Latin:
     //   r = GROUP e BY (deptno, job);

http://git-wip-us.apache.org/repos/asf/calcite/blob/d0fa47b3/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
index 4c14c1c..238113a 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
@@ -301,14 +301,15 @@ public class SqlToRelConverterTest extends SqlToRelTestBase {
   }
 
   /**
-   * GROUP BY with duplicates
+   * GROUP BY with duplicates.
    *
    * <p>From SQL spec:
-   * <blockquote>NOTE 190 \u2014 That is, a simple <em>group by clause</em> that is
-   * not primitive may be transformed into a primitive <em>group by clause</em>
-   * by deleting all parentheses, and deleting extra commas as necessary for
-   * correct syntax. If there are no grouping columns at all (for example,
-   * GROUP BY (), ()), this is transformed to the canonical form GROUP BY ().
+   * <blockquote>NOTE 190 &mdash; That is, a simple <em>group by clause</em>
+   * that is not primitive may be transformed into a primitive <em>group by
+   * clause</em> by deleting all parentheses, and deleting extra commas as
+   * necessary for correct syntax. If there are no grouping columns at all (for
+   * example, GROUP BY (), ()), this is transformed to the canonical form GROUP
+   * BY ().
    * </blockquote> */
   // Same effect as writing "GROUP BY ()"
   @Test public void testGroupByWithDuplicates() {


[4/4] calcite git commit: [CALCITE-1547] Release Calcite 1.11.0

Posted by jh...@apache.org.
[CALCITE-1547] Release Calcite 1.11.0

Add release notes, change version number, change copyright year.

Re-format older release notes.


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

Branch: refs/heads/branch-1.11
Commit: 934271f21c18da33cb69d7e932a7438a6fa63529
Parents: b036223
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Dec 29 16:02:32 2016 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Jan 3 01:32:58 2017 -0800

----------------------------------------------------------------------
 NOTICE                |   2 +-
 README                |   2 +-
 pom.xml               |   2 +-
 site/_docs/history.md | 364 ++++++++++++++++++++++++++++++++++++---------
 site/_docs/howto.md   |   5 +-
 5 files changed, 297 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/934271f2/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index 0dab09d..589ab43 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Calcite
-Copyright 2012-2016 The Apache Software Foundation
+Copyright 2012-2017 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/calcite/blob/934271f2/README
----------------------------------------------------------------------
diff --git a/README b/README
index 2f834cb..be0c63b 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Apache Calcite release 1.10.0
+Apache Calcite release 1.11.0
 
 This is a source or binary distribution of Apache Calcite.
 

http://git-wip-us.apache.org/repos/asf/calcite/blob/934271f2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b342535..4125221 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@ limitations under the License.
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <top.dir>${project.basedir}</top.dir>
     <version.major>1</version.major>
-    <version.minor>10</version.minor>
+    <version.minor>11</version.minor>
 
     <!-- This list is in alphabetical order. -->
     <airlift-tpch.version>0.1</airlift-tpch.version>

http://git-wip-us.apache.org/repos/asf/calcite/blob/934271f2/site/_docs/history.md
----------------------------------------------------------------------
diff --git a/site/_docs/history.md b/site/_docs/history.md
index 51f11da..7d98226 100644
--- a/site/_docs/history.md
+++ b/site/_docs/history.md
@@ -28,10 +28,228 @@ For a full list of releases, see
 Downloads are available on the
 [downloads page]({{ site.baseurl }}/downloads/).
 
+## <a href="https://github.com/apache/calcite/releases/tag/calcite-1.11.0">1.11.0</a> / 2017-01-11
+{: #v1-11-0}
+
+Nearly three months after the previous release, there is a long list
+of improvements and bug-fixes, many of them making planner rules
+smarter.
+
+Several adapters have improvements:
+
+* The JDBC adapter can now push down DML (`INSERT`, `UPDATE`, `DELETE`),
+  windowed aggregates (`OVER`), `IS NULL` and `IS NOT NULL` operators.
+* The Cassandra adapter now supports authentication.
+* Several key bug-fixes in the Druid adapter.
+
+For correlated and uncorrelated sub-queries, we generate more
+efficient plans (for example, in some correlated queries we no longer
+require a sub-query to generate the values of the correlating
+variable), can now handle multiple correlations, and have also fixed a
+few correctness bugs.
+
+New SQL syntax:
+
+* `CROSS APPLY` and `OUTER APPLY`;
+* `MINUS` as a synonym for `EXCEPT`;
+* an `AS JSON` option for the `EXPLAIN` command;
+* compound identifiers in the target list of `INSERT`, allowing you to
+  insert into individual fields of record-valued columns (or column
+  families if you are using the Apache Phoenix adapter).
+
+A variety of new and extended built-in functions: `CONVERT`, `LTRIM`,
+`RTRIM`, 3-parameter `LOCATE` and `POSITION`, `RAND`, `RAND_INTEGER`,
+and `SUBSTRING` applied to binary types.
+
+There are minor but potentially breaking API changes in
+[<a href="https://issues.apache.org/jira/browse/CALCITE-1519">CALCITE-1519</a>]
+\(interface `SubqueryConverter` becomes `SubQueryConverter` and some
+similar changes in the case of classes and methods\) and
+[<a href="https://issues.apache.org/jira/browse/CALCITE-1530">CALCITE-1530</a>]
+\(rename `Shuttle` to `Visitor`, and create a new class `Visitor<R>`\).
+See the cases for more details.
+
+Compatibility: This release is tested
+on Linux, macOS, Microsoft Windows;
+using Oracle JDK 1.7, 1.8;
+Guava versions 14.0 to 19.0;
+Druid version 0.9.1.1;
+other software versions as specified in `pom.xml`.
+
+#### New features
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1551">CALCITE-1551</a>]
+  Preserve alias in `RelBuilder.project` (Jess Balint)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1552">CALCITE-1552</a>]
+  Add `RAND` function, returning `DOUBLE` values in the range 0..1
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1414">CALCITE-1414</a>]
+  Add `RAND_INTEGER` function, which returns a random integer modulo N (Julian
+  Feinauer)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1540">CALCITE-1540</a>]
+  Support multiple columns in `PARTITION BY` clause of window function
+  (Hongbin Ma)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1534">CALCITE-1534</a>]
+  Allow compound identifiers in `INSERT` target column list
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1529">CALCITE-1529</a>]
+  Support `CREATE TABLE` in tests (and only in tests)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1527">CALCITE-1527</a>]
+  Support DML in the JDBC adapter (Christian Tzolov)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1523">CALCITE-1523</a>]
+  In `RelBuilder`, add `field` method to reference input to join by alias (Jess
+  Balint)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1524">CALCITE-1524</a>]
+  Add a project to the planner root so that rules know which output fields are
+  used
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1425">CALCITE-1425</a>]
+  Support two-level column structure in `INSERT`/`UPDATE`/`MERGE`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1472">CALCITE-1472</a>]
+  Support `CROSS`/`OUTER APPLY` syntax (Jark Wu)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1506">CALCITE-1506</a>]
+  Push `OVER` clause to underlying SQL via JDBC adapter (Christian Tzolov)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1509">CALCITE-1509</a>]
+  Allow overriding the convertlet table in CalcitePrepareImpl (Gian Merlino)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1483">CALCITE-1483</a>]
+  Generate simpler logic for `NOT IN` if we can deduce that the key is never null
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1497">CALCITE-1497</a>]
+  Infer `IS NOT NULL`, and project predicates
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1489">CALCITE-1489</a>]
+  Add rule, `AggregateValuesRule`, that applies to an `Aggregate` on an empty
+  relation (Gian Merlino)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1447">CALCITE-1447</a>]
+  Implement `INTERSECT DISTINCT` by rewriting to `UNION ALL` and counting
+  (Pengcheng Xiong)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1389">CALCITE-1389</a>]
+  Add a rewrite rule to use materialized views with joins
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1125">CALCITE-1125</a>]
+  `MINUS` as a synonym for `EXCEPT` (enabled in Oracle10 conformance)
+  (Chandni Singh)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1453">CALCITE-1453</a>]
+  Support `ANY` type with binary comparison and arithmetic operators
+  (Jungtaek Lim)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1444">CALCITE-1444</a>]
+  Add `CONVERT` function (Laurent Goujon)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1448">CALCITE-1448</a>]
+  Add rules to flatten and prune `Intersect` and `Minus`;
+  flatten set-operators if the top is `DISTINCT` and bottom is `ALL`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1426">CALCITE-1426</a>]
+  Support customized star expansion in `Table`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1454">CALCITE-1454</a>]
+  Allow custom implementations of `SqlConformance`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1417">CALCITE-1417</a>]
+  In `RelBuilder`, simplify "CAST(literal TO type)" to a literal when possible
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1443">CALCITE-1443</a>]
+  Add authentication support in Cassandra adapter
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1404">CALCITE-1404</a>]
+  Implement `FILTER` on aggregate functions in `Interpreter`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1418">CALCITE-1418</a>]
+  Implement `SUBSTRING` function for `BINARY` and `VARBINARY` (Jungtaek Lim)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1422">CALCITE-1422</a>]
+  In JDBC adapter, allow `IS NULL` and `IS NOT NULL` operators in generated SQL
+  join condition (Viktor Batytskyi)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1419">CALCITE-1419</a>]
+  Implement JDBC functions: `LTRIM`, `RTRIM` and 3-parameter `LOCATE` and
+  `POSITION` (Jungtaek Lim)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-917">CALCITE-917</a>]
+  Add `AS JSON` as output option for `EXPLAIN`
+
+#### Bug-fixes, API changes and minor enhancements
+
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1559">CALCITE-1559</a>]
+  Convert example models to stricter JSON
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1560">CALCITE-1560</a>]
+  Remove `avatica` directory from `sqlline`'s class path
+* Remove non-ASCII characters from Java source files
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1511">CALCITE-1511</a>]
+  Decorrelation fails if query has more than one `EXISTS` in `WHERE` clause
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1555">CALCITE-1555</a>]
+  Improve `RelNode` validation
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1548">CALCITE-1548</a>]
+  Instantiate function objects once per query
+* Add lock to `JdbcAdapterTest`, to ensure that tests that modify data run in
+  series
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1519">CALCITE-1519</a>]
+  Standardize on "sub-query" rather than "subquery" in class names and comments
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1493">CALCITE-1493</a>]
+  Wrong plan for `NOT IN` correlated queries
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1526">CALCITE-1526</a>]
+  Use `Strong` to infer whether a predicate's inputs may be null
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1530">CALCITE-1530</a>]
+  Create a visitor to traverse linq4j expressions without mutating them, and
+  rename `Visitor` to `Shuttle`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1507">CALCITE-1507</a>]
+  `OFFSET` cannot be pushed through a `JOIN` if the non-preserved side of outer
+  join is not count-preserving
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1522">CALCITE-1522</a>]
+  Fix error message for `SetOp` with incompatible args (Jess Balint)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1532">CALCITE-1532</a>]
+  In `HttpUtils`, don't log HTTP requests; they may contain user name, password
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1037">CALCITE-1037</a>]
+  Column uniqueness is calculated incorrectly for `Correlate` (Alexey Makhmutov)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1495">CALCITE-1495</a>]
+  `SemiJoinRule` should not apply to `RIGHT` and `FULL JOIN`, and should strip
+  `LEFT JOIN`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1516">CALCITE-1516</a>]
+  Upgrade `hydromatic-resource-maven-plugin`, and re-work `SaffronProperties`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1498">CALCITE-1498</a>]
+  Avoid `LIMIT` with trivial `ORDER BY` being pushed through `JOIN` endlessly
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1501">CALCITE-1501</a>]
+  `EnumerableUnion` should use array comparator when row format is `ARRAY` (Dayue
+  Gao)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1502">CALCITE-1502</a>]
+  `AssertionError` in `ReduceExpressionsRule` when `CASE` is used with optional
+  value and literal (Serhii Harnyk)
+* Cosmetic changes, and deprecate some methods
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1486">CALCITE-1486</a>]
+  Invalid "Invalid literal" error for complex expression
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1488">CALCITE-1488</a>]
+  `ValuesReduceRule` should ignore empty `Values`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1384">CALCITE-1384</a>]
+  Extension point for `ALTER` statements (Gabriel Reid)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1484">CALCITE-1484</a>]
+  Upgrade Apache parent POM to version 18
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1482">CALCITE-1482</a>]
+  Fix leak on CassandraSchema creation
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1479">CALCITE-1479</a>]
+  `AssertionError` in `ReduceExpressionsRule` on multi-column `IN` sub-query
+  (Gian Merlino)
+* Upgrade `Quidem`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1416">CALCITE-1416</a>]
+  Make classes implement `AutoCloseable` where possible (Chinmay Kolhatkar)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1474">CALCITE-1474</a>]
+  Upgrade `aggdesigner`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1270">CALCITE-1270</a>]
+  Upgrade to `avatica-1.9`, `sqlline-1.2.0`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1461">CALCITE-1461</a>]
+  Hard-coded class name in `JaninoRelMetadataProvider` breaks shading (Jark Wu)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1465">CALCITE-1465</a>]
+  Store constants as a derived field in `RelOptPredicateList`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1429">CALCITE-1429</a>]
+  Druid adapter must send `fromNext` when requesting rows from Druid (Jiarong
+  Wei)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1430">CALCITE-1430</a>]
+  In Druid adapter, `pagingIdentifiers` might have more than one value (Jiarong
+  Wei)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1442">CALCITE-1442</a>]
+  Interval fractional second precision returns wrong value (Laurent Goujon)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1434">CALCITE-1434</a>]
+  User-defined aggregate function that uses a generic interface (Arun Mahadevan)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1431">CALCITE-1431</a>]
+  `RelDataTypeFactoryImpl.copyType()` did not copy `StructKind`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1424">CALCITE-1424</a>]
+  Druid type is called `FLOAT`, not `DOUBLE` (Jiarong Wei)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1415">CALCITE-1415</a>]
+  Add sub-query support for RelStructuredTypeFlattener
+
+#### Web site and documentation
+
+* Change PMC chair
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-1459">CALCITE-1459</a>]
+  Add Apache Apex to "Powered By" page (Chinmay Kolhatkar)
+
 ## <a href="https://github.com/apache/calcite/releases/tag/calcite-1.10.0">1.10.0</a> / 2016-10-12
 {: #v1-10-0}
 
-This release comes shortly after 1.9.0. It includes mainly bug fixes for the core and
+This release comes shortly after 1.9.0. It includes mainly bug-fixes for the core and
 Druid adapter. For the latest, we fixed an
 <a href="https://issues.apache.org/jira/browse/CALCITE-1403">important issue</a> that
 prevented us from handling consistently time dimensions in different time zones.
@@ -43,12 +261,12 @@ Guava versions 14.0 to 19.0;
 Druid version 0.9.1.1;
 other software versions as specified in `pom.xml`.
 
-New Feature
+#### New feature
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1374">CALCITE-1374</a>]
   Support operator `!=` as an alternative to `<>`
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1378">CALCITE-1378</a>]
   `ArrayIndexOutOfBoundsException` in sql-to-rel conversion for two-level columns
@@ -77,7 +295,7 @@ Bug fixes, API changes and minor enhancements
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1420">CALCITE-1420</a>]
   Allow Calcite JDBC Driver minor version to be greater than 9
 
-Web site and documentation
+#### Web site and documentation
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1393">CALCITE-1393</a>]
   Exclude packages `org.apache.calcite.benchmarks.generated`, `org.openjdk.jmh` from javadoc
@@ -88,7 +306,7 @@ Web site and documentation
 This release includes extensions and fixes for the Druid adapter. New features were
 added, such as the capability to
 <a href="https://issues.apache.org/jira/browse/CALCITE-1357">recognize and translate Timeseries and TopN Druid queries</a>.
-Moreover, this release contains multiple bug fixes over the initial implementation of the
+Moreover, this release contains multiple bug-fixes over the initial implementation of the
 adapter. It is worth mentioning that most of these fixes were contributed by Druid developers,
 which demonstrates the good reception of the adapter by that community.
 
@@ -113,7 +331,7 @@ using Oracle JDK 1.7, 1.8;
 Guava versions 14.0 to 19.0;
 other software versions as specified in `pom.xml`.
 
-New Feature
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1208">CALCITE-1208</a>]
   Improve two-level column structure handling
@@ -122,7 +340,7 @@ New Feature
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1309">CALCITE-1309</a>]
   Support `LATERAL TABLE` (Jark Wu)
 
-Druid adapter
+#### Druid adapter
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1292">CALCITE-1292</a>]
   Druid metadata query is very slow (Michael Spector)
@@ -137,7 +355,7 @@ Druid adapter
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1358">CALCITE-1358</a>]
   Push filters on time dimension to Druid
 
-Planner rules
+#### Planner rules
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1220">CALCITE-1220</a>]
   Further extend simplify for reducing expressions
@@ -154,7 +372,7 @@ Planner rules
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1365">CALCITE-1365</a>]
   Introduce `UnionPullUpConstantsRule`
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-30">CALCITE-30</a>]
   Implement `Statement.cancel` method
@@ -221,7 +439,7 @@ Bug fixes, API changes and minor enhancements
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1372">CALCITE-1372</a>]
   Calcite generate wrong field names in JDBC adapter
 
-Web site and documentation
+#### Web site and documentation
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1229">CALCITE-1229</a>]
   Restore API and Test API links to site
@@ -261,7 +479,7 @@ using Oracle JDK 1.7, 1.8;
 Guava versions 14.0 to 19.0;
 other software versions as specified in `pom.xml`.
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1177">CALCITE-1177</a>]
   Extend list of supported time units in `EXTRACT`, `CEIL` and `FLOOR` functions
@@ -294,7 +512,7 @@ New features
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1207">CALCITE-1207</a>]
   Allow numeric connection properties, and 'K', 'M', 'G' suffixes
 
-Planner rules
+#### Planner rules
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1235">CALCITE-1235</a>]
   Fully push down `LIMIT` + `OFFSET` in Cassandra
@@ -311,7 +529,7 @@ Planner rules
   Add `ProjectRemoveRule` to pre-processing program of materialization
   substitution
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1281">CALCITE-1281</a>]
   Druid adapter wrongly returns all numeric values as `int` or `float`
@@ -385,7 +603,7 @@ Bug fixes, API changes and minor enhancements
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-746">CALCITE-746</a>]
   Allow apache-rat to be run outside of release process
 
-Web site and documentation
+#### Web site and documentation
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1273">CALCITE-1273</a>]
   Following
@@ -445,7 +663,7 @@ using Oracle JDK 1.7, 1.8;
 Guava versions 12.0.1 to 19.0;
 other software versions as specified in `pom.xml`.
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1124">CALCITE-1124</a>]
   Add `TIMESTAMPADD`, `TIMESTAMPDIFF` functions (Arina Ielchiieva)
@@ -460,7 +678,7 @@ New features
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-551">CALCITE-551</a>]
   Sub-query inside aggregate function
 
-Planner rules
+#### Planner rules
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1158">CALCITE-1158</a>]
   Make `AggregateRemoveRule` extensible
@@ -485,7 +703,7 @@ Planner rules
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1059">CALCITE-1059</a>]
   Not valid to convert `Aggregate` on empty to empty if its `GROUP BY` key is empty
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1147">CALCITE-1147</a>]
   Allow multiple providers for the same kind of metadata
@@ -547,7 +765,7 @@ Bug fixes, API changes and minor enhancements
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-999">CALCITE-999</a>]
   Clean up maven POM files
 
-Web site and documentation
+#### Web site and documentation
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1112">CALCITE-1112</a>]
   "Powered by Calcite" page
@@ -568,7 +786,7 @@ Web site and documentation
 {: #v1-6-0}
 
 As usual in this release, there are new SQL features, improvements to
-planning rules and Avatica, and lots of bug fixes. We'll spotlight a
+planning rules and Avatica, and lots of bug-fixes. We'll spotlight a
 couple of features make it easier to handle complex queries.
 
 [<a href="https://issues.apache.org/jira/browse/CALCITE-816">CALCITE-816</a>]
@@ -602,7 +820,7 @@ on Linux, Mac OS X, Microsoft Windows;
 using Oracle JDK 1.7, 1.8;
 other software versions as specified in `pom.xml`.
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-816">CALCITE-816</a>]
   Represent sub-query as a `RexNode`
@@ -632,7 +850,7 @@ New features
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-970">CALCITE-970</a>]
   If `NULLS FIRST`/`NULLS LAST` not specified, sort `NULL` values high
 
-Avatica features and bug fixes
+#### Avatica features and bug-fixes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1040">CALCITE-1040</a>]
   Differentiate better between arrays and scalars in protobuf
@@ -649,7 +867,7 @@ Avatica features and bug fixes
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-962">CALCITE-962</a>]
   Propagate the cause, not just the cause's message, from `JdbcMeta`
 
-Planner rules
+#### Planner rules
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1057">CALCITE-1057</a>]
   Add `RelMetadataProvider` parameter to standard planner `Program`s
@@ -698,7 +916,7 @@ Planner rules
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-959">CALCITE-959</a>]
   Add description to `SortProjectTransposeRule`'s constructor
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-1060">CALCITE-1060</a>]
   Fix test deadlock by initializing `DriverManager` before registering `AlternatingDriver`
@@ -778,7 +996,7 @@ Bug fixes, API changes and minor enhancements
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-964">CALCITE-964</a>]
   Rename `timezone` connection property to `timeZone`
 
-Web site and documentation
+#### Web site and documentation
 
 * Avatica
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-1033">CALCITE-1033</a>]
@@ -830,7 +1048,7 @@ multi-sets.  You can follow this example to implement your own query
 language, and immediately taking advantage of Calcite's back-ends and
 optimizer rules. It's all just algebra, after all!
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-911">CALCITE-911</a>]
   Add a variant of `CalciteSchema` that does not cache sub-objects
@@ -862,7 +1080,7 @@ New features
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-819">CALCITE-819</a>]
   Add `RelRoot`, a contract for the result of a relational expression
 
-Avatica features and bug fixes
+#### Avatica features and bug-fixes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-951">CALCITE-951</a>]
   Print the server-side stack in the local exception (Josh Elser)
@@ -901,7 +1119,7 @@ Avatica features and bug fixes
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-840">CALCITE-840</a>]
   Protocol buffer serialization over HTTP for Avatica Server (Josh Elser)
 
-Materializations
+#### Materializations
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-952">CALCITE-952</a>]
   Organize applicable materializations in reversed topological order (Maryann
@@ -922,7 +1140,7 @@ Materializations
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-825">CALCITE-825</a>]
   Allow user to specify sort order of an `ArrayTable`
 
-Planner rules
+#### Planner rules
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-953">CALCITE-953</a>]
   Improve `RelMdPredicates` to deal with `RexLiteral` (Pengcheng Xiong)
@@ -965,7 +1183,7 @@ Planner rules
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-846">CALCITE-846</a>]
   Push `Aggregate` with `Filter` through `Union(all)`
 
-RelBuilder and Piglet
+#### RelBuilder and Piglet
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-933">CALCITE-933</a>]
   `RelBuilder.scan()` now gives a nice exception if the table does not exist
@@ -980,7 +1198,7 @@ RelBuilder and Piglet
   Add API to execute queries expressed as `RelNode`
 * In RelBuilder, build expressions by table alias
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-948">CALCITE-948</a>]
   Indicator columns not preserved by `RelFieldTrimmer`
@@ -1060,12 +1278,12 @@ Bug fixes, API changes and minor enhancements
 ## <a href="https://github.com/apache/calcite/releases/tag/calcite-1.4.0-incubating">1.4.0-incubating</a> / 2015-09-02
 {: #v1-4-0}
 
-In addition to a large number of bug fixes and minor enhancements,
+In addition to a large number of bug-fixes and minor enhancements,
 this release includes improvements to lattices and materialized views,
 and adds a builder API so that you can easily create relational
 algebra expressions.
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-748">CALCITE-748</a>]
       Add `RelBuilder`, builder for expressions in relational algebra
@@ -1080,7 +1298,7 @@ New features
       Implement multiple distinct-`COUNT` using `GROUPING SETS`
 * Add various `BitSet` and `ImmutableBitSet` utilities
 
-Website updates
+#### Web site updates
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-810">CALCITE-810</a>]
       Add committers' organizations to the web site
@@ -1097,7 +1315,7 @@ Website updates
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-355">CALCITE-355</a>]
       Web site
 
-Bug fixes, API changes and minor enhancements
+#### Bug-fixes, API changes and minor enhancements
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-741">CALCITE-741</a>]
       Ensure that the source release's `DEPENDENCIES` file includes all module
@@ -1247,7 +1465,7 @@ and
 <a href="https://issues.apache.org/jira/browse/CALCITE-704">filtered aggregate functions</a>
 and various improvements to Avatica.
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-505">CALCITE-505</a>]
   Support modifiable view
@@ -1259,7 +1477,7 @@ New features
   Remote fetch in Calcite JDBC driver
 * Support Date, Time, Timestamp parameters
 
-API changes
+#### API changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-722">CALCITE-722</a>]
   Rename markdown files to lower-case
@@ -1278,7 +1496,7 @@ API changes
 * [<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
+#### 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
@@ -1371,7 +1589,7 @@ distribution among relational expressions.
 and [<a href="https://issues.apache.org/jira/browse/CALCITE-307">CALCITE-307</a>]
 improve implicit and explicit conversions in SQL.
 
-New features
+#### 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)
@@ -1401,7 +1619,7 @@ New features
     Extend `splitCondition` method in `RelOptUtil` to handle multiple
     joins on the same key (Jesus Camacho Rodriguez)
 
-Avatica features and bug fixes
+#### Avatica features and bug-fixes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-670">CALCITE-670</a>]
   `AvaticaPreparedStatement` should support `execute()` and
@@ -1440,7 +1658,7 @@ Avatica features and bug fixes
 * [<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
+#### API changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-617">CALCITE-617</a>]
   Check at initialization time in `CachingInvocationHandler` that MD provider
@@ -1448,7 +1666,7 @@ API changes
 * [<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
+#### 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)
@@ -1501,7 +1719,7 @@ 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
+#### New features
 
 * SQL
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-602">CALCITE-602</a>]
@@ -1544,7 +1762,7 @@ New features
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-594">CALCITE-594</a>]
     Add `RelDistribution` trait and `Exchange` relational expression
 
-API changes
+#### API changes
 
 * Many sub-classes of `RelNode` now have a static `create` method
   which automatically sets up traits such as collation and
@@ -1567,7 +1785,7 @@ API changes
 * [<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
+#### Bug-fixes and internal changes
 
 * Remove the `LICENSE` file of calcite-example-csv (the former
   optiq-csv) and move its history into main history
@@ -1610,7 +1828,7 @@ 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
+#### New features
 
 * SQL
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-494">CALCITE-494</a>]
@@ -1688,7 +1906,7 @@ New features
     Remote JDBC driver
   * Make `JsonHandler` and `JsonService` thread-safe
 
-API changes
+#### API changes
 
 * The great code re-org
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>]
@@ -1717,7 +1935,7 @@ API changes
 * [<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
+#### Bug-fixes and internal changes
 
 * Build improvements
   * [<a href="https://issues.apache.org/jira/browse/CALCITE-541">CALCITE-541</a>]
@@ -1834,19 +2052,19 @@ 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
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
   Simpler SPI to query `Table`
 
-API changes
+#### 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
+#### 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
@@ -1880,7 +2098,7 @@ Bug-fixes and internal changes
 
 This is the first release as Calcite. (The project was previously called Optiq.)
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-430">CALCITE-430</a>]
   Rename project from Optiq to Calcite
@@ -1939,7 +2157,7 @@ New features
     If no fields are projected from a table, field trimmer should project a
     dummy expression
 
-API changes
+#### API changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-413">CALCITE-413</a>]
   Add `RelDataTypeSystem` plugin, allowing different max precision of a
@@ -1956,7 +2174,7 @@ API changes
   * [<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
+#### Bug-fixes and internal changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-386">CALCITE-386</a>]
   Fix NOTICE
@@ -2014,7 +2232,7 @@ Bug-fixes and internal changes
 
 This is the first release under the Apache incubator process.
 
-New features
+#### 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
@@ -2047,7 +2265,7 @@ New features
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-300">CALCITE-300</a>]
   Support multiple parameters in `COUNT(DISTINCT x, y, ...)`
 
-API changes
+#### 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
@@ -2069,7 +2287,7 @@ API changes
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-247">CALCITE-247</a>]
   Add `Context` and `FrameworkConfig`
 
-Bug-fixes and internal changes
+#### Bug-fixes and internal changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-380">CALCITE-380</a>]
   Downgrade to Guava 11.0.2
@@ -2141,7 +2359,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.8">0.8</a> / 2014-06-27
 {: #v0-8}
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-310">CALCITE-310</a>]
    Implement LEAD, LAG and NTILE windowed aggregates
@@ -2160,7 +2378,7 @@ New features
   * Add "!skip" command to SqlRun.
   * Add MySQL formatting mode to SqlRun.
 
-API changes
+#### API changes
 
 * Re-organize planner initialization,
   to make it easier to use heuristic join order.
@@ -2173,7 +2391,7 @@ API changes
   * Add `SqlKind.IS_NOT_NULL` enum value, and use where possible,
     including for `IS_NOT_UNKNOWN` operator.
 
-Bug-fixes and internal changes
+#### Bug-fixes and internal changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-312">CALCITE-312</a>]
   Trim non-required fields before `WindowRel`
@@ -2208,7 +2426,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.7">0.7</a> / 2014-05-13
 {: #v0-7}
 
-New features
+#### New features
 
 * Implement table functions.
 * Arrays and multi-sets:
@@ -2238,7 +2456,7 @@ New features
 * Implement micro-benchmarks via
   <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a>.
 
-API changes
+#### API changes
 
 * Provide an option to create root schema without the "metadata" schema.
 * Schema SPI:
@@ -2248,7 +2466,7 @@ API changes
     wrappers. (Tobi Vollebregt and Julian Hyde)
 * SqlAdvisor callable from client via JDBC.
 
-Bug-fixes and internal changes
+#### Bug-fixes and internal changes
 
 * Add Apache incubator proposal.
 * Rename RELEASE.md to HISTORY.md.
@@ -2279,7 +2497,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.6">0.6</a> / 2014-04-11
 {: #v0-6}
 
-New features
+#### New features
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-214">CALCITE-214</a>]
   Modify Frameworks to allow Schema to be re-used
@@ -2301,7 +2519,7 @@ New features
   Improve query performance of optiq over MongoDB
 * Add Phoenix (HBase) SQL dialect (Bruno Dumon)
 
-API changes
+#### API changes
 
 * Obsolete `RexImpTable.AggregateImplementor` and rename `AggImplementor2`.
   (**This is a breaking change**.)
@@ -2327,7 +2545,7 @@ API changes
 * Remove APIs deprecated for 0.5.
 * Move around some operator classes and singletons.
 
-Bug-fixes and internal changes
+#### Bug-fixes and internal changes
 
 * Upgrade to linq4j-0.2.
 * `FETCH` and `LIMIT` are ignored during SQL-to-RelNode translation.
@@ -2396,7 +2614,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.5">0.5</a> / 2014-03-14
 {: #v0-5}
 
-New features
+#### New features
 
 * Allow `quoting`, `quotedCasing`, `unquotedCasing`, and `caseSensitive`
   properties to be specified explicitly (Vladimir Sitnikov)
@@ -2410,7 +2628,7 @@ New features
   Optiq should recognize 'SYSTEM TABLE', 'JOIN', 'INDEX' as table types
 * Support querying ARRAY columns from JDBC source. (Gabriel Reid)
 
-API changes
+#### API changes
 
 * Add
   `ProjectRelBase.copy(RelTraitSet, RelNode, List<RexNode>, RelDataType)`
@@ -2431,7 +2649,7 @@ API changes
 * Convert all enum constants to upper-case.
   (**This is a breaking change**.)
 
-Bug-fixes and internal changes
+#### 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>]
@@ -2491,7 +2709,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.4.18">0.4.18</a> / 2014-02-14
 {: #v0-4-18}
 
-API and functionality changes
+#### API and functionality changes
 
 * Configurable lexical policy
     * [<a href="https://issues.apache.org/jira/browse/CALCITE-33">CALCITE-33</a>]
@@ -2540,7 +2758,7 @@ API and functionality changes
   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
+#### Bug-fixes and internal changes
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-61">CALCITE-16</a>]
   Upgrade to janino-2.7
@@ -2585,7 +2803,7 @@ Bug-fixes and internal changes
 ## <a href="https://github.com/apache/calcite/releases/tag/optiq-parent-0.4.17">0.4.17</a> / 2014-01-13
 {: #v0-4-17}
 
-API changes
+#### 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
@@ -2610,7 +2828,7 @@ API changes
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-105">CALCITE-105</a>]
   Externalize RelNode to and from JSON
 
-Tuning
+#### Tuning
 
 * If `EnumerableAggregateRel` has no aggregate functions, generate a
    call to `Enumerable.distinct()`, thereby saving the effort of
@@ -2636,7 +2854,7 @@ Tuning
   replace `LinkedList` with `ChunkList`, which has an O(1) remove and add,
   a fast O(n) get, and fast scan.
 
-Other
+#### Other
 
 * [<a href="https://issues.apache.org/jira/browse/CALCITE-87">CALCITE-87</a>]
   Constant folding

http://git-wip-us.apache.org/repos/asf/calcite/blob/934271f2/site/_docs/howto.md
----------------------------------------------------------------------
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index f47b520..0c34da0 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -39,8 +39,8 @@ Unpack the source distribution `.tar.gz` or `.zip` file,
 then build using maven:
 
 {% highlight bash %}
-$ tar xvfz calcite-1.10.0-source.tar.gz
-$ cd calcite-1.10.0
+$ tar xvfz calcite-1.11.0-source.tar.gz
+$ cd calcite-1.11.0
 $ mvn install
 {% endhighlight %}
 
@@ -427,6 +427,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` and `site/_docs/howto.md` have the correct version number.
+* Check that `NOTICE` has the current copyright year.
 * Set `version.major` and `version.minor` in `pom.xml`.
 * Make sure build and tests succeed, including with `-P it,it-oracle`.
 * Make sure that `mvn javadoc:javadoc javadoc:test-javadoc` succeeds


[3/4] calcite git commit: [CALCITE-1559] Convert example models to stricter JSON

Posted by jh...@apache.org.
[CALCITE-1559] Convert example models to stricter JSON


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

Branch: refs/heads/branch-1.11
Commit: b0362231a6b1cbc85a0e1fe2308d2476800f1511
Parents: d4557f1
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Jan 2 23:35:14 2017 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Jan 3 01:32:58 2017 -0800

----------------------------------------------------------------------
 cassandra/src/test/resources/model.json         |  18 +-
 .../hsqldb-foodmart-lattice-model.json          |  62 ++---
 core/src/test/resources/hsqldb-model.json       |  62 ++---
 .../resources/mysql-foodmart-lattice-model.json |  62 ++---
 .../test/resources/mysql-foodmart-model.json    |  20 +-
 example/csv/src/test/resources/bug.json         |  16 +-
 .../src/test/resources/filterable-model.json    |  18 +-
 .../src/test/resources/model-stream-table.json  |  26 +-
 .../test/resources/model-with-custom-table.json |  22 +-
 .../csv/src/test/resources/model-with-view.json |  24 +-
 example/csv/src/test/resources/model.json       |  16 +-
 .../src/test/resources/order-stream-table.json  |  36 +--
 example/csv/src/test/resources/smart.json       |  18 +-
 .../test/resources/mongo-foodmart-model.json    | 244 +++++++++----------
 .../src/test/resources/mongo-zips-model.json    |  28 +--
 15 files changed, 336 insertions(+), 336 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/cassandra/src/test/resources/model.json
----------------------------------------------------------------------
diff --git a/cassandra/src/test/resources/model.json b/cassandra/src/test/resources/model.json
index 29ca31e..5713d11 100644
--- a/cassandra/src/test/resources/model.json
+++ b/cassandra/src/test/resources/model.json
@@ -15,16 +15,16 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'twissandra',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "twissandra",
+  "schemas": [
     {
-      name: 'twissandra',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory',
-      operand: {
-        host: 'localhost',
-        keyspace: 'twissandra'
+      "name": "twissandra",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.cassandra.CassandraSchemaFactory",
+      "operand": {
+        "host": "localhost",
+        "keyspace": "twissandra"
       }
     }
   ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/hsqldb-foodmart-lattice-model.json
----------------------------------------------------------------------
diff --git a/core/src/test/resources/hsqldb-foodmart-lattice-model.json b/core/src/test/resources/hsqldb-foodmart-lattice-model.json
index bf2543e..0643696 100644
--- a/core/src/test/resources/hsqldb-foodmart-lattice-model.json
+++ b/core/src/test/resources/hsqldb-foodmart-lattice-model.json
@@ -15,43 +15,43 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'foodmart',
-  schemas: [ {
-    type: 'jdbc',
-    name: 'foodmart',
-    jdbcUser: 'FOODMART',
-    jdbcPassword: 'FOODMART',
-    jdbcUrl: 'jdbc:hsqldb:res:foodmart',
-    /* jdbcCatalog: 'foodmart', */
-    jdbcSchema: 'foodmart'
+  "version": "1.0",
+  "defaultSchema": "foodmart",
+  "schemas": [ {
+    "type": "jdbc",
+    "name": "foodmart",
+    "jdbcUser": "FOODMART",
+    "jdbcPassword": "FOODMART",
+    "jdbcUrl": "jdbc:hsqldb:res:foodmart",
+    /* "jdbcCatalog": "foodmart", */
+    "jdbcSchema": "foodmart"
   },
   {
-    name: 'adhoc',
-    lattices: [ {
-      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"'
+    "name": "adhoc",
+    "lattices": [ {
+      "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: true,
-      algorithm: false,
-      rowCountEstimate: 86837,
-      defaultMeasures: [ {
-        agg: 'count'
+      "auto": true,
+      "algorithm": true,
+      "rowCountEstimate": 86837,
+      "defaultMeasures": [ {
+        "agg": "count"
       } ],
-      tiles: [ {
-        dimensions: [ 'the_year', ['t', 'quarter'] ],
-        measures: [ {
-          agg: 'sum',
-          args: 'unit_sales'
+      "tiles": [ {
+        "dimensions": [ "the_year", ["t", "quarter"] ],
+        "measures": [ {
+          "agg": "sum",
+          "args": "unit_sales"
         }, {
-          agg: 'sum',
-          args: 'store_sales'
+          "agg": "sum",
+          "args": "store_sales"
         }, {
-          agg: 'count'
+          "agg": "count"
         } ]
       } ]
     } ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/hsqldb-model.json
----------------------------------------------------------------------
diff --git a/core/src/test/resources/hsqldb-model.json b/core/src/test/resources/hsqldb-model.json
index a53efef..5aec1e6 100644
--- a/core/src/test/resources/hsqldb-model.json
+++ b/core/src/test/resources/hsqldb-model.json
@@ -15,41 +15,41 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'SCOTT',
-  schemas: [ {
-    type: 'jdbc',
-    name: 'FOODMART',
-    jdbcUser: 'FOODMART',
-    jdbcPassword: 'FOODMART',
-    jdbcUrl: 'jdbc:hsqldb:res:foodmart',
-    jdbcSchema: 'foodmart'
+  "version": "1.0",
+  "defaultSchema": "SCOTT",
+  "schemas": [ {
+    "type": "jdbc",
+    "name": "FOODMART",
+    "jdbcUser": "FOODMART",
+    "jdbcPassword": "FOODMART",
+    "jdbcUrl": "jdbc:hsqldb:res:foodmart",
+    "jdbcSchema": "foodmart"
   }, {
-    type: 'jdbc',
-    name: 'SCOTT',
-    jdbcUser: 'SA',
-    jdbcPassword: '',
-    jdbcUrl: 'jdbc:hsqldb:res:scott',
-    jdbcSchema: 'SCOTT'
+    "type": "jdbc",
+    "name": "SCOTT",
+    "jdbcUser": "SA",
+    "jdbcPassword": "",
+    "jdbcUrl": "jdbc:hsqldb:res:scott",
+    "jdbcSchema": "SCOTT"
   }, {
-    type: 'custom',
-    name: 'FOODMART_CLONE',
-    factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
-    operand: {
-      jdbcUser: 'FOODMART',
-      jdbcPassword: 'FOODMART',
-      jdbcUrl: 'jdbc:hsqldb:res:foodmart',
-      jdbcSchema: 'foodmart'
+    "type": "custom",
+    "name": "FOODMART_CLONE",
+    "factory": "org.apache.calcite.adapter.clone.CloneSchema$Factory",
+    "operand": {
+      "jdbcUser": "FOODMART",
+      "jdbcPassword": "FOODMART",
+      "jdbcUrl": "jdbc:hsqldb:res:foodmart",
+      "jdbcSchema": "foodmart"
     }
   }, {
-    type: 'custom',
-    name: 'SCOTT_CLONE',
-    factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
-    operand: {
-      jdbcUser: 'SA',
-      jdbcPassword: '',
-      jdbcUrl: 'jdbc:hsqldb:res:scott',
-      jdbcSchema: 'SCOTT'
+    "type": "custom",
+    "name": "SCOTT_CLONE",
+    "factory": "org.apache.calcite.adapter.clone.CloneSchema$Factory",
+    "operand": {
+      "jdbcUser": "SA",
+      "jdbcPassword": "",
+      "jdbcUrl": "jdbc:hsqldb:res:scott",
+      "jdbcSchema": "SCOTT"
     }
   } ]
 }

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/mysql-foodmart-lattice-model.json
----------------------------------------------------------------------
diff --git a/core/src/test/resources/mysql-foodmart-lattice-model.json b/core/src/test/resources/mysql-foodmart-lattice-model.json
index 09e574e..ed2eab0 100644
--- a/core/src/test/resources/mysql-foodmart-lattice-model.json
+++ b/core/src/test/resources/mysql-foodmart-lattice-model.json
@@ -15,43 +15,43 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'foodmart',
-  schemas: [ {
-    type: 'jdbc',
-    name: 'foodmart',
-    jdbcUser: 'foodmart',
-    jdbcPassword: 'foodmart',
-    jdbcUrl: 'jdbc:mysql://localhost',
-    jdbcCatalog: 'foodmart',
-    jdbcSchema: null
+  "version": "1.0",
+  "defaultSchema": "foodmart",
+  "schemas": [ {
+    "type": "jdbc",
+    "name": "foodmart",
+    "jdbcUser": "foodmart",
+    "jdbcPassword": "foodmart",
+    "jdbcUrl": "jdbc:mysql://localhost",
+    "jdbcCatalog": "foodmart",
+    "jdbcSchema": null
   },
   {
-    name: 'adhoc',
-    lattices: [ {
-      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"'
+    "name": "adhoc",
+    "lattices": [ {
+      "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,
-      rowCountEstimate: 86837,
-      defaultMeasures: [ {
-        agg: 'count'
+      "auto": false,
+      "algorithm": true,
+      "rowCountEstimate": 86837,
+      "defaultMeasures": [ {
+        "agg": "count"
       } ],
-      tiles: [ {
-        dimensions: [ 'the_year', ['t', 'quarter'] ],
-        measures: [ {
-          agg: 'sum',
-          args: 'unit_sales'
+      "tiles": [ {
+        "dimensions": [ "the_year", ["t", "quarter"] ],
+        "measures": [ {
+          "agg": "sum",
+          "args": "unit_sales"
         }, {
-          agg: 'sum',
-          args: 'store_sales'
+          "agg": "sum",
+          "args": "store_sales"
         }, {
-          agg: 'count'
+          "agg": "count"
         } ]
       } ]
     } ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/mysql-foodmart-model.json
----------------------------------------------------------------------
diff --git a/core/src/test/resources/mysql-foodmart-model.json b/core/src/test/resources/mysql-foodmart-model.json
index 16dc25a..d5b740b 100644
--- a/core/src/test/resources/mysql-foodmart-model.json
+++ b/core/src/test/resources/mysql-foodmart-model.json
@@ -15,17 +15,17 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'foodmart',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "foodmart",
+  "schemas": [
     {
-      type: 'jdbc',
-      name: 'foodmart',
-      jdbcUser: 'foodmart',
-      jdbcPassword: 'foodmart',
-      jdbcUrl: 'jdbc:mysql://localhost',
-      jdbcCatalog: 'foodmart',
-      jdbcSchema: null
+      "type": "jdbc",
+      "name": "foodmart",
+      "jdbcUser": "foodmart",
+      "jdbcPassword": "foodmart",
+      "jdbcUrl": "jdbc:mysql://localhost",
+      "jdbcCatalog": "foodmart",
+      "jdbcSchema": null
     }
   ]
 }

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/bug.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/bug.json b/example/csv/src/test/resources/bug.json
index 1b4fece..acc939d 100644
--- a/example/csv/src/test/resources/bug.json
+++ b/example/csv/src/test/resources/bug.json
@@ -15,15 +15,15 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'BUG',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "BUG",
+  "schemas": [
     {
-      name: 'BUG',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'bug'
+      "name": "BUG",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
+      "operand": {
+        "directory": "bug"
       }
     }
   ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/filterable-model.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/filterable-model.json b/example/csv/src/test/resources/filterable-model.json
index e53fd32..012cb83 100644
--- a/example/csv/src/test/resources/filterable-model.json
+++ b/example/csv/src/test/resources/filterable-model.json
@@ -19,16 +19,16 @@
  * These tables can implement their own simple filtering.
  */
 {
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "SALES",
+  "schemas": [
     {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'sales',
-        flavor: "FILTERABLE"
+      "name": "SALES",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
+      "operand": {
+        "directory": "sales",
+        "flavor": "FILTERABLE"
       }
     }
   ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-stream-table.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/model-stream-table.json b/example/csv/src/test/resources/model-stream-table.json
index 62d6cba..8bac5f4 100644
--- a/example/csv/src/test/resources/model-stream-table.json
+++ b/example/csv/src/test/resources/model-stream-table.json
@@ -15,22 +15,22 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'STREAM',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "STREAM",
+  "schemas": [
     {
-      name: 'SS',
-      tables: [
+      "name": "SS",
+      "tables": [
         {
-          name: 'DEPTS',
-          type: 'custom',
-          factory: 'org.apache.calcite.adapter.csv.CsvStreamTableFactory',
-          stream: {
-            stream: true
+          "name": "DEPTS",
+          "type": "custom",
+          "factory": "org.apache.calcite.adapter.csv.CsvStreamTableFactory",
+          "stream": {
+            "stream": true
           },
-          operand: {
-            file: 'sales/SDEPTS.csv',
-            flavor: "scannable"
+          "operand": {
+            "file": "sales/SDEPTS.csv",
+            "flavor": "scannable"
           }
         }
       ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-with-custom-table.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/model-with-custom-table.json b/example/csv/src/test/resources/model-with-custom-table.json
index 28d5b38..f8da8f1 100644
--- a/example/csv/src/test/resources/model-with-custom-table.json
+++ b/example/csv/src/test/resources/model-with-custom-table.json
@@ -15,19 +15,19 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'CUSTOM_TABLE',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "CUSTOM_TABLE",
+  "schemas": [
     {
-      name: 'CUSTOM_TABLE',
-      tables: [
+      "name": "CUSTOM_TABLE",
+      "tables": [
         {
-          name: 'EMPS',
-          type: 'custom',
-          factory: 'org.apache.calcite.adapter.csv.CsvTableFactory',
-          operand: {
-            file: 'sales/EMPS.csv.gz',
-            flavor: "scannable"
+          "name": "EMPS",
+          "type": "custom",
+          "factory": "org.apache.calcite.adapter.csv.CsvTableFactory",
+          "operand": {
+            "file": "sales/EMPS.csv.gz",
+            "flavor": "scannable"
           }
         }
       ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-with-view.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/model-with-view.json b/example/csv/src/test/resources/model-with-view.json
index 2c190e9..3d33ff8 100644
--- a/example/csv/src/test/resources/model-with-view.json
+++ b/example/csv/src/test/resources/model-with-view.json
@@ -17,21 +17,21 @@
  * A JSON model of a Calcite schema that includes a view.
  */
 {
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "SALES",
+  "schemas": [
     {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'sales'
+      "name": "SALES",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
+      "operand": {
+        "directory": "sales"
       },
-      tables: [
+      "tables": [
         {
-          name: 'FEMALE_EMPS',
-          type: 'view',
-          sql: 'SELECT * FROM emps WHERE gender = \'F\''
+          "name": "FEMALE_EMPS",
+          "type": "view",
+          "sql": "SELECT * FROM emps WHERE gender = 'F'"
         }
       ]
     }

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/model.json b/example/csv/src/test/resources/model.json
index 60431a8..d6799bc 100644
--- a/example/csv/src/test/resources/model.json
+++ b/example/csv/src/test/resources/model.json
@@ -17,15 +17,15 @@
  * A JSON model of a simple Calcite schema.
  */
 {
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "SALES",
+  "schemas": [
     {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'sales'
+      "name": "SALES",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
+      "operand": {
+        "directory": "sales"
       }
     }
   ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/order-stream-table.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/order-stream-table.json b/example/csv/src/test/resources/order-stream-table.json
index 8308846..4bbb317 100644
--- a/example/csv/src/test/resources/order-stream-table.json
+++ b/example/csv/src/test/resources/order-stream-table.json
@@ -15,30 +15,30 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'foodmart',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "foodmart",
+  "schemas": [
     {
-      name: 'STREAMS',
-      tables: [ {
-        type: 'custom',
-        name: 'ORDERS',
-        stream: {
-          stream: true
+      "name": "STREAMS",
+      "tables": [ {
+        "type": "custom",
+        "name": "ORDERS",
+        "stream": {
+          "stream": true
         },
-        factory: 'org.apache.calcite.test.StreamTest$OrdersStreamTableFactory'
+        "factory": "org.apache.calcite.test.StreamTest$OrdersStreamTableFactory"
       } ]
     },
     {
-      name: 'INFINITE_STREAMS',
-      tables: [ {
-        type: 'custom',
-        name: 'ORDERS',
-        stream: {
-          stream: true
+      "name": "INFINITE_STREAMS",
+      "tables": [ {
+        "type": "custom",
+        "name": "ORDERS",
+        "stream": {
+          "stream": true
         },
-        factory: 'org.apache.calcite.test.StreamTest$InfiniteOrdersStreamTableFactory'
+        "factory": "org.apache.calcite.test.StreamTest$InfiniteOrdersStreamTableFactory"
       } ]
     }
   ]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/smart.json
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/smart.json b/example/csv/src/test/resources/smart.json
index b948259..1e1f0a8 100644
--- a/example/csv/src/test/resources/smart.json
+++ b/example/csv/src/test/resources/smart.json
@@ -24,16 +24,16 @@
  * relational expression which participates in query planning.
  */
 {
-  version: '1.0',
-  defaultSchema: 'SALES',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "SALES",
+  "schemas": [
     {
-      name: 'SALES',
-      type: 'custom',
-      factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
-      operand: {
-        directory: 'sales',
-        flavor: "TRANSLATABLE"
+      "name": "SALES",
+      "type": "custom",
+      "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory",
+      "operand": {
+        "directory": "sales",
+        "flavor": "TRANSLATABLE"
       }
     }
   ]

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/mongodb/src/test/resources/mongo-foodmart-model.json
----------------------------------------------------------------------
diff --git a/mongodb/src/test/resources/mongo-foodmart-model.json b/mongodb/src/test/resources/mongo-foodmart-model.json
index b472d57..f83ca44 100644
--- a/mongodb/src/test/resources/mongo-foodmart-model.json
+++ b/mongodb/src/test/resources/mongo-foodmart-model.json
@@ -15,205 +15,205 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'foodmart',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "foodmart",
+  "schemas": [
     {
-      type: 'custom',
-      name: 'foodmart_raw',
-      factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
-      operand: {
-        host: 'localhost',
-        database: 'foodmart'
+      "type": "custom",
+      "name": "foodmart_raw",
+      "factory": "org.apache.calcite.adapter.mongodb.MongoSchemaFactory",
+      "operand": {
+        "host": "localhost",
+        "database": "foodmart"
       }
     },
     {
-      name: 'foodmart',
-      tables: [
+      "name": "foodmart",
+      "tables": [
         {
-          name: 'sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1997\"'
+          "name": "sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1997\""
         },
         {
-          name: 'sales_fact_1998',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1998\"'
+          "name": "sales_fact_1998",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1998\""
         },
         {
-          name: 'sales_fact_dec_1998',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_dec_1998\"'
+          "name": "sales_fact_dec_1998",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_dec_1998\""
         },
         {
-          name: 'inventory_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'units_ordered\'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP[\'units_shipped\'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP[\'warehouse_sales\'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP[\'warehouse_cost\'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP[\'supply_time\'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP[\'store_invoice\'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1997\"'
+          "name": "inventory_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['units_ordered'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP['units_shipped'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP['warehouse_sales'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP['warehouse_cost'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP['supply_time'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP['store_invoice'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1997\""
         },
         {
-          name: 'inventory_fact_1998',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'units_ordered\'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP[\'units_shipped\'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP[\'warehouse_sales\'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP[\'warehouse_cost\'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP[\'supply_time\'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP[\'store_invoice\'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1998\"'
+          "name": "inventory_fact_1998",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['units_ordered'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP['units_shipped'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP['warehouse_sales'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP['warehouse_cost'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP['supply_time'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP['store_invoice'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1998\""
         },
         {
-          name: 'agg_pl_01_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales_sum\'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP[\'store_cost_sum\'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP[\'unit_sales_sum\'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_pl_01_sales_fact_1997\"'
+          "name": "agg_pl_01_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales_sum'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP['store_cost_sum'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP['unit_sales_sum'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_pl_01_sales_fact_1997\""
         },
         {
-          name: 'agg_ll_01_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_ll_01_sales_fact_1997\"'
+          "name": "agg_ll_01_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_ll_01_sales_fact_1997\""
         },
         {
-          name: 'agg_l_03_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_03_sales_fact_1997\"'
+          "name": "agg_l_03_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_03_sales_fact_1997\""
         },
         {
-          name: 'agg_l_04_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_04_sales_fact_1997\"'
+          "name": "agg_l_04_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_04_sales_fact_1997\""
         },
         {
-          name: 'agg_l_05_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_05_sales_fact_1997\"'
+          "name": "agg_l_05_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_05_sales_fact_1997\""
         },
         {
-          name: 'agg_c_10_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_10_sales_fact_1997\"'
+          "name": "agg_c_10_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_10_sales_fact_1997\""
         },
         {
-          name: 'agg_c_14_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_14_sales_fact_1997\"'
+          "name": "agg_c_14_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_14_sales_fact_1997\""
         },
         {
-          name: 'agg_lc_100_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_100_sales_fact_1997\"'
+          "name": "agg_lc_100_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_100_sales_fact_1997\""
         },
         {
-          name: 'agg_c_special_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'time_month\'] AS SMALLINT) AS \"time_month\",\n cast(_MAP[\'time_quarter\'] AS VARCHAR(30)) AS \"time_quarter\",\n cast(_MAP[\'time_year\'] AS SMALLINT) AS \"time_year\",\n cast(_MAP[\'store_sales_sum\'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP[\'store_cost_sum\'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP[\'unit_sales_sum\'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_special_sales_fact_1997\"'
+          "name": "agg_c_special_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['time_month'] AS SMALLINT) AS \"time_month\",\n cast(_MAP['time_quarter'] AS VARCHAR(30)) AS \"time_quarter\",\n cast(_MAP['time_year'] AS SMALLINT) AS \"time_year\",\n cast(_MAP['store_sales_sum'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP['store_cost_sum'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP['unit_sales_sum'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_special_sales_fact_1997\""
         },
         {
-          name: 'agg_g_ms_pcat_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'gender\'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'product_family\'] AS VARCHAR(30)) AS \"product_family\",\n cast(_MAP[\'product_department\'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP[\'product_category\'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_g_ms_pcat_sales_fact_1997\"'
+          "name": "agg_g_ms_pcat_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['product_family'] AS VARCHAR(30)) AS \"product_family\",\n cast(_MAP['product_department'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP['product_category'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_g_ms_pcat_sales_fact_1997\""
         },
         {
-          name: 'agg_lc_06_sales_fact_1997',
-          type: 'view',
-          sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'state_province\'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP[\'country\'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_06_sales_fact_1997\"'
+          "name": "agg_lc_06_sales_fact_1997",
+          "type": "view",
+          "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['city'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP['state_province'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP['country'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_06_sales_fact_1997\""
         },
         {
-          name: 'currency',
-          type: 'view',
-          sql: 'select cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'date\'] AS DATE) AS \"date\",\n cast(_MAP[\'currency\'] AS VARCHAR(30)) AS \"currency\",\n cast(_MAP[\'conversion_ratio\'] AS DECIMAL(10,4)) AS \"conversion_ratio\"\nfrom \"foodmart_raw\".\"currency\"'
+          "name": "currency",
+          "type": "view",
+          "sql": "select cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['date'] AS DATE) AS \"date\",\n cast(_MAP['currency'] AS VARCHAR(30)) AS \"currency\",\n cast(_MAP['conversion_ratio'] AS DECIMAL(10,4)) AS \"conversion_ratio\"\nfrom \"foodmart_raw\".\"currency\""
         },
         {
-          name: 'account',
-          type: 'view',
-          sql: 'select cast(_MAP[\'account_id\'] AS INTEGER) AS \"account_id\",\n cast(_MAP[\'account_parent\'] AS INTEGER) AS \"account_parent\",\n cast(_MAP[\'account_description\'] AS VARCHAR(30)) AS \"account_description\",\n cast(_MAP[\'account_type\'] AS VARCHAR(30)) AS \"account_type\",\n cast(_MAP[\'account_rollup\'] AS VARCHAR(30)) AS \"account_rollup\",\n cast(_MAP[\'Custom_Members\'] AS VARCHAR(255)) AS \"Custom_Members\"\nfrom \"foodmart_raw\".\"account\"'
+          "name": "account",
+          "type": "view",
+          "sql": "select cast(_MAP['account_id'] AS INTEGER) AS \"account_id\",\n cast(_MAP['account_parent'] AS INTEGER) AS \"account_parent\",\n cast(_MAP['account_description'] AS VARCHAR(30)) AS \"account_description\",\n cast(_MAP['account_type'] AS VARCHAR(30)) AS \"account_type\",\n cast(_MAP['account_rollup'] AS VARCHAR(30)) AS \"account_rollup\",\n cast(_MAP['Custom_Members'] AS VARCHAR(255)) AS \"Custom_Members\"\nfrom \"foodmart_raw\".\"account\""
         },
         {
-          name: 'category',
-          type: 'view',
-          sql: 'select cast(_MAP[\'category_id\'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP[\'category_parent\'] AS VARCHAR(30)) AS \"category_parent\",\n cast(_MAP[\'category_description\'] AS VARCHAR(30)) AS \"category_description\",\n cast(_MAP[\'category_rollup\'] AS VARCHAR(30)) AS \"category_rollup\"\nfrom \"foodmart_raw\".\"category\"'
+          "name": "category",
+          "type": "view",
+          "sql": "select cast(_MAP['category_id'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP['category_parent'] AS VARCHAR(30)) AS \"category_parent\",\n cast(_MAP['category_description'] AS VARCHAR(30)) AS \"category_description\",\n cast(_MAP['category_rollup'] AS VARCHAR(30)) AS \"category_rollup\"\nfrom \"foodmart_raw\".\"category\""
         },
         {
-          name: 'customer',
-          type: 'view',
-          sql: 'select cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'account_num\'] AS BIGINT) AS \"account_num\",\n cast(_MAP[\'lname\'] AS VARCHAR(30)) AS \"lname\",\n cast(_MAP[\'fname\'] AS VARCHAR(30)) AS \"fname\",\n cast(_MAP[\'mi\'] AS VARCHAR(30)) AS \"mi\",\n cast(_MAP[\'address1\'] AS VARCHAR(30)) AS \"address1\",\n cast(_MAP[\'address2\'] AS VARCHAR(30)) AS \"address2\",\n cast(_MAP[\'address3\'] AS VARCHAR(30)) AS \"address3\",\n cast(_MAP[\'address4\'] AS VARCHAR(30)) AS \"address4\",\n cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'state_province\'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP[\'postal_code\'] AS VARCHAR(30)) AS \"postal_code\",\n cast(_MAP[\'country\'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP[\'customer_region_id\'] AS INTEGER) AS \"customer_region_id\",\n cast(_MAP[\'phone1\'] AS VARCHAR(30)) AS \"phone1\",\n cast(_MAP[\'phone2\'] AS VARCHAR(30)) AS \"phone2\",\n cast(_MAP[\'birthdate\'] AS DATE) A
 S \"birthdate\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'yearly_income\'] AS VARCHAR(30)) AS \"yearly_income\",\n cast(_MAP[\'gender\'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP[\'total_children\'] AS SMALLINT) AS \"total_children\",\n cast(_MAP[\'num_children_at_home\'] AS SMALLINT) AS \"num_children_at_home\",\n cast(_MAP[\'education\'] AS VARCHAR(30)) AS \"education\",\n cast(_MAP[\'date_accnt_opened\'] AS DATE) AS \"date_accnt_opened\",\n cast(_MAP[\'member_card\'] AS VARCHAR(30)) AS \"member_card\",\n cast(_MAP[\'occupation\'] AS VARCHAR(30)) AS \"occupation\",\n cast(_MAP[\'houseowner\'] AS VARCHAR(30)) AS \"houseowner\",\n cast(_MAP[\'num_cars_owned\'] AS INTEGER) AS \"num_cars_owned\",\n cast(_MAP[\'fullname\'] AS VARCHAR(60)) AS \"fullname\"\nfrom \"foodmart_raw\".\"customer\"'
+          "name": "customer",
+          "type": "view",
+          "sql": "select cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['account_num'] AS BIGINT) AS \"account_num\",\n cast(_MAP['lname'] AS VARCHAR(30)) AS \"lname\",\n cast(_MAP['fname'] AS VARCHAR(30)) AS \"fname\",\n cast(_MAP['mi'] AS VARCHAR(30)) AS \"mi\",\n cast(_MAP['address1'] AS VARCHAR(30)) AS \"address1\",\n cast(_MAP['address2'] AS VARCHAR(30)) AS \"address2\",\n cast(_MAP['address3'] AS VARCHAR(30)) AS \"address3\",\n cast(_MAP['address4'] AS VARCHAR(30)) AS \"address4\",\n cast(_MAP['city'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP['state_province'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP['postal_code'] AS VARCHAR(30)) AS \"postal_code\",\n cast(_MAP['country'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP['customer_region_id'] AS INTEGER) AS \"customer_region_id\",\n cast(_MAP['phone1'] AS VARCHAR(30)) AS \"phone1\",\n cast(_MAP['phone2'] AS VARCHAR(30)) AS \"phone2\",\n cast(_MAP['birthdate'] AS DATE) AS \"birthdate\",\n cast(_MAP['ma
 rital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['yearly_income'] AS VARCHAR(30)) AS \"yearly_income\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['total_children'] AS SMALLINT) AS \"total_children\",\n cast(_MAP['num_children_at_home'] AS SMALLINT) AS \"num_children_at_home\",\n cast(_MAP['education'] AS VARCHAR(30)) AS \"education\",\n cast(_MAP['date_accnt_opened'] AS DATE) AS \"date_accnt_opened\",\n cast(_MAP['member_card'] AS VARCHAR(30)) AS \"member_card\",\n cast(_MAP['occupation'] AS VARCHAR(30)) AS \"occupation\",\n cast(_MAP['houseowner'] AS VARCHAR(30)) AS \"houseowner\",\n cast(_MAP['num_cars_owned'] AS INTEGER) AS \"num_cars_owned\",\n cast(_MAP['fullname'] AS VARCHAR(60)) AS \"fullname\"\nfrom \"foodmart_raw\".\"customer\""
         },
         {
-          name: 'days',
-          type: 'view',
-          sql: 'select cast(_MAP[\'day\'] AS INTEGER) AS \"day\",\n cast(_MAP[\'week_day\'] AS VARCHAR(30)) AS \"week_day\"\nfrom \"foodmart_raw\".\"days\"'
+          "name": "days",
+          "type": "view",
+          "sql": "select cast(_MAP['day'] AS INTEGER) AS \"day\",\n cast(_MAP['week_day'] AS VARCHAR(30)) AS \"week_day\"\nfrom \"foodmart_raw\".\"days\""
         },
         {
-          name: 'department',
-          type: 'view',
-          sql: 'select cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'department_description\'] AS VARCHAR(30)) AS \"department_description\"\nfrom \"foodmart_raw\".\"department\"'
+          "name": "department",
+          "type": "view",
+          "sql": "select cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['department_description'] AS VARCHAR(30)) AS \"department_description\"\nfrom \"foodmart_raw\".\"department\""
         },
         {
-          name: 'employee',
-          type: 'view',
-          sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'full_name\'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP[\'first_name\'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP[\'last_name\'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'birth_date\'] AS DATE) AS \"birth_date\",\n cast(_MAP[\'hire_date\'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP[\'salary\'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'education_level\'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'gender\'] AS VARCHAR(30)) 
 AS \"gender\",\n cast(_MAP[\'management_role\'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"employee\"'
+          "name": "employee",
+          "type": "view",
+          "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['full_name'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP['first_name'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP['last_name'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['birth_date'] AS DATE) AS \"birth_date\",\n cast(_MAP['hire_date'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP['salary'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['education_level'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['ma
 nagement_role'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"employee\""
         },
         {
-          name: 'employee_closure',
-          type: 'view',
-          sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'distance\'] AS INTEGER) AS \"distance\"\nfrom \"foodmart_raw\".\"employee_closure\"'
+          "name": "employee_closure",
+          "type": "view",
+          "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['distance'] AS INTEGER) AS \"distance\"\nfrom \"foodmart_raw\".\"employee_closure\""
         },
         {
-          name: 'expense_fact',
-          type: 'view',
-          sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'account_id\'] AS INTEGER) AS \"account_id\",\n cast(_MAP[\'exp_date\'] AS TIMESTAMP) AS \"exp_date\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'category_id\'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'amount\'] AS DECIMAL(10,4)) AS \"amount\"\nfrom \"foodmart_raw\".\"expense_fact\"'
+          "name": "expense_fact",
+          "type": "view",
+          "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['account_id'] AS INTEGER) AS \"account_id\",\n cast(_MAP['exp_date'] AS TIMESTAMP) AS \"exp_date\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['category_id'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['amount'] AS DECIMAL(10,4)) AS \"amount\"\nfrom \"foodmart_raw\".\"expense_fact\""
         },
         {
-          name: 'position',
-          type: 'view',
-          sql: 'select cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'pay_type\'] AS VARCHAR(30)) AS \"pay_type\",\n cast(_MAP[\'min_scale\'] AS DECIMAL(10,4)) AS \"min_scale\",\n cast(_MAP[\'max_scale\'] AS DECIMAL(10,4)) AS \"max_scale\",\n cast(_MAP[\'management_role\'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"position\"'
+          "name": "position",
+          "type": "view",
+          "sql": "select cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['pay_type'] AS VARCHAR(30)) AS \"pay_type\",\n cast(_MAP['min_scale'] AS DECIMAL(10,4)) AS \"min_scale\",\n cast(_MAP['max_scale'] AS DECIMAL(10,4)) AS \"max_scale\",\n cast(_MAP['management_role'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"position\""
         },
         {
-          name: 'product',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_class_id\'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'brand_name\'] AS VARCHAR(60)) AS \"brand_name\",\n cast(_MAP[\'product_name\'] AS VARCHAR(60)) AS \"product_name\",\n cast(_MAP[\'SKU\'] AS BIGINT) AS \"SKU\",\n cast(_MAP[\'SRP\'] AS DECIMAL(10,4)) AS \"SRP\",\n cast(_MAP[\'gross_weight\'] AS REAL) AS \"gross_weight\",\n cast(_MAP[\'net_weight\'] AS REAL) AS \"net_weight\",\n cast(_MAP[\'recyclable_package\'] AS BOOLEAN) AS \"recyclable_package\",\n cast(_MAP[\'low_fat\'] AS BOOLEAN) AS \"low_fat\",\n cast(_MAP[\'units_per_case\'] AS SMALLINT) AS \"units_per_case\",\n cast(_MAP[\'cases_per_pallet\'] AS SMALLINT) AS \"cases_per_pallet\",\n cast(_MAP[\'shelf_width\'] AS REAL) AS \"shelf_width\",\n cast(_MAP[\'shelf_height\'] AS REAL) AS \"shelf_height\",\n cast(_MAP[\'shelf_depth\'] AS REAL) AS \"shelf_depth\"\nfrom \"foodmart_raw\".\"product\"'
+          "name": "product",
+          "type": "view",
+          "sql": "select cast(_MAP['product_class_id'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['brand_name'] AS VARCHAR(60)) AS \"brand_name\",\n cast(_MAP['product_name'] AS VARCHAR(60)) AS \"product_name\",\n cast(_MAP['SKU'] AS BIGINT) AS \"SKU\",\n cast(_MAP['SRP'] AS DECIMAL(10,4)) AS \"SRP\",\n cast(_MAP['gross_weight'] AS REAL) AS \"gross_weight\",\n cast(_MAP['net_weight'] AS REAL) AS \"net_weight\",\n cast(_MAP['recyclable_package'] AS BOOLEAN) AS \"recyclable_package\",\n cast(_MAP['low_fat'] AS BOOLEAN) AS \"low_fat\",\n cast(_MAP['units_per_case'] AS SMALLINT) AS \"units_per_case\",\n cast(_MAP['cases_per_pallet'] AS SMALLINT) AS \"cases_per_pallet\",\n cast(_MAP['shelf_width'] AS REAL) AS \"shelf_width\",\n cast(_MAP['shelf_height'] AS REAL) AS \"shelf_height\",\n cast(_MAP['shelf_depth'] AS REAL) AS \"shelf_depth\"\nfrom \"foodmart_raw\".\"product\""
         },
         {
-          name: 'product_class',
-          type: 'view',
-          sql: 'select cast(_MAP[\'product_class_id\'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP[\'product_subcategory\'] AS VARCHAR(30)) AS \"product_subcategory\",\n cast(_MAP[\'product_category\'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP[\'product_department\'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP[\'product_family\'] AS VARCHAR(30)) AS \"product_family\"\nfrom \"foodmart_raw\".\"product_class\"'
+          "name": "product_class",
+          "type": "view",
+          "sql": "select cast(_MAP['product_class_id'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP['product_subcategory'] AS VARCHAR(30)) AS \"product_subcategory\",\n cast(_MAP['product_category'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP['product_department'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP['product_family'] AS VARCHAR(30)) AS \"product_family\"\nfrom \"foodmart_raw\".\"product_class\""
         },
         {
-          name: 'promotion',
-          type: 'view',
-          sql: 'select cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'promotion_district_id\'] AS INTEGER) AS \"promotion_district_id\",\n cast(_MAP[\'promotion_name\'] AS VARCHAR(30)) AS \"promotion_name\",\n cast(_MAP[\'media_type\'] AS VARCHAR(30)) AS \"media_type\",\n cast(_MAP[\'cost\'] AS DECIMAL(10,4)) AS \"cost\",\n cast(_MAP[\'start_date\'] AS TIMESTAMP) AS \"start_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\"\nfrom \"foodmart_raw\".\"promotion\"'
+          "name": "promotion",
+          "type": "view",
+          "sql": "select cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['promotion_district_id'] AS INTEGER) AS \"promotion_district_id\",\n cast(_MAP['promotion_name'] AS VARCHAR(30)) AS \"promotion_name\",\n cast(_MAP['media_type'] AS VARCHAR(30)) AS \"media_type\",\n cast(_MAP['cost'] AS DECIMAL(10,4)) AS \"cost\",\n cast(_MAP['start_date'] AS TIMESTAMP) AS \"start_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\"\nfrom \"foodmart_raw\".\"promotion\""
         },
         {
-          name: 'region',
-          type: 'view',
-          sql: 'select cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'sales_city\'] AS VARCHAR(30)) AS \"sales_city\",\n cast(_MAP[\'sales_state_province\'] AS VARCHAR(30)) AS \"sales_state_province\",\n cast(_MAP[\'sales_district\'] AS VARCHAR(30)) AS \"sales_district\",\n cast(_MAP[\'sales_region\'] AS VARCHAR(30)) AS \"sales_region\",\n cast(_MAP[\'sales_country\'] AS VARCHAR(30)) AS \"sales_country\",\n cast(_MAP[\'sales_district_id\'] AS INTEGER) AS \"sales_district_id\"\nfrom \"foodmart_raw\".\"region\"'
+          "name": "region",
+          "type": "view",
+          "sql": "select cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['sales_city'] AS VARCHAR(30)) AS \"sales_city\",\n cast(_MAP['sales_state_province'] AS VARCHAR(30)) AS \"sales_state_province\",\n cast(_MAP['sales_district'] AS VARCHAR(30)) AS \"sales_district\",\n cast(_MAP['sales_region'] AS VARCHAR(30)) AS \"sales_region\",\n cast(_MAP['sales_country'] AS VARCHAR(30)) AS \"sales_country\",\n cast(_MAP['sales_district_id'] AS INTEGER) AS \"sales_district_id\"\nfrom \"foodmart_raw\".\"region\""
         },
         {
-          name: 'reserve_employee',
-          type: 'view',
-          sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'full_name\'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP[\'first_name\'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP[\'last_name\'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'birth_date\'] AS TIMESTAMP) AS \"birth_date\",\n cast(_MAP[\'hire_date\'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP[\'salary\'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'education_level\'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'gender\'] AS VARCHAR(
 30)) AS \"gender\"\nfrom \"foodmart_raw\".\"reserve_employee\"'
+          "name": "reserve_employee",
+          "type": "view",
+          "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['full_name'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP['first_name'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP['last_name'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['birth_date'] AS TIMESTAMP) AS \"birth_date\",\n cast(_MAP['hire_date'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP['salary'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['education_level'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\"\nfrom \"foo
 dmart_raw\".\"reserve_employee\""
         },
         {
-          name: 'salary',
-          type: 'view',
-          sql: 'select cast(_MAP[\'pay_date\'] AS TIMESTAMP) AS \"pay_date\",\n cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'salary_paid\'] AS DECIMAL(10,4)) AS \"salary_paid\",\n cast(_MAP[\'overtime_paid\'] AS DECIMAL(10,4)) AS \"overtime_paid\",\n cast(_MAP[\'vacation_accrued\'] AS REAL) AS \"vacation_accrued\",\n cast(_MAP[\'vacation_used\'] AS REAL) AS \"vacation_used\"\nfrom \"foodmart_raw\".\"salary\"'
+          "name": "salary",
+          "type": "view",
+          "sql": "select cast(_MAP['pay_date'] AS TIMESTAMP) AS \"pay_date\",\n cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['salary_paid'] AS DECIMAL(10,4)) AS \"salary_paid\",\n cast(_MAP['overtime_paid'] AS DECIMAL(10,4)) AS \"overtime_paid\",\n cast(_MAP['vacation_accrued'] AS REAL) AS \"vacation_accrued\",\n cast(_MAP['vacation_used'] AS REAL) AS \"vacation_used\"\nfrom \"foodmart_raw\".\"salary\""
         },
         {
-          name: 'store',
-          type: 'view',
-          sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_type\'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'store_name\'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP[\'store_number\'] AS INTEGER) AS \"store_number\",\n cast(_MAP[\'store_street_address\'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP[\'store_city\'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP[\'store_state\'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP[\'store_postal_code\'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP[\'store_country\'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP[\'store_manager\'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP[\'store_phone\'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP[\'store_fax\'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP[\'first_opened_date\'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP[\'last_remodel_date\'] AS TIMESTAMP)
  AS \"last_remodel_date\",\n cast(_MAP[\'store_sqft\'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP[\'grocery_sqft\'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP[\'frozen_sqft\'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP[\'meat_sqft\'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP[\'coffee_bar\'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP[\'video_store\'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP[\'salad_bar\'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP[\'prepared_food\'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP[\'florist\'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store\"'
+          "name": "store",
+          "type": "view",
+          "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_type'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['store_name'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP['store_number'] AS INTEGER) AS \"store_number\",\n cast(_MAP['store_street_address'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP['store_city'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP['store_state'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP['store_postal_code'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP['store_country'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP['store_manager'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP['store_phone'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP['store_fax'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP['first_opened_date'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP['last_remodel_date'] AS TIMESTAMP) AS \"last_remodel_date\",\n
  cast(_MAP['store_sqft'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP['grocery_sqft'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP['frozen_sqft'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP['meat_sqft'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP['coffee_bar'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP['video_store'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP['salad_bar'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP['prepared_food'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP['florist'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store\""
         },
         {
-          name: 'store_ragged',
-          type: 'view',
-          sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_type\'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'store_name\'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP[\'store_number\'] AS INTEGER) AS \"store_number\",\n cast(_MAP[\'store_street_address\'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP[\'store_city\'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP[\'store_state\'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP[\'store_postal_code\'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP[\'store_country\'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP[\'store_manager\'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP[\'store_phone\'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP[\'store_fax\'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP[\'first_opened_date\'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP[\'last_remodel_date\'] AS TIMESTAMP)
  AS \"last_remodel_date\",\n cast(_MAP[\'store_sqft\'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP[\'grocery_sqft\'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP[\'frozen_sqft\'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP[\'meat_sqft\'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP[\'coffee_bar\'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP[\'video_store\'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP[\'salad_bar\'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP[\'prepared_food\'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP[\'florist\'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store_ragged\"'
+          "name": "store_ragged",
+          "type": "view",
+          "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_type'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['store_name'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP['store_number'] AS INTEGER) AS \"store_number\",\n cast(_MAP['store_street_address'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP['store_city'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP['store_state'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP['store_postal_code'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP['store_country'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP['store_manager'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP['store_phone'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP['store_fax'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP['first_opened_date'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP['last_remodel_date'] AS TIMESTAMP) AS \"last_remodel_date\",\n
  cast(_MAP['store_sqft'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP['grocery_sqft'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP['frozen_sqft'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP['meat_sqft'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP['coffee_bar'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP['video_store'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP['salad_bar'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP['prepared_food'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP['florist'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store_ragged\""
         },
         {
-          name: 'time_by_day',
-          type: 'view',
-          sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'the_date\'] AS TIMESTAMP) AS \"the_date\",\n cast(_MAP[\'the_day\'] AS VARCHAR(30)) AS \"the_day\",\n cast(_MAP[\'the_month\'] AS VARCHAR(30)) AS \"the_month\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'day_of_month\'] AS SMALLINT) AS \"day_of_month\",\n cast(_MAP[\'week_of_year\'] AS INTEGER) AS \"week_of_year\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'fiscal_period\'] AS VARCHAR(30)) AS \"fiscal_period\"\nfrom \"foodmart_raw\".\"time_by_day\"'
+          "name": "time_by_day",
+          "type": "view",
+          "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['the_date'] AS TIMESTAMP) AS \"the_date\",\n cast(_MAP['the_day'] AS VARCHAR(30)) AS \"the_day\",\n cast(_MAP['the_month'] AS VARCHAR(30)) AS \"the_month\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['day_of_month'] AS SMALLINT) AS \"day_of_month\",\n cast(_MAP['week_of_year'] AS INTEGER) AS \"week_of_year\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['fiscal_period'] AS VARCHAR(30)) AS \"fiscal_period\"\nfrom \"foodmart_raw\".\"time_by_day\""
         },
         {
-          name: 'warehouse',
-          type: 'view',
-          sql: 'select cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'warehouse_class_id\'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP[\'stores_id\'] AS INTEGER) AS \"stores_id\",\n cast(_MAP[\'warehouse_name\'] AS VARCHAR(60)) AS \"warehouse_name\",\n cast(_MAP[\'wa_address1\'] AS VARCHAR(30)) AS \"wa_address1\",\n cast(_MAP[\'wa_address2\'] AS VARCHAR(30)) AS \"wa_address2\",\n cast(_MAP[\'wa_address3\'] AS VARCHAR(30)) AS \"wa_address3\",\n cast(_MAP[\'wa_address4\'] AS VARCHAR(30)) AS \"wa_address4\",\n cast(_MAP[\'warehouse_city\'] AS VARCHAR(30)) AS \"warehouse_city\",\n cast(_MAP[\'warehouse_state_province\'] AS VARCHAR(30)) AS \"warehouse_state_province\",\n cast(_MAP[\'warehouse_postal_code\'] AS VARCHAR(30)) AS \"warehouse_postal_code\",\n cast(_MAP[\'warehouse_country\'] AS VARCHAR(30)) AS \"warehouse_country\",\n cast(_MAP[\'warehouse_owner_name\'] AS VARCHAR(30)) AS \"warehouse_owner_name\",\n cast(_MAP[\'warehouse_phone\'] AS VARCHAR
 (30)) AS \"warehouse_phone\",\n cast(_MAP[\'warehouse_fax\'] AS VARCHAR(30)) AS \"warehouse_fax\"\nfrom \"foodmart_raw\".\"warehouse\"'
+          "name": "warehouse",
+          "type": "view",
+          "sql": "select cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['warehouse_class_id'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP['stores_id'] AS INTEGER) AS \"stores_id\",\n cast(_MAP['warehouse_name'] AS VARCHAR(60)) AS \"warehouse_name\",\n cast(_MAP['wa_address1'] AS VARCHAR(30)) AS \"wa_address1\",\n cast(_MAP['wa_address2'] AS VARCHAR(30)) AS \"wa_address2\",\n cast(_MAP['wa_address3'] AS VARCHAR(30)) AS \"wa_address3\",\n cast(_MAP['wa_address4'] AS VARCHAR(30)) AS \"wa_address4\",\n cast(_MAP['warehouse_city'] AS VARCHAR(30)) AS \"warehouse_city\",\n cast(_MAP['warehouse_state_province'] AS VARCHAR(30)) AS \"warehouse_state_province\",\n cast(_MAP['warehouse_postal_code'] AS VARCHAR(30)) AS \"warehouse_postal_code\",\n cast(_MAP['warehouse_country'] AS VARCHAR(30)) AS \"warehouse_country\",\n cast(_MAP['warehouse_owner_name'] AS VARCHAR(30)) AS \"warehouse_owner_name\",\n cast(_MAP['warehouse_phone'] AS VARCHAR(30)) AS \"warehouse_phone
 \",\n cast(_MAP['warehouse_fax'] AS VARCHAR(30)) AS \"warehouse_fax\"\nfrom \"foodmart_raw\".\"warehouse\""
         },
         {
-          name: 'warehouse_class',
-          type: 'view',
-          sql: 'select cast(_MAP[\'warehouse_class_id\'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP[\'description\'] AS VARCHAR(30)) AS \"description\"\nfrom \"foodmart_raw\".\"warehouse_class\"'
+          "name": "warehouse_class",
+          "type": "view",
+          "sql": "select cast(_MAP['warehouse_class_id'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP['description'] AS VARCHAR(30)) AS \"description\"\nfrom \"foodmart_raw\".\"warehouse_class\""
         }
       ]
     }

http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/mongodb/src/test/resources/mongo-zips-model.json
----------------------------------------------------------------------
diff --git a/mongodb/src/test/resources/mongo-zips-model.json b/mongodb/src/test/resources/mongo-zips-model.json
index 9e94e47..669e3b9 100644
--- a/mongodb/src/test/resources/mongo-zips-model.json
+++ b/mongodb/src/test/resources/mongo-zips-model.json
@@ -15,25 +15,25 @@
  * limitations under the License.
  */
 {
-  version: '1.0',
-  defaultSchema: 'mongo',
-  schemas: [
+  "version": "1.0",
+  "defaultSchema": "mongo",
+  "schemas": [
     {
-      type: 'custom',
-      name: 'mongo_raw',
-      factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
-      operand: {
-        host: 'localhost',
-        database: 'test'
+      "type": "custom",
+      "name": "mongo_raw",
+      "factory": "org.apache.calcite.adapter.mongodb.MongoSchemaFactory",
+      "operand": {
+        "host": "localhost",
+        "database": "test"
       }
     },
     {
-      name: 'mongo',
-      tables: [
+      "name": "mongo",
+      "tables": [
         {
-          name: 'ZIPS',
-          type: 'view',
-          sql: 'select cast(_MAP[\'city\'] AS varchar(20)) AS city,\n cast(_MAP[\'loc\'][0] AS float) AS longitude, cast(_MAP[\'loc\'][1] AS float) AS latitude, cast(_MAP[\'pop\'] AS integer) AS pop, cast(_MAP[\'state\'] AS varchar(2)) AS state, cast(_MAP[\'_id\'] AS varchar(5)) AS id from \"mongo_raw\".\"zips\"'
+          "name": "ZIPS",
+          "type": "view",
+          "sql": "select cast(_MAP['city'] AS varchar(20)) AS city,\n cast(_MAP['loc'][0] AS float) AS longitude, cast(_MAP['loc'][1] AS float) AS latitude, cast(_MAP['pop'] AS integer) AS pop, cast(_MAP['state'] AS varchar(2)) AS state, cast(_MAP['_id'] AS varchar(5)) AS id from \"mongo_raw\".\"zips\""
         }
       ]
     }