Skip to content
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

Query : Add support for final GroupBy operator #28972

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Conversation

smitpatel
Copy link
Member

Resolves #19929

object IEnumerator.Current
=> Current!;

public bool MoveNext()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any potential to DRY across the different querying enumerables (in the future)? If so maybe a tracking issue...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core enumerators have different mechanism to iterate wrt related data and grouping. There can be some refactoring to introduce hierarchy though it could have some perf impact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i agree we don't want to regress perf for this. Just something to think about for the future in case it's relevant.

// It should be only at top-level otherwise GroupBy won't be final operator.
// Cloning skips it altogether (we don't clone top level with GroupBy)
// Pushdown should null it out as if GroupBy was present was pushed down.
private List<(ColumnExpression Column, ValueComparer Comparer)>? _preGroupByIdenifier;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private List<(ColumnExpression Column, ValueComparer Comparer)>? _preGroupByIdenifier;
private List<(ColumnExpression Column, ValueComparer Comparer)>? _preGroupByIdentifier;

// This indicates that GroupBy was not condensed out of grouping operator.
throw new InvalidOperationException(CoreStrings.TranslationFailed(query.Print()));
}
if (!(groupByNavigationExpansionExpression.Source is MethodCallExpression methodCallExpression
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not

@@ -134,6 +134,9 @@
<value>Transactions are not supported by the in-memory store. See http://go.microsoft.com/fwlink/?LinkId=800142</value>
<comment>Warning InMemoryEventId.TransactionIgnoredWarning</comment>
</data>
<data name="NoncomposedGroupByNotSupported" xml:space="preserve">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
<data name="NoncomposedGroupByNotSupported" xml:space="preserve">
<data name="NonComposedGroupByNotSupported" xml:space="preserve">

@smitpatel smitpatel merged commit 82e5277 into release/7.0 Sep 12, 2022
@smitpatel smitpatel deleted the smit/whygroupby branch September 12, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query: Support GroupBy when it is final operator
2 participants