-
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
Range query for custom attribute #5426
Conversation
…not visibility triple manager
@@ -185,7 +185,7 @@ LIMIT 0, 10 | |||
FROM %s | |||
WHERE DomainID = 'bfd5c907-f899-4baf-a7b2-2ab85e623ebd' | |||
AND IsDeleted = false | |||
AND WorkflowID = 'wid' and ((JSON_MATCH(Attr, '"$.CustomStringField" is not null') AND REGEXP_LIKE(JSON_EXTRACT_SCALAR(Attr, '$.CustomStringField', 'string'), 'custom and custom2 or custom3 order by*')) or CustomIntField between 1 and 10) |
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.
previously we didn't find the range query was not working since we used the old pinot table which we had flatten attribute. So the range query "between and" worked.
validated: "(JSON_MATCH(Attr, '\"$.CustomDatetimeField\" is not null') AND CAST(JSON_EXTRACT_SCALAR(Attr, '$.CustomDatetimeField') AS BIGINT) >= 1697754674)", | ||
}, | ||
"Case15-3: system date attribute greater than or equal to": { | ||
query: "StartTime >= 1697754674", |
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.
When user input a date string like StartTime > "2023-11-02T15:36:47", is this handled in the query validator?
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 is not handled here. But that will be converted to UnixMilli()
in PiontVisibilityStore.
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
What changed?
Added "between and" for custom attributes
Added <, >, <=, >= for custom attributes
Why?
Previously custom attributes only support equal operation
How did you test it?
unit test
Integration test
Potential risks
Release notes
Documentation Changes