You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "jimmydeng (Jira)" <ji...@apache.org> on 2023/05/15 08:24:00 UTC

[jira] [Updated] (HIVE-27342) Duplicate row retured using Order by, Limit and Offset

     [ https://issues.apache.org/jira/browse/HIVE-27342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jimmydeng updated HIVE-27342:
-----------------------------
    Description: 
Create an example table: 
{code:java}
create table t1(f1 int);
insert into t1 values(111),(222),(333),(444),(555),(666),(777),(888),(999); {code}
 

Query using order by, limit, offset. Page 1 is correct: 
{code:java}
select * from t1 order by f1 limit 0,3;

+---------+
| t1.f1   |
+---------+
| 111     |
| 222     |
| 333     |
+---------+{code}
 

But there is an duplicate row `333` on page 2: 
{code:java}
select * from t1 order by f1 limit 3,3;

+---------+
| t1.f1   |
+---------+
| 333     |
| 444     |
| 555     |
+---------+  

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

 

 

 

 

 

  was:
Create an example table: 

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

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

 
{code:java}
select * from t1 order by f1 limit 0,3;

+---------+
| t1.f1   |
+---------+
| 111     |
| 222     |
| 333     |
+---------+{code}
But there is an duplicate row `333` on page 2: 

 

 
{code:java}
select * from t1 order by f1 limit 3,3;

+---------+
| t1.f1   |
+---------+
| 333     |
| 444     |
| 555     |
+---------+  

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

 

 

 

 

 


> Duplicate row retured using Order by, Limit and Offset
> ------------------------------------------------------
>
>                 Key: HIVE-27342
>                 URL: https://issues.apache.org/jira/browse/HIVE-27342
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: jimmydeng
>            Priority: Major
>
> Create an example table: 
> {code:java}
> create table t1(f1 int);
> insert into t1 values(111),(222),(333),(444),(555),(666),(777),(888),(999); {code}
>  
> Query using order by, limit, offset. Page 1 is correct: 
> {code:java}
> select * from t1 order by f1 limit 0,3;
> +---------+
> | t1.f1   |
> +---------+
> | 111     |
> | 222     |
> | 333     |
> +---------+{code}
>  
> But there is an duplicate row `333` on page 2: 
> {code:java}
> select * from t1 order by f1 limit 3,3;
> +---------+
> | t1.f1   |
> +---------+
> | 333     |
> | 444     |
> | 555     |
> +---------+  
> {code}
> set hive.vectorized.execution.reduce.enabled=false does not cause the problem.
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)