Repository navigation
Conversation
vepadulano
left a comment
There was a problem hiding this comment.
Thanks for the proposed fix! I do not think this is the right approach: it introduces two new virtual methods (one in RDefineBase, one in RColumnReaderBase) which will need to be kept up to date and in sync with future changes. This should be done with care in general and in this case I don't think it's necessary. The RDefineReader should be able to just tell whether it's available or not. Also, I don't yet understand the premise of the changes: the availability of a reader is a responsibility of the reader itself, the recursiveness was so far not considered. Together with this, a Define is by its own nature always available, so I don't really see where the problem stems from. Will try to read more carefully the reproducer and let you know if my intuition changes.
This Pull request:
Changes or fixes:
Adds a separate availability-checking mechanism for
Definecolumns without triggering their evaluation.Previously,
FilterAvailable()used theTryGet()function to check whether a column entry was available. ForDefinecolumns, this triggered the evaluation of theDefineexpression. If any of the dependencies of said column were missing, this would throw an exception.This PR adds a separate function
IsAvailable()that checks the availability of a column's dependencies recursively without triggering the evaluation of anyDefineexpression. Normal behaviour forDefineevaluation and its exception-handling is still there.Checklist:
This PR, coupled with PR #23729 (review pending), fixes the
TTreecase of issue #22759.