This is an automated email from the ASF dual-hosted git repository. apucher pushed a commit to branch groovy-data-masking-unit-test in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit a72ecd71839379a4abdd55ab9af5a166dd1e9ee0 Author: Alexander Pucher <[email protected]> AuthorDate: Mon Jul 19 12:43:19 2021 -0700 add groovy unit test for sha256 data masking --- .../apache/pinot/core/data/function/GroovyFunctionEvaluatorTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinot-core/src/test/java/org/apache/pinot/core/data/function/GroovyFunctionEvaluatorTest.java b/pinot-core/src/test/java/org/apache/pinot/core/data/function/GroovyFunctionEvaluatorTest.java index c5086c3..46f1209 100644 --- a/pinot-core/src/test/java/org/apache/pinot/core/data/function/GroovyFunctionEvaluatorTest.java +++ b/pinot-core/src/test/java/org/apache/pinot/core/data/function/GroovyFunctionEvaluatorTest.java @@ -83,6 +83,10 @@ public class GroovyFunctionEvaluatorTest { genericRow7.putValue("eventType", "CLICK"); entries.add(new Object[]{"Groovy({eventType == 'IMPRESSION' ? 1: 0}, eventType)", Lists.newArrayList("eventType"), genericRow7, 0}); + GenericRow genericRow8 = new GenericRow(); + genericRow8.putValue("ssn", "123-45-6789"); + entries.add(new Object[]{"Groovy({org.apache.commons.codec.digest.DigestUtils.sha256Hex(ssn)}, ssn)", Lists.newArrayList("ssn"), genericRow8, "01a54629efb952287e554eb23ef69c52097a75aecc0e3a93ca0855ab6d7a31a0"}); + return entries.toArray(new Object[entries.size()][]); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
