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

JOIN + LATERAL VIEW + MAPJOIN fails to return result (seems to stop halfway through and no longer do the final reduce part)



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1
    • 0.9.0
    • None
    • None
    • ubuntu - hadoop 0.20.2-cdh3u0 - hive 0.8.1


      Okay first off; I know JOIN + LATERAL VIEW together isn't working so I moved my JOIN into a subquery and that makes the query work properly

      However when I added a MAPJOIN hint for the JOIN in the subquery it will also stop doing the reducer for the main query!
      This only happens when there's a LATERAL VIEW in there though, if I remove the LATERAL VIEW then the main query still get's a reducer to do grouping

      Here's a gist: https://gist.github.com/2499436 Containing the queries and a PHP script which you can run to execute the test case I'm using, which does;

      • setup a database called hive_mapjoin
      • setup tables
      • load some test data
      • do the selects
        You'll need the https://github.com/rcongiu/Hive-JSON-Serde/downloads json-serde-1.1-jar-with-dependencies.jar with it though and change the path
        I guess looking at the queries you guys can probally figure out a better testcase, but maybe it's helpful

      Not sure if this is a bug or me doing something that just isn't supposed to be working, but I can't seem to find any pointers that this wouldn't be supported...

      Here's another gist with the plan.xml: https://gist.github.com/2499658




            Unassigned Unassigned
            ruben.devries Ruben de Vries
            1 Vote for this issue
            4 Start watching this issue