-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigation into aggregates, supported operators and multiple enumerable parameters #27948
Comments
Note: Add exception message for ordering in RelationalQuerySqlGenerator. |
This iterates over design in #27931 - Bring back DistinctExpression (yes the token in invalid in some places and incorrect tree will throw invalid SQL error in database - Introduce EnumerableExpression which is a holder/parameter object which contains facets of grouping element chain including Distinct/Predicate/Selector/Ordering - Translators are responsible for putting together pieces from EnumerableExpression to generate a SqlExpression as a result - Remove GroupByAggregateChainProcessor which failed to avoid double visitation. We need to refactor this code in future to avoid it when we implement public API for aggregate functions Resolves #27948 Resolves #27935
This iterates over design in #27931 - Bring back DistinctExpression (yes the token in invalid in some places and incorrect tree will throw invalid SQL error in database - Introduce EnumerableExpression which is a holder/parameter object which contains facets of grouping element chain including Distinct/Predicate/Selector/Ordering - Translators are responsible for putting together pieces from EnumerableExpression to generate a SqlExpression as a result - Remove GroupByAggregateChainProcessor which failed to avoid double visitation. We need to refactor this code in future to avoid it when we implement public API for aggregate functions Resolves #27948 Resolves #27935
This iterates over design in #27931 - Bring back DistinctExpression (yes the token in invalid in some places and incorrect tree will throw invalid SQL error in database - Introduce EnumerableExpression which is a holder/parameter object which contains facets of grouping element chain including Distinct/Predicate/Selector/Ordering - Translators are responsible for putting together pieces from EnumerableExpression to generate a SqlExpression as a result - Remove GroupByAggregateChainProcessor which failed to avoid double visitation. We need to refactor this code in future to avoid it when we implement public API for aggregate functions Resolves #27948 Resolves #27935
This iterates over design in #27931 - Bring back DistinctExpression (yes the token in invalid in some places and incorrect tree will throw invalid SQL error in database - Introduce EnumerableExpression which is a holder/parameter object which contains facets of grouping element chain including Distinct/Predicate/Selector/Ordering - Translators are responsible for putting together pieces from EnumerableExpression to generate a SqlExpression as a result - Remove GroupByAggregateChainProcessor which failed to avoid double visitation. We need to refactor this code in future to avoid it when we implement public API for aggregate functions Resolves #27948 Resolves #27935
@roji Do providers need to take steps to support this, or is this more of an EF Core internal spring cleaning? |
@lauxjpn - Currently, this has just created infrastructure to support aggregate operators. Existing operations - Min/Max/Sum/Average/Count/LongCount, are modified to use this system but still convert to the form we were passing to providers before so it should continue to work. Full support for custom operations is being tracked #22957 which will utilize above infra. So if a provider is doing something specific wrt those 6 default operations, they would need to react. |
I did some further investigation into what's supported across databases in terms of aggregates, operators (distinct/ordering/filtering) and multiple enumerable parameters; this is to help inform @smitpatel's work on custom aggregate support (see #27931, #27935).
tl;dr:
PostgreSQL
MySQL
SQL Server
SQLite
Oracle
Oracle also has JSON_ARRAY_AGG (single enumerable parameter) and JSON_OBJECTAGG (multiple). The former supports an order by clause, the latter does not.
/cc @lauxjpn
The text was updated successfully, but these errors were encountered: