Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.3, 7.0.0, 7.0.1, 7.0.2, 7.1.0
-
Untriaged
-
1
-
Yes
Description
create index ix1 on default(DISTINCT ARRAY v.lname FOR v IN names WHEN v.mname = "abc" END); |
EXPLAIN SELECT 1 FROM default WHERE ANY v IN names SATISFIES v.lname = "xyz" AND v.mname = "abc" END; -- works |
cbq> \set -$mname "abc"; |
cbq> EXPLAIN SELECT 1 FROM default WHERE ANY v IN names SATISFIES v.lname = "xyz" AND v.mname = $mname END; |
{
|
"requestID": "adc9c3a6-4904-492c-a15b-94c6b3cca802", |
"errors": [ |
{
|
"code": 4000, |
"msg": "No index available on keyspace default that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online." |
}
|
],
|
"status": "fatal", |
"metrics": { |
"elapsedTime": "2.189019ms", |
"executionTime": "2.021909ms", |
"resultCount": 0, |
"resultSize": 0, |
"errorCount": 1 |
}
|
}
|
|
last one is adhoc = true, If when clause value is parameterized it is not working. In adhoc=true we suppose to replace parameter with value before index selection.
Looks like some case is missed in MB-33009
Attachments
Issue Links
- is caused by
-
MB-33009 N1QL plans different while using Named Parameters with Array Indexes
- Closed