[CARBONDATA-2241][Docs][BugFix] Updated Doc for query which will execute on datamap
Fix: Corrected the query so that it will execute using datamap. This closes #2048 Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/6772e547 Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/6772e547 Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/6772e547 Branch: refs/heads/master Commit: 6772e547ce0f90ff735d439d4f76cf407fa41979 Parents: 4119062 Author: SangeetaGulia <sangeeta.gu...@knoldus.in> Authored: Fri Mar 9 11:13:45 2018 +0530 Committer: Jacky Li <jacky.li...@qq.com> Committed: Wed Mar 14 12:11:11 2018 +0800 ---------------------------------------------------------------------- docs/datamap/preaggregate-datamap-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/carbondata/blob/6772e547/docs/datamap/preaggregate-datamap-guide.md ---------------------------------------------------------------------- diff --git a/docs/datamap/preaggregate-datamap-guide.md b/docs/datamap/preaggregate-datamap-guide.md index 199f674..84f06c4 100644 --- a/docs/datamap/preaggregate-datamap-guide.md +++ b/docs/datamap/preaggregate-datamap-guide.md @@ -181,7 +181,7 @@ SELECT country, sex, sum(quantity), avg(price) from sales GROUP BY country, sex SELECT sex, sum(quantity) from sales GROUP BY sex -SELECT sum(price), country from sales GROUP BY country +SELECT avg(price), country from sales GROUP BY country ``` will be transformed by CarbonData's query planner to query against pre-aggregate table @@ -211,7 +211,7 @@ tables are loaded successfully, if one of these loads fails, new data are not vi as if the load operation is not happened. ## Querying data -As a technique for query acceleration, Pre-aggregate tables cannot be queries directly. +As a technique for query acceleration, Pre-aggregate tables cannot be queried directly. Queries are to be made on main table. While doing query planning, internally CarbonData will check associated pre-aggregate tables with the main table, and do query plan transformation accordingly.