[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154453#comment-15154453 ] Paulo Motta commented on CASSANDRA-10625: - Tests look good, marking as ready to commit. > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Assignee: Adam Holmberg >Priority: Minor > Fix For: 3.0.x, 3.x > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1514#comment-1514 ] Paulo Motta commented on CASSANDRA-10625: - bq. How about a single warning, the first time it happens? Sounds good! Will mark as ready to commit when CI is happy: ||3.0||trunk|| |[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-10625]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-10625]| |[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10625-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10625-testall/lastCompletedBuild/testReport/]| |[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10625-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10625-dtest/lastCompletedBuild/testReport/]| committer: patch merges cleanly upwards. > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Assignee: Adam Holmberg >Priority: Minor > Fix For: 3.0.x, 3.x > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143438#comment-15143438 ] Adam Holmberg commented on CASSANDRA-10625: --- [~pauloricardomg] How about a single warning, the first time it happens? https://github.com/apache/cassandra/compare/trunk...aholmberg:10625-3.1 > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Priority: Minor > Fix For: 3.0.x, 3.x > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141467#comment-15141467 ] Paulo Motta commented on CASSANDRA-10625: - +1 to the proposed cqlsh workaround. It would may be nice to print a warning that a date is out of display range and will be displayed as elapsed time since epoch. > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Priority: Minor > Fix For: 3.0.x, 3.x > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134315#comment-15134315 ] Adam Holmberg commented on CASSANDRA-10625: --- ping @pkolaczk. Just checking back on this as I follow up on pending driver tickets. Thoughts? > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Priority: Minor > Fix For: 3.0.x, 3.x > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15025299#comment-15025299 ] Adam Holmberg commented on CASSANDRA-10625: --- Changing the return type for the driver is not tenable. What to do with out-of-range values seems application-specific to me, so it didn't seem appropriate to put the optional workaround in the driver. With that in mind, a proposed change to patch in the desired fallback [here|https://github.com/apache/cassandra/compare/cassandra-3.0...aholmberg:10625-3.0] Example output with patch: {code} cassandra@cqlsh:test> create table ts (k int PRIMARY KEY , t timestamp ); cassandra@cqlsh:test> insert into ts (k, t) VALUES (0, 0); cassandra@cqlsh:test> insert into ts (k, t) VALUES (1, '1-01-01 00:00:01+'); cassandra@cqlsh:test> select * from ts; k | t ---+-- 1 | 253402300801000 0 | 1970-01-01 00:00:00+ {code} > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski >Priority: Minor > Fix For: 3.0.1, 3.1 > > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987543#comment-14987543 ] Adam Holmberg commented on CASSANDRA-10625: --- Created to track for the driver: https://datastax-oss.atlassian.net/browse/PYTHON-441 > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987523#comment-14987523 ] Piotr Kołaczkowski commented on CASSANDRA-10625: We have still plenty of time to fix it. I'm using year instead of new Date(MAX_LONG) and it works. So not a major issue. > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14983219#comment-14983219 ] Joshua McKenzie commented on CASSANDRA-10625: - Might be worth pointing out - for the date type (i.e. date only, not timestamp) we just return the integer value of dates over what python can handle. Might want to do something similar for timestamp. > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-10625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14982255#comment-14982255 ] Piotr Kołaczkowski commented on CASSANDRA-10625: [~thobbs] ^ > Problem of year 1: Dates too far in the future can be saved but not read > back using cqlsh > - > > Key: CASSANDRA-10625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10625 > Project: Cassandra > Issue Type: Bug >Reporter: Piotr Kołaczkowski > > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 > 23:59:59+'); > cqlsh> select * from test.timestamp_test ; > pkey | ts > --+-- > 1 | -12-31 23:59:59+ > (1 rows) > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > cqlsh> select * from test.timestamp_test ; > Traceback (most recent call last): > File "bin/../resources/cassandra/bin/cqlsh", line 1112, in > perform_simple_statement > rows = self.session.execute(statement, trace=self.tracing_enabled) > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 1602, in execute > result = future.result() > File > "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", > line 3347, in result > raise self._final_exception > OverflowError: date value out of range > {noformat} > The connection is broken afterwards: > {noformat} > cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 > 00:00:01+'); > NoHostAvailable: ('Unable to complete the operation against any hosts', > {: ConnectionShutdown('Connection to 127.0.0.1 is > defunct',)}) > {noformat} > Expected behaviors (one of): > - don't allow to insert dates larger than -12-31 and document the > limitation > - handle all dates up to Java Date(MAX_LONG) for writing and reading -- This message was sent by Atlassian JIRA (v6.3.4#6332)