Yes, the documentation doesn't reflect the recent changes. Please see https://issues.apache.org/jira/browse/PHOENIX-3925
Thanks, Sergey On Fri, Jun 1, 2018 at 5:39 PM, Miles Spielberg <mi...@box.com> wrote: > From https://phoenix.apache.org/atomic_upsert.html: > > Although global indexes on columns being atomically updated are supported, >> it’s not recommended as a potentially a separate RPC across the wire would >> be made while the row is under lock to maintain the secondary index. > > > But the parser on 4.13.1 doesn't seem to agree: > > 0: jdbc:phoenix:thin:url=http://192.168.99.10> CREATE TABLE T1 (A VARCHAR > PRIMARY KEY, B VARCHAR); > > No rows affected (1.299 seconds) > > 0: jdbc:phoenix:thin:url=http://192.168.99.10> CREATE INDEX T1_B ON T1(B); > > No rows affected (6.285 seconds) > > 0: jdbc:phoenix:thin:url=http://192.168.99.10> UPSERT INTO T1(A,B) > VALUES('hello', 'world') ON DUPLICATE KEY IGNORE; > > Error: Error -1 (00000) : Error while executing SQL "UPSERT INTO T1(A,B) > VALUES('hello', 'world') ON DUPLICATE KEY IGNORE": Remote driver error: > RuntimeException: java.sql.SQLException: ERROR 1224 (42Z24): The ON > DUPLICATE KEY clause may not be used when a table has a global index. > tableName=T1 -> SQLException: ERROR 1224 (42Z24): The ON DUPLICATE KEY > clause may not be used when a table has a global index. tableName=T1 > (state=00000,code=-1) > > 0: jdbc:phoenix:thin:url=http://192.168.99.10> > > Am I doing something wrong here? Is the documentation inaccurate? > > > Miles Spielberg > Staff Software Engineer > > > O. 650.485.1102 > 900 Jefferson Ave > <https://maps.google.com/?q=900+Jefferson+Ave+%0D%0A%0D%0ARedwood+City+,+CA+94063&entry=gmail&source=g> > Redwood City, CA 94063 > <https://maps.google.com/?q=900+Jefferson+Ave+%0D%0A%0D%0ARedwood+City+,+CA+94063&entry=gmail&source=g> >