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

Sylvain Lebresne updated CASSANDRA-8139:
----------------------------------------
    Attachment: 8139-2.1.txt

bq. Can you add a test case for this?

I've pushed a 
[dtest|https://github.com/riptano/cassandra-dtest/commit/ad82c465007e738b6a67b448974dcbc71f32c094].

bq. it probably makes more sense to remove the protocol-level restriction of no 
negative timestamps

I agree. And as it's pretty simple, figured it might be worth going ahead with 
that here, so attaching a 2.1 version of the patch that made that change to the 
protocol (which is backward compatible anyway) and add a CQLTester-based unit 
test.


> The WRITETIME function returns null for negative timestamp values
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-8139
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8139
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Richard Bremner
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 2.0.12
>
>         Attachments: 8139-2.1.txt, 8139.txt
>
>
> Insert a column with a negative timestamp value:
> {code}
> INSERT INTO my_table (col1, col2, col3)
> VALUES ('val1', 'val2', 'val3') 
> USING TIMESTAMP -1413614886750020;
> {code}
> Then attempt to read the *writetime*:
> {code}
> SELECT WRITETIME(col3) FROM my_table WHERE col1 = 'val1'
> {code}
> The result is *null*.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to