-
Notifications
You must be signed in to change notification settings - Fork 801
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
Update ListAllWorkflowExecutions pinot endpoint #6160
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
} else { | ||
val = fmt.Sprintf("%v", val) | ||
s.string += fmt.Sprintf("%s = %v\n", obj, val) |
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.
A test for this case is missing (according to codecov).
@@ -721,19 +721,17 @@ func (s *PinotQuerySearchField) resetSearchField() { | |||
func (s *PinotQuerySearchField) addEqual(obj string, val interface{}) { | |||
s.checkFirstSearchField() | |||
if _, ok := val.(string); ok { | |||
val = fmt.Sprintf("'%s'", val) | |||
s.string += fmt.Sprintf("%s = '%s'\n", obj, val) |
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.
The whole thing with += of strings is extremely error-prone and inefficient.
I suggest revisiting this and building a set of filters to groups with "()" around them and then joining them together in one go.
But that would be a separate problem/PR.
cc @neil-xie
} | ||
|
||
func (s *PinotQuerySearchField) addMatch(obj string, val interface{}) { | ||
s.checkFirstSearchField() | ||
|
||
s.string += fmt.Sprintf("text_match(%s, '\"%s\"')\n", obj, val) | ||
s.string += fmt.Sprintf("REGEXP_LIKE(%s, '^.*%s.*$')\n", obj, val) |
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.
Once we add the text index, we should use Text_Match for partial match.
Btw, for regexp like query, partial match can timeout for large cluster, it can work with prefix match which is REGEXP_LIKE(%s, '^%s.*$')
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.
We can update and test after Pinot team enable text index for us.
What changed?
partial match uses REGEXP_LIKE instead of text_match
Workflow search leverages new duplicate fields in pinot ( introduced in #6149 )
Workflow status match fixed to be int
Why?
Text index offers better performance and other changes are fixes
How did you test it?
unit tests and querybuilder to run the constructed queries
Potential risks
Release notes
Documentation Changes