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

Geoffrey Jacoby updated PHOENIX-792:
------------------------------------
    Attachment:     (was: 198416324-4ede2959-0d83-4f64-80e1-5d975d235a13.jpg)

> Support UPSERT SET command
> --------------------------
>
>                 Key: PHOENIX-792
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-792
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: James R. Taylor
>            Assignee: thrylokya
>
> Support setting values in a table through a new UPSERT SET command like this:
>     UPSERT my_table SET title = 'CEO'
>     WHERE name = 'John Doe'
>     UPSERT my_table SET pay_by_quarter = ARRAY[25000,25000,27000,27000]
>     WHERE name = 'Carol';
>     UPSERT my_table SET pay_by_quarter[4] = 15000
>     WHERE name = 'Carol';
> This would essentially be syntactic sugar and use the same UpsertCompiler, 
> mapping to an UPSERT SELECT command that simply fills in the primary key 
> columns like this:
>     UPSERT FROM my_table(name,title) 
>     SELECT name,'CEO' FROM my_table
>     WHERE name = 'John Doe'
>     UPSERT FROM my_table(name, pay_by_quarter[4]) 
>     SELECT name,15000 FROM my_table
>     WHERE name = 'Carol';



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

Reply via email to