[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb'; hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW
[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP,
[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):054:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a
[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):054:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a
[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):054:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3}ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3}ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C,
[jira] [Updated] (PHOENIX-5889) row_timestamp wrong column values for on duplicate key update
[ https://issues.apache.org/jira/browse/PHOENIX-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mariusz Szpatuśko updated PHOENIX-5889: --- Description: {code:java} CREATE TABLE STORE.TEST1(CREATE TABLE STORE.TEST1(eventStartTimestamp timestamp not null,val1 varchar, val2 varcharCONSTRAINT pk PRIMARY KEY (eventStartTimestamp desc ROW_TIMESTAMP))VERSIONS=1, DATA_BLOCK_ENCODING='FAST_DIFF', COMPRESSION='SNAPPY',BLOOMFILTER='ROW', UPDATE_CACHE_FREQUENCY=90, SALT_BUCKETS=32; hbase(main):054:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=102275101, value=b 1 row(s) in 0.0340 seconds upsert into store.test1(EVENTSTARTTIMESTAMP, VAL2) values('2002-05-30 09:30:10','test222') on duplicate key update val1='testa',val2='testb';hbase(main):058:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=1589202202193, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=1589202202193, value=testa \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0C, timestamp=1589202202193, value=testb 1 row(s) in 0.0510 seconds {code} when data is upserted and after that updated for the same key timestamp is updated also. means on duplicate keys deoesn work for row_timestamp {code:java} select * from store.test1 where eventstarttimestamp scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL0 row(s) in 0.0520 seconds hbase(main):037:0> describe 'STORE.TEST1'Table STORE.TEST1 is ENABLEDSTORE.TEST1, {TABLE_ATTRIBUTES => {coprocessor$1 => '|org.apache.phoenix.coprocessor.ScanRegionObserver|805306366|', coprocessor$2 => '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|805306366|', coprocessor$3 => '|org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver|805306366|', coprocessor$4 => '|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|805306366|', coprocessor$5 => '|org.apache.phoenix.hbase.index.IndexRegionObserver|805306366|org.apache.hadoop.hbase.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec,index.builder=org.apache.phoenix.index.PhoenixIndexBuilder'}COLUMN FAMILIES DESCRIPTION{NAME => '0', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'FAST_DIFF', TTL => 'FOREVER', COMPRESSION => 'SNAPPY', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} UPSERT INTO STORE.TEST1(EVENTSTARTTIMESTAMP, VAL1, VAL2) values ('2002-05-30 09:30:10','a','b'); {code} For table with row_timestamp key {code:java} hbase(main):055:0> scan 'STORE.TEST1',{RAW=>true,VERSIONS=>3} ROW COLUMN+CELL \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x00\x00\x00\x00, timestamp=102275101, value=x \x1A\x7F\xFF\xFF\x11\xDFJ\x13/\xFF\xFF\xFF\xFF column=0:\x80\x0B, timestamp=102275101, value=a