Skip to content

[6.40] Allow I/O of interpreted class if the underlying data format allows#22303

Open
root-project-bot wants to merge 1 commit into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22234
Open

[6.40] Allow I/O of interpreted class if the underlying data format allows#22303
root-project-bot wants to merge 1 commit into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22234

Conversation

@root-project-bot
Copy link
Copy Markdown

Backport of #22234, requested by @vepadulano.

RDataFrame needs the type_info of input column types to create the column readers. This is searched first in a map of known simple types, then through TClass. Sometimes TClass might not know about a type_info even though it's available to the interpreter. This is the case for example of runtime-generated classes that are declared to the interpreter but do not have a dictionary, in which case `tclass->IsLoaded()` will return false and the TClass will not expose the type_info but the interpreter knows about it.

This commit proposes to extend the search in RDataFrame to include also a call to the interpreter in case the RTTI cannot be found through TClass.

This removes a long-standing safeguard introduced in RDataFrame that would prevent users from trying to Snapshot a column if the type had no dictionary. But both TTree and RNTuple support this to different degrees. By removing the safeguard and searching querying the interpreter for the RTTI RDataFrame delegates responsability to the underlying I/O technology.

As a side effect, this also helps in the integration with awkward arrays, where a C++ type is generated per different awkward array layout at runtime in the Python application. The awkward data source is still responsible to communicate correctly to TTree or RNTuple what they should store to disk when a Snapshot is called.

(cherry picked from commit 33b7a3c)
@github-actions
Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 11h 52m 20s ⏱️
 3 855 tests  3 855 ✅ 0 💤 0 ❌
77 029 runs  77 029 ✅ 0 💤 0 ❌

Results for commit ea220e8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants