[
https://issues.jboss.org/browse/TEIID-1560?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-1560:
---------------------------------------
A first step in this is to make aggregate functions loose their special parsing status so
that the function logic may also be used for aggregates. This is actually quite involved.
To facilitate this (and to start closing the gap between our language objects and
pushdown objects) the following changes have been made:
SelectSymbol->Expression
SingleElementSymbol->Expression
This simplifies planning logic which largely does not care whether expressions are named.
This simplification however also includes a change to how anonymous expressions are named.
Rather than pushing logic into the parser, unnamed select expressions are named exprX
where X is their select position. I would also be open to using a truncated form of the
column (most other dbs do this). This can be a breaking change if the user was relying on
the default name - as the previously generated names started with expr, then expr1, max,
then max1, etc. Since default names are not covered by the standard however, it is
non-standard behavior to rely on those names. The engine doesn't actually validate
view symbol names - it expects a positional mapping so a VDB that was relying on a
non-standard transformation - e.g. SELECT 1, would still work. But would require change
either the view column name or the SQL to SELECT 1 AS expr in Designer (as Designer
expects both positions and names to match).
The canonical name concept was also removed. There is no value in carrying around 3 forms
of a name (the resolved name, the canonical name, and the output name). Once resolved the
name of a symbol is the canonical name.
Add support for user defined / pushdown aggregate functions
-----------------------------------------------------------
Key: TEIID-1560
URL:
https://issues.jboss.org/browse/TEIID-1560
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.0
Add support for user defined aggregate functions. This would also affect the function
model metadata. Our aggregate handling logic will need to be generalized to make this
possible. Starting with the parser we've got special handling for built-in
aggregates.
for user defined aggregate handling just a static method will not work as the function
needs to retain state across each group. Could require that the implementing class
extends AggregateFunction.
Could also allow user defined aggregates to take an order by clause.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira