cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13185) cqlsh COPY doesn't support dates before 1900 or after 9999
Date Tue, 21 Feb 2017 14:12:44 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-13185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876034#comment-15876034
] 

Stefania commented on CASSANDRA-13185:
--------------------------------------

I think the only problem is that {{strftime()}} cannot format dates before 1900. I wrote a
test [here|https://github.com/riptano/cassandra-dtest/pull/1445] and, dates after 9999 are
already exported as milliseconds since the epoch. The patch attached does the same for dates
before 1900, since they cannot be formatted by {{strftime()}}. 

Cqlsh COPY is already capable of importing dates as milliseconds from the epoch, this is the
fallback in case the date cannot be parsed.

||3.0||3.11||trunk||
|[patch|https://github.com/stef1927/cassandra/tree/13185-cqlsh-3.0]|[patch|https://github.com/stef1927/cassandra/tree/13185-cqlsh-3.11]|[patch|https://github.com/stef1927/cassandra/tree/13185-cqlsh]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13185-cqlsh-3.0-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13185-cqlsh-3.11-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13185-cqlsh-cqlsh-tests/]|

The same patch applies cleanly to all branches since 3.0.

[~thobbs] are you OK to review this?


> cqlsh COPY doesn't support dates before 1900 or after 9999
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-13185
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13185
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Tyler Hobbs
>            Assignee: Stefania
>             Fix For: 3.0.x, 3.11.x
>
>
> Although we fixed this problem for standard queries in CASSANDRA-10625, it still exists
for COPY.  In CASSANDRA-10625, we replaced datetimes outside of the supported time range with
a simple milliseconds-since-epoch long.  We may not want to use the same solution for COPY,
because we wouldn't be able to load the same data back in through COPY.  Having consistency
in the format of values and support for loading exported data seems more important for COPY.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message