Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
6.5.0, Cheshire-Cat, 6.6.1
-
1
Description
CREATE INDEX cx1 ON default(type, a1 ); |
|
UPSERT INTO default VALUES ("c001", {"type": "doc", "a1":[{"name":"a1"}, {"name":"a2"}]}), |
VALUES ("c002", {"type": "doc", "a1":[{"name":"b1"}, {"name":"a2"}]}), |
VALUES ("c003", {"type": "doc", "a1":[{"name":"b1"}, {"name":"a2"}]}); |
|
SELECT COUNT(1) FROM default AS d |
WHERE d.type = "doc" AND (EVERY v IN a1 SATISFIES v.name != "b1" END OR d.a1 IS MISSING); |
|
SELECT * FROM default AS d |
WHERE d.type = "doc" AND (EVERY v IN a1 SATISFIES v.name != "b1" END OR d.a1 IS MISSING); |
count query returns 3, non-count query returns 1
Index is not array Index. array field is Scalar value. count query can cover. But the EVERY predicate is not pushed to indexer. It should not push index aggregation.
Also note EVERY query can't push any index pushdowns.
Workaround:
SELECT COUNT(1) FROM default AS d WHERE d.type = "doc" AND (EVERY v IN IFMISSING(a1,[]) SATISFIES v.name != "b1" END);
EVERY is true for empty ARRAY.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue is triggered by CBSE-9158 [ CBSE-9158 ] |
Issue Type | Task [ 3 ] | Bug [ 1 ] |
Assignee | Kamini Jagtiani [ kamini.jagtiani ] | Bingjie Miao [ bingjie.miao ] |
Assignee | Bingjie Miao [ bingjie.miao ] | Mihir Kamdar [ mihir.kamdar ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Link | This issue blocks MB-40528 [ MB-40528 ] |
Assignee | Mihir Kamdar [ mihir.kamdar ] | Sitaram Vemulapalli [ sitaram.vemulapalli ] |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Labels | approved-for-6.6.1 |
Fix Version/s | 6.6.1 [ 17002 ] |
Assignee | Sitaram Vemulapalli [ sitaram.vemulapalli ] | Bingjie Miao [ bingjie.miao ] |
Affects Version/s | 6.6.2 [ 17103 ] |
Assignee | Bingjie Miao [ bingjie.miao ] | Mihir Kamdar [ mihir.kamdar ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Link | This issue blocks MB-42749 [ MB-42749 ] |
Link | This issue blocks MB-42583 [ MB-42583 ] |
Fix Version/s | 6.5.1 [ 16622 ] |
Fix Version/s | 6.5.2 [ 17223 ] | |
Fix Version/s | 6.5.1 [ 16622 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Labels | approved-for-6.6.1 | approved-for-6.6.1 releasenote |
Fix Version/s | 7.0.0 [ 17233 ] |
Fix Version/s | Cheshire-Cat [ 15915 ] |