[
https://issues.apache.org/jira/browse/PHOENIX-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabriel Reid resolved PHOENIX-498.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by
first re-opening all closed imported issues and then resolving them in bulk.
> LIMIT not working for upsert select
> -----------------------------------
>
> Key: PHOENIX-498
> URL: https://issues.apache.org/jira/browse/PHOENIX-498
> Project: Phoenix
> Issue Type: Task
> Reporter: yl00610
> Labels: bug
>
> Looks like limit is not working for upsert select statement.
> As for below test case, all rows hit by condition "id <= 'bbb'" are updated,
> rather than expected limit - one. Am I writing the SQL in the wrong way or is
> it a bug?
> Using phoenix 1.2.1:
> create table phoenix_test (id varchar(10) not null primary key, value
> varchar(10), ts timestamp);
> upsert into phoenix_test values ('aaa', 'abc', current_date());
> upsert into phoenix_test values ('bbb', 'bcd', current_date());
> upsert into phoenix_test values ('ccc', 'cde', current_date());
> select * from phoenix_test;
> ID|VALUE|TS
> aaa|abc|2013-08-12 14:57:36.768
> bbb|bcd|2013-08-12 14:57:37.302
> ccc|cde|2013-08-12 14:57:37.838
> upsert into phoenix_test (id, ts) select id, null from phoenix_test where id
> <= 'bbb' limit 1;
> select * from phoenix_test;
> ID|VALUE|TS
> aaa|abc|
> bbb|bcd|
> ccc|cde|2013-08-12 14:57:37.838
--
This message was sent by Atlassian JIRA
(v6.2#6252)