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

CBO trunk merge: union11 test fails due to incorrect plan

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: None
    • Labels:


      The result changes to as if the union didn't have count() inside. The issue can be fixed by using srcunion.value outside the subquery in count (replace count(1) with count(srcunion.value)). Otherwise, it looks like count(1) node from union-ed queries is not present in AST at all, which might cause this result.

      Interestingly, adding group by to each query in a union produces completely weird result (count(1) is 309 for each key, whereas it should be 1 and the "logical" incorrect value if internal count is lost is 500) Nm, that groups by table column called key, which is weird but is what Hive does


        1. HIVE-8225.inprogress.patch
          16 kB
          Sergey Shelukhin
        2. HIVE-8225.inprogress.patch
          16 kB
          Sergey Shelukhin
        3. HIVE-8225.patch
          24 kB
          Sergey Shelukhin
        4. HIVE-8225.1.patch
          11 kB
          Pengcheng Xiong
        5. HIVE-8225.2.patch
          10 kB
          Pengcheng Xiong
        6. HIVE-8225.3.patch
          15 kB
          Pengcheng Xiong
        7. HIVE-8225.4.patch
          15 kB
          Pengcheng Xiong
        8. HIVE-8225.5.patch
          15 kB
          Pengcheng Xiong
        9. HIVE-8225.6.patch
          15 kB
          Pengcheng Xiong
        10. HIVE-8225.7.patch
          15 kB
          Pengcheng Xiong
        11. HIVE-8225.8.patch
          15 kB
          Pengcheng Xiong

        Issue Links


          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users


            • Assignee:
              pxiong Pengcheng Xiong Assign to me
              sershe Sergey Shelukhin


              • Created:

                Issue deployment