[ https://issues.apache.org/jira/browse/CASSANDRA-16105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194532#comment-17194532 ]
Adam Holmberg commented on CASSANDRA-16105: ------------------------------------------- Potential [patch|https://github.com/aholmberg/cassandra/pull/5/files]. I learned that a single character for a numeric field in the DTF pattern accepts arbitrary zero padding (or not). I didn't see this described in the docs. I added a test characterizing it. Also happened to find some additional correctness bugs around this in the *old* parsing, so "good", I guess. CI running: [j8|https://app.circleci.com/pipelines/github/aholmberg/cassandra/32/workflows/07410762-10cd-4039-a072-238522b9ba1e] [j11|https://app.circleci.com/pipelines/github/aholmberg/cassandra/32/workflows/e6f7ff1c-b15f-46c1-83d5-f4082bac7ccd] > InvalidQuery when datetime string format is not zero padded > ----------------------------------------------------------- > > Key: CASSANDRA-16105 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16105 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter > Reporter: João Reis > Assignee: Adam Holmberg > Priority: Normal > Fix For: 4.0-beta3 > > > With CASSANDRA-15976, Cassandra no longer accepts certain datetime string > formats that it used to accept before: > {code:java} > Unable to parse a date/time from '2020-09-03 9:00:00+0000' > {code} > In this example, {{2020-09-03 9:00:00+0000}} is not accepted in 4.0-beta2 but > it is accepted in previous versions (I tested this with 4.0-beta1 and > 3.11.4). If I add a zero so that it becomes {{2020-09-03 09:00:00+0000}} then > it is accepted in all of the 3 mentioned versions (note the zero padded time > part - {{9:00:00}} vs {{09:00:00}}) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org