Skip to content

Commit aecc926

Browse files
committed
[DF] fix accesing RNTuple R_rdf_sizeof_ columns as size_t
1 parent 5c70e13 commit aecc926

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tree/dataframe/src/RNTupleDS.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <ROOT/RNTupleDS.hxx>
2222
#include <ROOT/RNTupleTypes.hxx>
2323
#include <ROOT/RPageStorage.hxx>
24+
#include <ROOT/StringUtils.hxx>
2425
#include <string_view>
2526

2627
#include <TError.h>
@@ -517,6 +518,12 @@ ROOT::RFieldBase *ROOT::RDF::RNTupleDS::GetFieldWithTypeChecks(std::string_view
517518
return fProtoFields[index].get();
518519
}
519520

521+
if (tid == typeid(std::size_t) && ROOT::StartsWith(fProtoFields[index]->GetFieldName(), "R_rdf_sizeof_")) {
522+
// The R_rdf_sizeof columns should always be accessible as std::sizeof, even of there normalized integer type
523+
// differs (e.g., "unsigned long" vs. "unsigned long long")
524+
return fProtoFields[index].get();
525+
}
526+
520527
// The user explicitly requested a type
521528
const auto requestedType = ROOT::Internal::GetRenormalizedTypeName(ROOT::Internal::RDF::TypeID2TypeName(tid));
522529

0 commit comments

Comments
 (0)