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

Duplicate row retured using Order by, Limit and Offset

    XMLWordPrintableJSON

Details

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

    Description

      Create an example table: 

      create table t1(f1 int);
      insert into t1 values(111),(222),(333),(444),(555),(666),(777),(888),(999); 

       

      Query using order by, limit, offset. Page 1 is correct: 

      select * from t1 order by f1 limit 0,3;
      
      +---------+
      | t1.f1   |
      +---------+
      | 111     |
      | 222     |
      | 333     |
      +---------+

       

      But there is an duplicate row `333` on page 2: 

      select * from t1 order by f1 limit 3,3;
      
      +---------+
      | t1.f1   |
      +---------+
      | 333     |
      | 444     |
      | 555     |
      +---------+  
      
      

      set hive.vectorized.execution.reduce.enabled=false does not cause the problem.

       

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jimmydeng jimmydeng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: