-
Notifications
You must be signed in to change notification settings - Fork 805
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
Filtering the prefix in custom query log for pinot response comparator #5643
Conversation
} | ||
|
||
func filterAttrPrefix(str string) string { | ||
str = strings.Replace(str, "`Attr.", "", -1) |
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.
this can unintentionally replace value part in the query. correct way to do this would be to parse the whole query with regex capture groups or AST and then perform the sanitization. however this is probably a super edge case so don't block yourself on this but keep the current behavior caveat documented in the code and also add an example false positive test case to demonstrate it
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.
Comment and false positive unit test added.
What changed?
Filtering the prefix in custom query log for pinot response comparator
Why?
The custom attributes in the log has "
Attr.
" prefix. In order for the Pinot response comparator to directly use the log, we need to get rid of it.How did you test it?
unit test
Potential risks
Release notes
Documentation Changes