Fix issue with Redefine, expand test coverage#8859
Merged
eguiraud merged 3 commits intoroot-project:masterfrom Aug 19, 2021
Merged
Fix issue with Redefine, expand test coverage#8859eguiraud merged 3 commits intoroot-project:masterfrom
eguiraud merged 3 commits intoroot-project:masterfrom
Conversation
Before this commit, we were not testing the case of a Redefine that overrides a previous Define where the Define also needs to read some input column.
|
Starting build on |
1 task
|
Build failed on ROOT-performance-centos8-multicore/default. Failing tests: |
|
Starting build on |
Before the introduction of `Redefine`, `RDefine::InitSlot` did not recursively call `InitSlot` on its table of defined columns because it was guaranteed that some other action of filter would do it if that defined column was ever to be used. With the introduction of `Redefine`, the only user of a `RDefine` might be another `RDefine` (`RDefine` serves as the workhorse of both `Define`s and `Redefine`s), so we have to trigger the recursive call to `InitSlot` from `RDefine` as well. This fixes root-project#8857.
etejedor
reviewed
Aug 19, 2021
| { | ||
| if (!fIsInitialized[slot]) { | ||
| for (auto &define : fDefines.GetColumns()) | ||
| define.second->InitSlot(r, slot); |
Contributor
There was a problem hiding this comment.
Could the InitSlot call still be done from an action or Filter too as it was before? Is that a problem?
Contributor
Author
There was a problem hiding this comment.
sure, and it should not be a problem
etejedor
approved these changes
Aug 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Before the introduction of
Redefine,RDefine::InitSlotdid notrecursively call
InitSloton its table of defined columns becauseit was guaranteed that some other action of filter would do it if
that defined column was ever to be used.
With the introduction of
Redefine, the only user of aRDefinemight be another
RDefine(RDefineserves as the workhorse of bothDefines andRedefines), so we have to trigger the recursive callto
InitSlotfromRDefineas well.This PR fixes #8857 .