Skip to content

Commit

Permalink
Merge pull request #920: [proxima-direct-io-cassandra] small polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
je-ik authored Jun 17, 2024
2 parents 72d2200 + e340344 commit 410b77f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public <T> Optional<KeyValue<T>> get(
ByteBuffer val = row.getBytes(0);
if (val != null) {
byte[] rowValue = val.array();

try {
return Optional.ofNullable(
accessor
Expand Down Expand Up @@ -146,7 +145,6 @@ public <T> void scanWildcard(
System.currentTimeMillis(),
new Raw(name),
rowValue);

if (keyValue != null) {
consumer.accept(keyValue);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public byte[] asCellBytes(StreamElement element) {
}

@Override
public <T> @Nullable KeyValue<T> fromCellBytes(
public <T> KeyValue<T> fromCellBytes(
EntityDescriptor entityDescriptor,
AttributeDescriptor<T> attributeDescriptor,
String key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ public void testV2SerializerRead() {
URI.create("cassandra://whatever/my_table?primary=hgw&data=my_col&serializer=v2"),
StringConverter.getDefault());
long now = System.currentTimeMillis();
KeyValue<?> kv =
assertNotNull(
factory.toKeyValue(
entity,
attrWildcard,
Expand All @@ -569,17 +569,15 @@ public void testV2SerializerRead() {
.setSeqId(1L)
.setValue(ByteString.copyFrom(new byte[] {1}))
.build()
.toByteArray());
assertNotNull(kv);
kv =
.toByteArray()));
assertNull(
factory.toKeyValue(
entity,
attrWildcard,
"key",
attrWildcard.toAttributePrefix(true) + "1",
System.currentTimeMillis(),
Offsets.empty(),
new byte[] {(byte) 199, 0});
assertNull(kv);
new byte[] {(byte) 199, 0}));
}
}

0 comments on commit 410b77f

Please sign in to comment.