Description
INSERT INTO default VALUES("k01",{"k0":"XYZ","ka":["abc"]}); |
CREATE INDEX ix11 ON default(k0,k1,DISTINCT ARRAY v FOR v IN ka END); |
SELECT META().id FROM default WHERE k0 = "XYZ" AND ANY v IN ka SATISFIES v LIKE "def%" END; |
Above query covers it shouldn't because Array key is not pushed to indexer due to k1 is missing in predicate. We need ka in the index re-apply predicate. Array index keys can be covered without array in index when all predicates pushed to indexer and no false positives possible. Otherwise we can't use filtercovers for that arraykey
Attachments
For Gerrit Dashboard: MB-25762 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
83225,2 | MB-25762. Consider Implicit array covering when array key pushed to indexer | master | query | Status: MERGED | +2 | +1 |
83317,2 | MB-25762. Consider Implicit array covering when array key pushed to indexer | spock | query | Status: MERGED | +2 | +1 |
83322,2 | MB-25762. Consider Implicit array covering when array key pushed to indexer | watson | query | Status: MERGED | +2 | +1 |
84390,2 | Test for MB-25590:Unnest Scan considers wrong array index Test for MB-25762:ARRAY KEY predicate is not pushed to indexer it should not cover without whole array in the index | master | testrunner | Status: MERGED | +2 | +1 |
84435,3 | Test for MB-25590:Unnest Scan considers wrong array index Test for MB-25762:ARRAY KEY predicate is not pushed to indexer it should not cover without whole array in the index | watson | testrunner | Status: MERGED | +2 | +1 |