Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15235

sortmergejoin can produce incorrect plan wrt dummy operators, and NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The relevant fragment of the reduce plan of a Tez job is as follows:

      <MERGEJOIN>Id =13
                        <Children>
                          <SEL>Id =12
                            <Children>
                              <MAPJOIN>Id =10
                                <Children>
      ...
                                <\Children>
                                <Parent>Id = 12 nullId = 9 
                              <HASHTABLEDUMMY>Id =9
                                <Children>null
                                <\Children>
                                <Parent><\Parent>
                              <\HASHTABLEDUMMY><\Parent>
                              <\MAPJOIN>
                            <\Children>
                            <Parent>Id = 13 null<\Parent>
                          <\SEL>
                        <\Children>
      

      When sortmergejoin is enabled, during initialization, dummy operators are not initialized (presumably, they are not present in the work); that results in MapJoin not being initialized, even though its proper parent is.
      Manifests as an NPE

      Caused by: java.lang.NullPointerException
      at org.apache.hadoop.hive.ql.exec.MapJoinOperator.process(MapJoinOperator.java:350)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sershe Sergey Shelukhin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: