Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9418

[TDF] Cannot use Range before a Define with a string expression

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.14/00, 6.16/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux

      Description

      Reproducer:

      #include <ROOT/TDataFrame.hxx>
       
      using TDF = ROOT::Experimental::TDataFrame;
       
      int main(){
       
         auto fileName = "ranges.root";
         auto treeName = "events";
         
         TDF d(treeName, fileName);
         
         auto d_0_30 = d.Range(0, 30)
                                   .Define("b3", "b1 + b2")
         return 0;
       
      }
      

      Fails at compile time:

      /build/jenkins/workspace/root-nightly-v6-14-00-patches/BUILDTYPE/Release/COMPILER/gcc62/LABEL/slc6/build/include/ROOT/TDFInterface.hxx: In instantiation of ‘ROOT::Experimental::TDF::TInterface<Proxied, DataSource>::TInterfaceJittedDefine ROOT::Experimental::TDF::TInterface<Proxied, DataSource>::Define(std::string_view, std::string_view) [with Proxied = ROOT::Detail::TDF::TRange<ROOT::Detail::TDF::TLoopManager>; DataSource = void; ROOT::Experimental::TDF::TInterface<Proxied, DataSource>::TInterfaceJittedDefine = ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TRangeBase>; typename decltype (ROOT::Internal::TDF::UpcastNode(((ROOT::Experimental::TDF::TInterface<Proxied, DataSource>*)(void)0)->ROOT::Experimental::TDF::TInterface<Proxied, DataSource>::fProxiedPtr))::element_type = ROOT::Detail::TDF::TRangeBase; std::string_view = std::experimental::__ROOT::basic_string_view<char>]’:
      range.cxx:15:42:   required from here
      /build/jenkins/workspace/root-nightly-v6-14-00-patches/BUILDTYPE/Release/COMPILER/gcc62/LABEL/slc6/build/include/ROOT/TDFInterface.hxx:348:14: error: could not convert ‘newInterface’ from ‘ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TRange<ROOT::Detail::TDF::TLoopManager>, void>’ to ‘ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TRange<ROOT::Detail::TDF::TLoopManager>, void>::TInterfaceJittedDefine {aka ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TRangeBase>}’
             return newInterface;
                    ^~~~~~~~~~~~
      

        Attachments

          Activity

            People

            Assignee:
            eguiraud Enrico Guiraud
            Reporter:
            jcervant Javier Cervantes Villanueva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual End: