Do not rename columns twice when aggregating dataTable records #7435
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.
refs #4768
We can assume that columns are already renamed if we have already renamed all columns of all dataTables in a map.
This saves 50-200ms when aggregating records (eg when range date is requested) per record. Depending on the dataTables can save even way more time or a bit less.
I just did some profiling on the demo database where the performance benefit is > 1 second (out of 26 seconds total time)