Bug 2242089
| Summary: | [s3select][json]: some of the "from" clause filters with "limit 1" are taking time as if to query entire object and results are also incorrect | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Hemanth Sai <hmaheswa> |
| Component: | RGW | Assignee: | gal salomon <gsalomon> |
| Status: | CLOSED ERRATA | QA Contact: | Hemanth Sai <hmaheswa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | akraj, ceph-eng-bugs, cephqe-warriors, gsalomon, mbenjamin, rpollack, tserlin |
| Target Milestone: | --- | ||
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ceph-19.1.1-20.el9cp | Doc Type: | Bug Fix |
| Doc Text: |
.SQL queries on a JSON statement no longer confuse `key` with `array` or `object`
Previously, in some cases, a result of an SQL statement on a JSON structure could confuse `key` with `array` or `object`. As a result, there is no `venue.id`, as defined, with `id` as the `key` value in the `venue object and it keeps traversing the whole JSON object.
With this fix, the SQL engine was fixed to avoid wrong results for mixing between `key` with `array` or `object` and returns the correct results, according to the query.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-11-25 08:59:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2317218 | ||
|
Description
Hemanth Sai
2023-10-04 10:35:55 UTC
upon "select * from s3object[*].a.b;"
where the document contains {a} as an object or array, and {b} is NOT an object or array.
the parser will scan the *whole* document to search for {a.b} path where a and b must be an object or array.
s3object[*].year :: year is not an object/array
s3object[*].authors.name :: name is not an object/array
s3object[*].author :: author (you meant authors ?), author is not object/array
s3object[*].venue.id :: is not object/array
it seems there is a problem upon the scanner find {b} that is a key (not object, not array)
it may result in a wrong result.
upon "select * from s3object[*].a.b;"
where the document contains {a} as an object or array, and {b} is NOT an object or array.
the parser will scan the *whole* document to search for {a.b} path where a and b must be an object or array.
scanning a full 12gb JSON document, searching for specific paths may take 2-3 minutes (single thread)
s3object[*].year :: year is not an object/array
s3object[*].authors.name :: name is not an object/array
s3object[*].author :: author (you meant authors ?), author is not object/array
s3object[*].venue.id :: id is not object/array
it seems there is a problem with the scanner;
when {b} is a key (not object, not array), it may return wrong results.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat Ceph Storage 8.0 security, bug fix, and enhancement updates), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2024:10216 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |