Skip to content

Conversation

@alex-kulakov
Copy link
Contributor

In case of GroupBy there are several SQL queries

  1. The main query that gets the groups
  2. Additional queries, one per group, that request the group content

RedundantColumnRemover does not take into account additional queries and in case of Query.Store() operation it could remove columns that additional queries can use. (see the test class for query example)

The PR makes column optimization to treat all the columns of Query.Store() operation as used when grouping is applied. This prevents columns from being removed from Temporary table and additional queries will work as intended.

Additionally, it formats some code and improves .ToList()/.ToArray() operations within ColumnMappingInspector (base class for RedundantColumnRemover)

@alex-kulakov alex-kulakov changed the title RedundantColumnRemover no longer remove StoreProvider columns for groupings RedundantColumnRemover no longer removes StoreProvider's columns for groupings Jan 27, 2021
AlexUstinov
AlexUstinov previously approved these changes Jan 29, 2021
@alex-kulakov alex-kulakov merged commit 8926132 into 6.0 Jan 29, 2021
@alex-kulakov alex-kulakov deleted the redundantcolumnremover-removes-store-columns branch January 29, 2021 11:43
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.

3 participants