Navigation Menu

Skip to content

Commit

Permalink
doc select: fix wrong description
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 27, 2015
1 parent 11589c3 commit d53c530
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 12 deletions.
Expand Up @@ -4,22 +4,132 @@ Execution example::
--limit -1 \
--output_column _id,n_likes \
--drilldown tag \
--drilldown_calc_types MAX|MIN|SUM|AVG \
--drilldown_calc_types MAX,MIN,SUM,AVG \
--drilldown_calc_target n_likes \
--drilldown_output_columns _key,_nsubrecs,_max,_min,_sum,_avg
# [
# [
# -22,
# 0,
# 1337566253.89858,
# 0.000355720520019531,
# "invalid table group calc type: <|MIN|SUM|AVG>",
# 0.000355720520019531
# ],
# [
# [
# [
# 5
# ],
# [
# [
# "_id",
# "UInt32"
# ],
# [
# "_key",
# "ShortText"
# ],
# [
# "content",
# "Text"
# ],
# [
# "n_likes",
# "UInt32"
# ],
# [
# "tag",
# "ShortText"
# ]
# ],
# [
# 1,
# "The first post!",
# "Welcome! This is my first post!",
# 5,
# "Hello"
# ],
# [
# 2,
# "Groonga",
# "I started to use Groonga. It's very fast!",
# 10,
# "Groonga"
# ],
# [
# 3,
# "Mroonga",
# "I also started to use Mroonga. It's also very fast! Really fast!",
# 15,
# "Groonga"
# ],
# [
# 4,
# "Good-bye Senna",
# "I migrated all Senna system!",
# 3,
# "Senna"
# ],
# [
# 5,
# "Good-bye Tritonn",
# "I also migrated all Tritonn system!",
# 3,
# "Senna"
# ]
# ],
# [
# [
# "grn_parse_table_group_calc_types",
# "proc.c",
# 625
# 3
# ],
# [
# [
# "_key",
# "ShortText"
# ],
# [
# "_nsubrecs",
# "Int32"
# ],
# [
# "_max",
# "Int64"
# ],
# [
# "_min",
# "Int64"
# ],
# [
# "_sum",
# "Int64"
# ],
# [
# "_avg",
# "Float"
# ]
# ],
# [
# "Hello",
# 1,
# 5,
# 5,
# 5,
# 5.0
# ],
# [
# "Groonga",
# 2,
# 15,
# 10,
# 25,
# 12.5
# ],
# [
# "Senna",
# 2,
# 3,
# 3,
# 6,
# 3.0
# ]
# ]
# ],
# []
# ]
# ]
6 changes: 3 additions & 3 deletions doc/source/reference/commands/select.rst
Expand Up @@ -1164,7 +1164,7 @@ The default value of ``drilldown_limit`` is ``10``.

It specifies how to calculate (aggregate) values in grouped records by
a drilldown. You can specify multiple calculation types separated by
"``|``". For example, ``MAX|MIN``.
"``,``". For example, ``MAX,MIN``.

Calculation target values are read from a column of grouped
records. The column is specified by
Expand Down Expand Up @@ -1290,12 +1290,12 @@ Here is an example that uses all calculation types:
.. --limit -1 \
.. --output_column _id,n_likes \
.. --drilldown tag \
.. --drilldown_calc_types MAX|MIN|SUM|AVG \
.. --drilldown_calc_types MAX,MIN,SUM,AVG \
.. --drilldown_calc_target n_likes \
.. --drilldown_output_columns _key,_nsubrecs,_max,_min,_sum,_avg
The ``select`` command specifies multiple calculation types separated
by "``|``" like ``MAX|MIN|SUM|AVG``. You can use ``_nsubrecs``
by "``|``" like ``MAX,MIN,SUM,AVG``. You can use ``_nsubrecs``
:doc:`/reference/columns/pseudo` in
:ref:`select-drilldown-output-columns` without specifying ``COUNT`` in
``drilldown_calc_types``. Because ``COUNT`` is always enabled.
Expand Down

0 comments on commit d53c530

Please sign in to comment.