You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jc...@apache.org on 2017/05/22 15:03:12 UTC
calcite git commit: Fix in examples added in CALCITE-1796
Repository: calcite
Updated Branches:
refs/heads/master 991784971 -> b6175f807
Fix in examples added in CALCITE-1796
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/b6175f80
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/b6175f80
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/b6175f80
Branch: refs/heads/master
Commit: b6175f807d62ea5be268e1312d9ea52e569f56cb
Parents: 9917849
Author: Jesus Camacho Rodriguez <jc...@apache.org>
Authored: Mon May 22 16:03:09 2017 +0100
Committer: Jesus Camacho Rodriguez <jc...@apache.org>
Committed: Mon May 22 16:03:09 2017 +0100
----------------------------------------------------------------------
site/_docs/materialized_views.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/b6175f80/site/_docs/materialized_views.md
----------------------------------------------------------------------
diff --git a/site/_docs/materialized_views.md b/site/_docs/materialized_views.md
index 553bc3d..0f25279 100644
--- a/site/_docs/materialized_views.md
+++ b/site/_docs/materialized_views.md
@@ -168,7 +168,7 @@ GROUP BY deptno
* Query:
```SQL
-SELECT deptno, COUNT(*) AS c, SUM(empid) AS s
+SELECT deptno, COUNT(*) AS c, SUM(salary) AS s
FROM emps
GROUP BY deptno
```
@@ -176,7 +176,7 @@ GROUP BY deptno
* Materialized view definition:
```SQL
-SELECT empid, deptno, COUNT(*) AS c, SUM(empid) AS s
+SELECT empid, deptno, COUNT(*) AS c, SUM(salary) AS s
FROM emps
GROUP BY empid, deptno
```
@@ -197,7 +197,7 @@ Through the declared constraints, the rule can detect joins that only append col
* Query:
```SQL
-SELECT deptno
+SELECT deptno, COUNT(*)
FROM emps
GROUP BY deptno
```
@@ -205,7 +205,7 @@ GROUP BY deptno
* Materialized view definition:
```SQL
-SELECT empid, depts.deptno, COUNT(*) AS c, SUM(empid) AS s
+SELECT empid, depts.deptno, COUNT(*) AS c, SUM(salary) AS s
FROM emps
JOIN depts USING (deptno)
GROUP BY empid, depts.deptno
@@ -214,7 +214,7 @@ GROUP BY empid, depts.deptno
* Rewriting:
```SQL
-SELECT deptno
+SELECT deptno, SUM(c)
FROM mv
GROUP BY deptno
```