[MCOL-1698] Add Distinct capability to specific UDAnF Window Functions Created: 2018-09-06  Updated: 2018-12-10  Resolved: 2018-12-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.1.5
Fix Version/s: 1.1.7

Type: New Feature Priority: Major
Reporter: David Hall (Inactive) Assignee: David Hall (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MCOL-1697 UDAF with DISTINCT Closed
Sprint: 2018-17, 2018-18, 2018-19, 2018-20, 2018-21

 Description   

Currently, there's no way to create a UDAnF that creates a DISTINCT result. The parser won't pass DISTINCT when an aggregate is used as an analytic function.

This ticket is to add a DISTINCT flag to the UDAnF context so that a UDAnF can be created that is always DISTINCT. It's also possible to create a multi-parm aggregate that could use one of the parameters to indicate distinctness.

This ticket does not cover the case of UDAF – the use of a function as an aggregate, not a Window Function.

UDAnF created with this feature should have the UDAF_OVER_REQUIRED flag set in the runflags, as the distinctness would be ignored by aggregate use and would definitely confuse a user.



 Comments   
Comment by David Hall (Inactive) [ 2018-12-10 ]

This was merged in 1.1.6 and there is no more work to do. The purpose of this feature is to implement the distinct_count() aggregate function because Server can't parse DISTINCT on UDF. When it does, this feature will be used to handle that as well.

For use as an Aggregate, the DISTINCT functionality will need to be added to the Aggregate UDAF logic, which it currently isn't. At least I don't think it would work.

Comment by David Hall (Inactive) [ 2018-12-10 ]

Closing because this has been in the release for a while already.

Generated at Thu Feb 08 02:30:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.