Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • Logical Optimizer

    Description

      HIVE currently tranform subqueries into SEMI-JOIN or LEFT OUTER JOIN. This transformation occurs on query AST before generating logical plan. These transformations are described at Link to original spec . Such transformations aren't able to handle a lot of subqueries, as a result HIVE imposes various restrictions on the type of queries it could handle e.g. Hive disallows nested subqueries. All current restrictions are detailed in above linked document.

      This patch is 1st phase of getting rid of these transformations and leverage Calcite's functionality to plan such queries.
      Next phases will be lifting restrictions one by one.

      Note that this patch already lifts one restriction Restriction.6.m (The LHS in a SubQuery must have all its Column References be qualified)

      Known issues with this patch are:

      • Return path tests fails for various reasons and are currently disabled. We plan to fix and re-enable this later.
      • Semi-join optimization (HIVE-15227) is disabled by default as it doesn't work with this patch. We plan to fix this and re-enable it by default.

      Attachments

        1. HIVE-15192.10.patch
          1.95 MB
          Vineet Garg
        2. HIVE-15192.2.patch
          726 kB
          Vineet Garg
        3. HIVE-15192.3.patch
          1.60 MB
          Vineet Garg
        4. HIVE-15192.4.patch
          1.60 MB
          Vineet Garg
        5. HIVE-15192.5.patch
          1.75 MB
          Vineet Garg
        6. HIVE-15192.6.patch
          1.95 MB
          Vineet Garg
        7. HIVE-15192.7.patch
          1.98 MB
          Vineet Garg
        8. HIVE-15192.8.patch
          1.98 MB
          Vineet Garg
        9. HIVE-15192.9.patch
          1.98 MB
          Vineet Garg
        10. HIVE-15192.patch
          624 kB
          Vineet Garg

        Issue Links

          Activity

            People

              vgarg Vineet Garg
              vgarg Vineet Garg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: