Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently users can utilize array indexes w/ array depth > 1 for only existential quantification and explicit unnest queries, but not for universal quantification clauses that aren't at the top-level.
For example, the query below is optimized because the universal quantification is the outermost quantification:
SELECT C.business_id
FROM YelpCheckin C
WHERE LEN(C.checkin_times) > 0 AND
(EVERY CT IN C.checkin_times
SATISFIES (
SOME D IN CT.dates
SATISFIES "2019-06-07" = D
));
But if we switch the "EVERY" and "SOME", then the query is not optimized (even though we can). Here, the universal quantification is on an array that isn't at the "top-level".
SELECT C.business_id
FROM YelpCheckin C
WHERE LEN(C.checkin_times) > 0 AND
(SOME CT IN C.checkin_times
SATISFIES (
EVERY D IN CT.dates
SATISFIES "2019-06-07" = D
));
Attachments
Issue Links
- Blocked
-
ASTERIXDB-2830 Fix INLJ Bug for LOJ Queries w/ Array Indexes
- Resolved