cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-13218) Duration validation error is unclear in case of overflow.
Date Wed, 10 May 2017 13:31:04 GMT


Benjamin Lerer commented on CASSANDRA-13218:

Unfortunately, there are other factors that force us to use 32-bit values for months and days.
Java utilities like {{Calendar}} accept only {{int}} for months or days value and we already
use {{Calendar}} for data arithmetics. Due to that the solution is simply to reject to values
at write time.

I pushed a patch for that [here|].

I think that the chances that users have inserted illegal durations is rather null. 
The 2 reasons for that are that:
# duration is not really usefull in itself and was mainly added for simplifying the life of
user querying timeseries data
# the invalid values are greater than the age of mankind and by consequence have not much
sense in the real life

[~adelapena] could you review? 

> Duration validation error is unclear in case of overflow.
> ---------------------------------------------------------
>                 Key: CASSANDRA-13218
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.11.x
> If a user try to insert a {{duration}} with a number of months or days that cannot fit
in an {{int}} (for example: {{9223372036854775807mo1d}}), the error message is confusing.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message