-
Notifications
You must be signed in to change notification settings - Fork 141
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
Query anonymization should work in fallback log #2804
base: main
Are you sure you want to change the base?
Conversation
The build failures are not related to this PR. It looks like |
Signed-off-by: Lantao Jin <[email protected]>
Signed-off-by: Lantao Jin <[email protected]>
Signed-off-by: Lantao Jin <[email protected]>
873ecee
to
4572e25
Compare
@@ -148,4 +149,22 @@ private boolean shouldSanitize(Map<String, String> params) { | |||
} | |||
return true; | |||
} | |||
|
|||
/** A new toString() with anonymizer parameter to anonymize its query statement. */ | |||
public String toString(Function<String, String> anonymizer) { |
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 wonder do you see future requirement for different anonymizer? Is toString(boolean anonymized)
or copy to a new request clear enough?
This PR is stalled because it has been open for 30 days with no activity. |
@LantaoJin is it still relevant? |
Description
Query anonymization is not working in the fallback log.
JOIN
query and other queries which trigger fallback to old engine are not anonymous in logs.This PR resolves it by adding a new
toString()
method with a lambda function parameter anonymizer inSQLQueryRequest
sinceQueryDataAnonymizer
is inorg.opensearch.sql.legacy
package.With this fixing, the new log show like
Issues Resolved
Resolves #2803
Check List
[ ] New functionality has been documented.[ ] New functionality has javadoc added[ ] New functionality has user manual doc addedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.