bereng commented on code in PR #2193:
URL: https://github.com/apache/cassandra/pull/2193#discussion_r1145779675
##########
src/java/org/apache/cassandra/cql3/functions/masking/DefaultMaskingFunction.java:
##########
@@ -41,18 +40,34 @@ public class DefaultMaskingFunction extends MaskingFunction
{
public static final String NAME = "default";
- private final ByteBuffer defaultValue;
+ private final Masker masker;
private <T> DefaultMaskingFunction(FunctionName name, AbstractType<T>
inputType)
{
super(name, inputType, inputType);
- this.defaultValue = inputType.getMaskedValue();
+ masker = new Masker(inputType);
}
@Override
- public final ByteBuffer execute(ProtocolVersion protocolVersion,
List<ByteBuffer> parameters)
+ public Masker masker(ByteBuffer... parameters)
{
- return defaultValue;
+ return masker;
+ }
+
+ private static class Masker implements MaskingFunction.Masker
Review Comment:
I would add a small comment on why this class?
--
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]