-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implemented working query anonymizer #7357
feat: implemented working query anonymizer #7357
Conversation
@confluentinc It looks like @tolgadur just signed our Contributor License Agreement. 👍 Always at your service, clabot |
294b467
to
1b67324
Compare
ksqldb-parser/pom.xml
Outdated
@@ -84,6 +84,18 @@ | |||
<version>${io.confluent.ksql.version}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you actually need this? If you know how to do it, we should depend on one version of approval tests throughout (via ksql-test-util or parent POM), if not let me know and I'll task myself up with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I don't need it. I removed it now :)
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just two questions that would be good to have answers to before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM - had a few questions about handling UDFs / inline functions
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public String visitDescribeFunction(final DescribeFunctionContext context) { | ||
return "DESCRIBE FUNCTION function;"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand the anonymizing - there won't be a way to map what function is being described here to where the function is used, is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right. I can add this if this is something we want though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's probably ok, depends on how much visibility product wants into functions
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
ksqldb-parser/src/main/java/io/confluent/ksql/util/QueryAnonymizer.java
Outdated
Show resolved
Hide resolved
ksqldb-parser/src/test/java/io/confluent/ksql/util/QueryAnonymizerTest.java
Show resolved
Hide resolved
80ccd99
to
8b3a0a8
Compare
8b3a0a8
to
ab39bc9
Compare
Jira: KCI-341
Description
This is the first userstory in the anonymize query epic KCI-340. Here, a class is defined that takes in a ksqldb query and returns the same statement with anonymised property names, column names, stream names etc.
For example, the following query...
...is anonymised to:
The output in this story is all printed in the same line as discussed on Jira. The pretty printing according to specified rules from the product team is going to be done in KCI-377.
Testing done
Unit- and approval testing to make sure anonymizer works as expected.
Reviewer checklist