Skip to content
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

Implement two new codecs STRING_BLOB and ASCII_BLOB #311

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

pravinbhat
Copy link
Collaborator

@pravinbhat pravinbhat commented Sep 19, 2024

What this PR does: Implements two new codecs STRING_BLOB and ASCII_BLOB to allow migration from TEXT and ASCII fields to BLOB fields.

Which issue(s) this PR fixes:
Fixes #308

Checklist:

  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

…gration from `TEXT` and `ASCII` fields to `BLOB` fields

@Test
public void encodeDecode() {
ByteBuffer buffer = codec.encode(ByteBuffer.wrap("Encode this Text string to Blob".getBytes()),
Copy link
Collaborator

@msmygit msmygit Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: should we extract Encode this Text string to Blob as a constant and re-use it everywhere?

ByteBuffer buffer = codec.encode(ByteBuffer.wrap("Encode this Text string to Blob".getBytes()),
ProtocolVersion.V4);
ByteBuffer retBuffer = codec.decode(buffer, ProtocolVersion.V4);
assertEquals("'Encode this Text string to Blob'", codec.format(retBuffer));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see an extra single quotes surrounding this. Is this expected?

@msmygit msmygit merged commit ba381c0 into main Sep 19, 2024
9 checks passed
@msmygit msmygit deleted the feature/text-to-blob branch September 19, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants