hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karen Coppage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-20588) Queries INSERT INTO table1 SELECT * FROM table2 LIMIT A, B insert one more row than they should
Date Wed, 12 Dec 2018 13:35:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-20588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718971#comment-16718971
] 

Karen Coppage commented on HIVE-20588:
--------------------------------------

I wasn't able to reproduce this issue, are you able to reproduce it [~jmarhuen]?

> Queries INSERT INTO table1 SELECT * FROM table2 LIMIT A, B insert one more row than they
should
> -----------------------------------------------------------------------------------------------
>
>                 Key: HIVE-20588
>                 URL: https://issues.apache.org/jira/browse/HIVE-20588
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Jaume M
>            Priority: Critical
>
> {code}
> 0: jdbc:hive2://hs2.example.com:10005/> CREATE TABLE atest1 (foo BIGINT, bar STRING);
> No rows affected (0.199 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> INSERT INTO atest1 VALUES (1, "1"),(2, "2"),(3,
"3");
> No rows affected (8.209 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> CREATE TABLE atest2 (foo BIGINT, bar STRING);
> No rows affected (0.156 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> INSERT INTO atest2 SELECT * FROM atest1 LIMIT
1;
> No rows affected (8.205 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> SELECT COUNT(*) FROM atest2;
> +------+
> | _c0  |
> +------+
> | 1    |
> +------+
> 1 row selected (0.133 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> TRUNCATE TABLE atest2;
> No rows affected (0.14 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> INSERT INTO atest2 SELECT * FROM atest1 LIMIT
1,1;
> No rows affected (8.19 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/> SELECT COUNT(*) FROM atest2;
> +------+
> | _c0  |
> +------+
> | 2    |
> +------+
> 1 row selected (0.129 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/>
> 0: jdbc:hive2://hs2.example.com:10005/> SELECT * FROM atest1 LIMIT 1,1;
> +-------------+-------------+
> | atest1.foo  | atest1.bar  |
> +-------------+-------------+
> | 2           | 2           |
> +-------------+-------------+
> 1 row selected (0.197 seconds)
> 0: jdbc:hive2://hs2.example.com:10005/>
> {code}
> When two arguments are specified for limit one more row than it should is being inserted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message