mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
IMPALA-4730: [DOCS] DISTINCT is allowed with group_concat()
Remove the "DISTINCT not allowed" restriction. Add DISTINCT to syntax. Add an example showing usage of DISTINCT. Change-Id: Ib7d4555a5bc4c4195fa1529d1c1bdf39f98e7346 Reviewed-on: http://gerrit.cloudera.org:8080/7016 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins
This commit is contained in:
committed by
Impala Public Jenkins
parent
f15589573b
commit
45e2329c92
@@ -45,9 +45,7 @@ under the License.
|
||||
|
||||
<p conref="../shared/impala_common.xml#common/syntax_blurb"/>
|
||||
|
||||
<!-- Might allow DISTINCT at some point. Check: does it allow ALL now? -->
|
||||
|
||||
<codeblock>GROUP_CONCAT([ALL] <varname>expression</varname> [, <varname>separator</varname>])</codeblock>
|
||||
<codeblock>GROUP_CONCAT([ALL<ph rev="IMPALA-4730"> | DISTINCT</ph>] <varname>expression</varname> [, <varname>separator</varname>])</codeblock>
|
||||
|
||||
<p conref="../shared/impala_common.xml#common/concat_blurb"/>
|
||||
|
||||
@@ -61,12 +59,6 @@ under the License.
|
||||
<b>Return type:</b> <codeph>STRING</codeph>
|
||||
</p>
|
||||
|
||||
<p conref="../shared/impala_common.xml#common/restrictions_blurb"/>
|
||||
|
||||
<p>
|
||||
You cannot apply the <codeph>DISTINCT</codeph> operator to the argument of this function.
|
||||
</p>
|
||||
|
||||
<p conref="../shared/impala_common.xml#common/analytic_not_allowed_caveat"/>
|
||||
|
||||
<p>
|
||||
@@ -98,6 +90,20 @@ under the License.
|
||||
+---------------------------------+
|
||||
| 1, 3, 2, 1 |
|
||||
+---------------------------------+
|
||||
</codeblock>
|
||||
|
||||
<p rev="IMPALA-4730">
|
||||
Specify the <codeph>DISTINCT</codeph> keyword to eliminate duplicate values from
|
||||
the concatenated result:
|
||||
</p>
|
||||
|
||||
<codeblock rev="IMPALA-4730">
|
||||
[localhost:21000] > select group_concat(distinct s) from t1;
|
||||
+--------------------------+
|
||||
| group_concat(distinct s) |
|
||||
+--------------------------+
|
||||
| three, two, one |
|
||||
+--------------------------+
|
||||
</codeblock>
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user