XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None

    Description

      Scalar subquery plans are generated with a count on subquery which is fed to sq_count_check UDF. This is to make sure at runtime that there is at most one row generated by scalar subquery.

      We can avoid generating this extra count for scalar subqueries with aggregates and windowing since such queries are guaranteed to generate at most one row. e.g.

       select * from part where p_size > (select max(p_size) from part) 

      Attachments

        1. HIVE-16330.3.patch
          669 kB
          Vineet Garg
        2. HIVE-16330.2.patch
          455 kB
          Vineet Garg
        3. HIVE-16330.1.patch
          20 kB
          Vineet Garg

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: