Maxwell-Guo commented on code in PR #2747:
URL: https://github.com/apache/cassandra/pull/2747#discussion_r1339476174
##########
test/unit/org/apache/cassandra/cql3/functions/masking/ColumnMaskQueryWithDefaultTest.java:
##########
@@ -39,7 +42,11 @@ public static Collection<Object[]> options()
options.add(new Object[]{ order, "DEFAULT", "text", "abc", "****"
});
options.add(new Object[]{ order, "DEFAULT", "int", 123, 0 });
options.add(new Object[]{ order, "mask_default()", "text", "abc",
"****" });
- options.add(new Object[]{ order, "mask_default()", "int", 123, 0,
});
+ options.add(new Object[]{ order, "mask_default()", "int", 123, 0
});
+ // TODO: the driver version that we use doesn't support vectors,
so we have to use raw values by now
+ options.add(new Object[]{ order, "mask_default()", "vector<int,
2>",
Review Comment:
Is it necessary to add any other element type's case like float ?
##########
src/java/org/apache/cassandra/db/marshal/VectorType.java:
##########
@@ -359,6 +365,13 @@ private <V> void checkConsumedFully(V buffer,
ValueAccessor<V> accessor, int off
throw new MarshalException("Unexpected " + remaining + "
extraneous bytes after " + asCQL3Type() + " value");
}
+ @Override
+ public ByteBuffer getMaskedValue()
+ {
+ List<ByteBuffer> values = Collections.nCopies(dimension,
elementType.getMaskedValue());
Review Comment:
Do we need to add a doc to tell the users how vectortype's mask_default was
implemented ? let users know whether the usage expectations are met.
##########
test/unit/org/apache/cassandra/cql3/functions/masking/ColumnMaskQueryWithReplaceTest.java:
##########
@@ -43,6 +46,10 @@ public static Collection<Object[]> options()
options.add(new Object[]{ order, "mask_replace(0)", "int", 123, 0
});
options.add(new Object[]{ order, "mask_replace(0)", "bigint",
123L, 0L });
options.add(new Object[]{ order, "mask_replace(0)", "varint",
BigInteger.valueOf(123), BigInteger.ZERO });
+ // TODO: the driver version that we use doesn't support vectors,
so we have to use raw values by now
+ options.add(new Object[]{ order, "mask_replace([0, 0])",
"vector<int, 2>",
Review Comment:
same with the upper case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]