-
Notifications
You must be signed in to change notification settings - Fork 168
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 documentation for JSON Index with latest enhancements #334
Update documentation for JSON Index with latest enhancements #334
Conversation
Find all persons who have at least one address that is not in the US: | ||
|
||
```sql | ||
SELECT ... | ||
FROM mytable | ||
WHERE JSON_MATCH(person, '"$.addresses[*].country" != ''us''') | ||
``` |
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.
@Jackie-Jiang should we explicitly call out that this semantic is different in previous versions?
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 add a note stating exclusive predicate doesn't work properly on array, and cannot be nested in the previous version
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.
It's not just the array based lookups, there's also the non-existent key case (5th point in this PR description - apache/pinot#13139). I'm wondering how we can best phrase these differences in semantics? If we call out all the details with examples, it might end up being unnecessarily confusing to new users.
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 current one looks good. We may iterate on this if user asks for it
basics/indexing/json-index.md
Outdated
@@ -419,6 +448,8 @@ FROM mytable | |||
WHERE JSON_MATCH(person, '"$.name"=''adam'' AND "$.addresses[*].number"=112') | |||
``` | |||
|
|||
`NOT IN` and `!=` can be used in nested filter expressions starting from Pinot 1.2.0. Note that `IS NULL` cannot be used in nested filter expressions currently. |
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.
NOT IN
and!=
can be used in nested filter expressions starting from Pinot 1.2.0
I'm wondering if this needs to be stated explicitly or can be omitted?
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 put them in a hint blob. We can phrase it as it was not supported before 1.2.0
Documentation for enhancements from: