You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QUERY: select array_agg(unique1) from (select unique1 from tenk1 where unique1 < 15 order by unique1) ss;
QUERY: select array_agg(ten) from (select ten from tenk1 where unique1 < 15 order by unique1) ss;
QUERY: select array_agg(unique1) from tenk1 where unique1 < -15;
Footnotes
These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct. ↩
The reason will be displayed to describe this comment to others. Learn more.
My biggest questions revolve around how this extends off of GMS. Looking at the documentation, it looks like aggregate functions are composed of two internal functions. One that updates some internal state, and another that "finalizes" it. In all, that seems like a simpler abstraction than this, since it should work with all of the overload resolution logic and everything else. It would just be an extension on our existing CompiledFunction.
It's something we'll have to do anyway to support CREATE AGGREGATE, and it seems simpler overall, but perhaps you've already looked into this and it's not as straightforward as it seems, so would love to get your opinions on that.
My biggest questions revolve around how this extends off of GMS. Looking at the documentation, it looks like aggregate functions are composed of two internal functions. One that updates some internal state, and another that "finalizes" it. In all, that seems like a simpler abstraction than this, since it should work with all of the overload resolution logic and everything else. It would just be an extension on our existing CompiledFunction.
It's something we'll have to do anyway to support CREATE AGGREGATE, and it seems simpler overall, but perhaps you've already looked into this and it's not as straightforward as it seems, so would love to get your opinions on that.
My main thought is that I want to unify the aggregation planning between GMS and Doltgres. If we need to make changes to GMS to accommodate user-defined aggregations that's fine, but I don't think we need to re-write the GMS planning / execution just to get built-in postgres aggregates working. I think we can get a long way without supporting user-defined aggregates. I want to evolve this integration over time so we have a single aggregate abstraction, planning mode, and execution strategy driven by GMS. I can buy that postgres's internal way of updating aggregate func state is the right way forward, but I don't want to unify those models just yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other aggregate functions will require type overload resolution logic that this first function, array_agg, does not.
Also not yet supported: the
ORDER BYclause in the function, e.g.:array_agg ( anyarray ORDER BY input_sort_columns )Relies on dolthub/go-mysql-server#2992