phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tian.yang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-4069) When use row timestamp table,del row1 by 'delete from table' , and I get failed by upsert row1 into the table.
Date Mon, 07 Aug 2017 09:35:00 GMT

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

tian.yang updated PHOENIX-4069:
-------------------------------
    Description: 
0: jdbc:phoenix:> CREATE TABLE IF NOT EXISTS T1(
. . . . . . . . > C_DAY BIGINT NOT NULL,
. . . . . . . . > C_KEY VARCHAR NOT NULL,
. . . . . . . . > C_VAL BIGINT
. . . . . . . . > CONSTRAINT PK_T1 PRIMARY KEY(C_DAY ROW_TIMESTAMP,C_KEY));
No rows affected (2.467 seconds)
0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
1 row affected (0.013 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+----------------+--------+--------+
|     C_DAY      | C_KEY  | C_VAL  |
+----------------+--------+--------+
| 1502095662895  | A      | 9      |
+----------------+--------+--------+
1 row selected (0.029 seconds)
0: jdbc:phoenix:> DELETE FROM T1;
1 row affected (0.011 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+--------+--------+--------+
| C_DAY  | C_KEY  | C_VAL  |
+--------+--------+--------+
+--------+--------+--------+
No rows selected (0.028 seconds)
0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
1 row affected (0.009 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+--------+--------+--------+
| C_DAY  | C_KEY  | C_VAL  |
+--------+--------+--------+
+--------+--------+--------+
No rows selected (0.027 seconds)
0: jdbc:phoenix:> 

  was:

0: jdbc:phoenix:> CREATE TABLE IF NOT EXISTS T1(
. . . . . . . . > C_DAY BIGINT NOT NULL,
. . . . . . . . > C_KEY VARCHAR NOT NULL,
. . . . . . . . > C_VAL BIGINT
. . . . . . . . > CONSTRAINT PK_T1 PRIMARY KEY(C_DAY ROW_TIMESTAMP,C_KEY));
No rows affected (2.467 seconds)
0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
1 row affected (0.013 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+----------------+--------+--------+
|     C_DAY      | C_KEY  | C_VAL  |
+----------------+--------+--------+
| 1502095662895  | A      | 9      |
+----------------+--------+--------+
1 row selected (0.029 seconds)
0: jdbc:phoenix:> DELETE FROM T1;
1 row affected (0.011 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+--------+--------+--------+
| C_DAY  | C_KEY  | C_VAL  |
+--------+--------+--------+
+--------+--------+--------+
No rows selected (0.028 seconds)
0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
1 row affected (0.009 seconds)
0: jdbc:phoenix:> SELECT * FROM T1;
+--------+--------+--------+
| C_DAY  | C_KEY  | C_VAL  |
+--------+--------+--------+
+--------+--------+--------+
No rows selected (0.027 seconds)
0: jdbc:phoenix:> 

        Summary: When use row timestamp table,del row1  by 'delete  from table' , and I get
failed  by upsert row1 into the table.  (was: When use row timestamp table,del row1  by 'delete
 from table' , then upsert row1 into the table again get failed.)

> When use row timestamp table,del row1  by 'delete  from table' , and I get failed  by
upsert row1 into the table.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4069
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4069
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.10.0
>            Reporter: tian.yang
>
> 0: jdbc:phoenix:> CREATE TABLE IF NOT EXISTS T1(
> . . . . . . . . > C_DAY BIGINT NOT NULL,
> . . . . . . . . > C_KEY VARCHAR NOT NULL,
> . . . . . . . . > C_VAL BIGINT
> . . . . . . . . > CONSTRAINT PK_T1 PRIMARY KEY(C_DAY ROW_TIMESTAMP,C_KEY));
> No rows affected (2.467 seconds)
> 0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
> 1 row affected (0.013 seconds)
> 0: jdbc:phoenix:> SELECT * FROM T1;
> +----------------+--------+--------+
> |     C_DAY      | C_KEY  | C_VAL  |
> +----------------+--------+--------+
> | 1502095662895  | A      | 9      |
> +----------------+--------+--------+
> 1 row selected (0.029 seconds)
> 0: jdbc:phoenix:> DELETE FROM T1;
> 1 row affected (0.011 seconds)
> 0: jdbc:phoenix:> SELECT * FROM T1;
> +--------+--------+--------+
> | C_DAY  | C_KEY  | C_VAL  |
> +--------+--------+--------+
> +--------+--------+--------+
> No rows selected (0.028 seconds)
> 0: jdbc:phoenix:> UPSERT INTO T1 (C_DAY,C_KEY,C_VAL) VALUES (1502095662895,'A',9);
> 1 row affected (0.009 seconds)
> 0: jdbc:phoenix:> SELECT * FROM T1;
> +--------+--------+--------+
> | C_DAY  | C_KEY  | C_VAL  |
> +--------+--------+--------+
> +--------+--------+--------+
> No rows selected (0.027 seconds)
> 0: jdbc:phoenix:> 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message