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

Doug Rohrer commented on CASSANDRA-17117:
-----------------------------------------

Brandon:

Thanks for doing that - I do have some Circle runs with just unit tests run at 
the moment (4.0 passed unit tests, trunk had a few unrelated failures). It 
looks like your 4.0 branch just didn't even start running unfortunately.

* 4.0/jdk8 - 
https://app.circleci.com/pipelines/github/JeetKunDoug/cassandra/2/workflows/8ef3122d-1901-4099-a2cb-4ba56acd26b7/jobs/303
4.0 jdk11 - 
https://app.circleci.com/pipelines/github/JeetKunDoug/cassandra/2/workflows/e8061097-7f5c-4f12-a483-db4945d2c87c/jobs/301

Trunk/jdk8 - 
https://app.circleci.com/pipelines/github/JeetKunDoug/cassandra/3/workflows/3c6d730f-c72d-4343-bcf5-d97f3ddd3196/jobs/308
Trunk/jdk11 - 
https://app.circleci.com/pipelines/github/JeetKunDoug/cassandra/3/workflows/eb8566a6-0136-4f4e-b2c3-cd5d0bd6f0cb/jobs/307

I can kick off the complete pre-commit Circle CI builds if that's useful at 
this point - just let me know.

> CQLSSTableWriter backwards compatibility fix for Date fields
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-17117
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17117
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/SSTable
>            Reporter: Doug Rohrer
>            Assignee: Doug Rohrer
>            Priority: Normal
>         Attachments: CASSANDRA-17117-4.0.patch, CASSANDRA-17117-trunk.patch
>
>
> {{cassandra-all}} library consumers of the CQLSSTableWriter class cannot 
> easily create an appropriate instance of the {{LocalDate}} class in order to 
> write SSTables including dates, and the current implementation no longer 
> accepts a {{int}} value as a valid input as previous versions of the class 
> would - we used to use 
> {{((AbstractType)columnSpecification.type).decompose(value);}} in order to 
> serialize the value, but now we use the type codec's .serialize method. 
> Unfortunately, this doesn't work when the consumer can't easily create the 
> type needed (serialize, in the case of dates, takes a {{LocalDate}} instance 
> which is not easy to construct outside of Cassandra internal code).
> This can be worked around by catching the resulting {{ClassCastException}} 
> thrown from the {{serialize}} call and falling back to the older 
> {{decompose}} implementation, which would maintain backwards-compatibility 
> with other users of the CQLSSTableWriter in cases where they are passing 
> integers for date fields, which used to work.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to