[
https://issues.apache.org/jira/browse/CALCITE-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807059#comment-16807059
]
Julian Hyde commented on CALCITE-683:
-------------------------------------
SqlStdOperatorTable is for standard functions only. We do not have a solid
definition of "standard". It means available in all sessions (i.e. can not be
disabled by preferences) and also implies "is in the SQL standard". But it is
conceivable to have a Calcite-specific operator in the table.
If multiple DBs have a function with the same name and different semantics,
it's OK to just pick one, and declare in the documentation which DB is the
reference implementation.
In this case, the standard has {{LISTAGG}}, which is very similar to
{{STRING_AGG}}. Let's mark this case as a duplicate of CALCITE-2754, and move
discussion there.
> String aggregates
> -----------------
>
> Key: CALCITE-683
> URL: https://issues.apache.org/jira/browse/CALCITE-683
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Priority: Major
>
> Per http://www.sql-workbench.net/comparison/string_aggregates.html, aggregate
> multiple string values to a single value, optionally delimited.
> {code}select d.department_id,
> d.department_name,
> string_agg(e.first_name, ',' order by first_name) as all_employees
> from departments d
> join employees e on d.department_id = e.department_id
> group by d.department_id
> order by d.department_id;
> department_id | department_name | all_employees
>
> --------------+------------------+-------------------------
> 10 | Road consruction | Prostetnic Vogon Jeltz
>
> 20 | Hiking | Arthur, Ford
> 30 | Shipping | Zaphod
> 40 | Engineering | Marvin, Tricia{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)