Description
With 7.2.0-1106 (indexer changes)
Filter on IndexScan is in correct.
CREATE INDEX mix1 ON lkm(fname MISSING DESC, lname, team);
|
cbq> EXPLAIN SELECT DISTINCT META(l).id FROM lkm AS l UNNEST l.contacts AS c WHERE c.id LIKE 'stephen.%' ; |
{
|
"requestID": "68bfa55b-2b56-4f1d-b4b0-5b9b72135fa7", |
"signature": "json", |
"results": [ |
{
|
"plan": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "IndexScan3", |
"as": "l", |
"filter": "((`c`.`id`) like \"stephen.%\")", |
"index": "mix1", |
"index_id": "b9e8f6dd05822bb0", |
"index_keys": [ |
"_index_key ((meta(`l`).`id`))" |
],
|
"index_projection": { |
"primary_key": true |
},
|
"keyspace": "lkm", |
"namespace": "default", |
"spans": [ |
{
|
"range": [ |
{
|
"inclusion": 0, |
"index_key": "`fname`" |
}
|
]
|
}
|
],
|
"using": "gsi" |
},
|
{
|
"#operator": "Fetch", |
"as": "l", |
"keyspace": "lkm", |
"namespace": "default" |
},
|
{
|
"#operator": "Parallel", |
"~child": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "Filter", |
"alias": "l", |
"condition": "is_array((`l`.`contacts`))" |
},
|
{
|
"#operator": "Unnest", |
"as": "c", |
"expr": "(`l`.`contacts`)", |
"filter": "(((`c`.`id`) like \"stephen.%\") and (`c` is not missing))" |
}
|
]
|
}
|
},
|
{
|
"#operator": "Parallel", |
"~child": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "InitialProject", |
"distinct": true, |
"result_terms": [ |
{
|
"expr": "(meta(`l`).`id`)" |
}
|
]
|
},
|
{
|
"#operator": "Distinct" |
}
|
]
|
}
|
},
|
{
|
"#operator": "Distinct" |
}
|
]
|
},
|
"text": "SELECT DISTINCT META(l).id FROM lkm AS l UNNEST l.contacts AS c WHERE c.id LIKE 'stephen.%';" |
}
|
],
|
"status": "success", |
"metrics": { |
"elapsedTime": "2.127427ms", |
"executionTime": "2.058692ms", |
"resultCount": 1, |
"resultSize": 3036, |
"serviceLoad": 2 |
}
|
}
|