New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value support for Cassandra types #409
Conversation
I think the questions we really need to answer before trying to resolve these issues is:
|
To answer @rukai questions. Yes to both. We should be able to losslesly go from arbitrary Redis <=> Value and Cassandra <=> Value (thus Redis <=> Cassandra) |
This will result in some "less than optimal" decisions. E.g. storing certain types that use more memory than needed. E.g. if one datastores Int type is 32 bits and another is 64 bits. For the moment, I would just continue down the path of conversion to a common Value type and using that as common intermediary. For some context, however, @Claude-at-Instaclustr and I have also had some discussions about a better way of representing internal types and presenting a nicer way to reason about them. Mainly using a resource descriptor framework (RDF triple). An RDF won't solve the above two questions, but it will provide a better way of reasoning about types... potentially. See https://ieeexplore.ieee.org/document/7226706 for some background reading. |
A better link to the paper: https://arxiv.org/abs/1410.4977
…On Wed, 8 Dec 2021 at 06:50, Ben Bromhead ***@***.***> wrote:
This will result in some "less than optimal" decisions. E.g. storing
certain types that use more memory than needed. E.g. if one datastores Int
type is 32 bits and another is 64 bits.
For the moment, I would just continue down the path of conversion to a
common Value type and using that as common intermediary. For some context,
however, @Claude-at-Instaclustr <https://github.com/Claude-at-Instaclustr>
and I have also had some discussions about a better way of representing
internal types and presenting a nicer way to reason about them. Mainly
using a resource descriptor framework (RDF triple). An RDF won't solve the
above two questions, but it will provide a better way of reasoning about
types... potentially.
See https://ieeexplore.ieee.org/document/7226706 for some background
reading.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#409 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVM5ARL4JRBT2YYJUZWYQETUP354BANCNFSM5JS22UNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial feedback, I'll look into the BigInt and BigDecimal stuff deeper tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once all the feedback is addressed we can land this.
As you've said, in a follow up PR you can add tests for all functions here (Dont bother with into_str_bytes though as its implementation is currently nonsense)
I'll implement the collections stuff in this PR too because that's blocking my other Cassandra integration test PRs |
80ef3ee
to
590af10
Compare
Updates:
|
798c4ff
to
415371a
Compare
9c6609f
to
d51d063
Compare
While rebasing I accidentally added |
Addressed all of the feedback. The changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me.
I can approve once the cassandra-protocol changes land upstream.
One thing I did notice: for some reason #[allow(clippy::mutable_key_type)]
isnt needed if we dont store values
as an intermediate variable.
Up to you if you want to make use of that.
That is strange, I've removed it so we don't have an unnecessary Opened a PR for the changes to cdrs-tokio: krojew/cdrs-tokio#74 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pulling some changes out of #404
Done