Skip to content
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

Merged
merged 97 commits into from
Nov 3, 2023
Merged

Range query for custom attribute #5426

merged 97 commits into from
Nov 3, 2023

Conversation

bowenxia
Copy link
Contributor

@bowenxia bowenxia commented Oct 19, 2023

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

neil-xie and others added 30 commits September 28, 2023 12:51
@bowenxia bowenxia changed the base branch from master to CDNC_4431 October 19, 2023 19:30
Base automatically changed from CDNC_4431 to master October 19, 2023 20:37
@@ -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)
Copy link
Contributor Author

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.

@bowenxia bowenxia changed the title Range query Range query and more query operations for custom attribute Oct 19, 2023
@bowenxia bowenxia changed the title Range query and more query operations for custom attribute Range query for custom attribute Oct 20, 2023
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",
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@neil-xie neil-xie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bowenxia bowenxia merged commit 1649929 into master Nov 3, 2023
16 checks passed
@bowenxia bowenxia deleted the CDNC_5946_RangeQuery branch November 3, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants