Skip to content

Commit bc7631e

Browse files
committed
Anonymize argument span
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 73040b8 commit bc7631e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

ppl/src/main/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,13 @@ public String visitChart(Chart node, String context) {
516516
if ("top".equals(argName)) {
517517
continue;
518518
}
519-
chartCommand.append(" ").append(argName).append("=");
519+
520520
switch (argName) {
521521
case "limit", "useother", "usenull", "otherstr", "nullstr" ->
522-
chartCommand.append(MASK_LITERAL);
523-
case "timefield" -> chartCommand.append(MASK_TIMESTAMP_COLUMN);
522+
chartCommand.append(" ").append(argName).append("=").append(MASK_LITERAL);
523+
case "spanliteral" -> chartCommand.append(" span=").append(MASK_LITERAL);
524+
case "timefield" ->
525+
chartCommand.append(" ").append(argName).append("=").append(MASK_TIMESTAMP_COLUMN);
524526
default ->
525527
throw new NotImplementedException(
526528
StringUtils.format("Please implement anonymizer for arg: %s", argName));

0 commit comments

Comments
 (0)