Skip to content

Query : Add support for final GroupBy operator#28972

Merged
smitpatel merged 1 commit intorelease/7.0from
smit/whygroupby
Sep 12, 2022
Merged

Query : Add support for final GroupBy operator#28972
smitpatel merged 1 commit intorelease/7.0from
smit/whygroupby

Conversation

@smitpatel
Copy link
Contributor

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
Contributor 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

<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