Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.0, Morpheus, 7.2.3, 7.6.2, 7.6.1
-
Untriaged
-
0
-
Unknown
Description
Original repro in CBSE-17177
A Simple Repro:
1.
ADVISE SELECT * FROM collection1 WHERE any i IN [1,2] SATISFIES i = id END; |
2. Results:
The recommended array index creation statement is syntactically incorrect. There is a "_" prefix before the DISTINCT keyword.
CREATE INDEX adv_DISTINCT ON `default`:`bucket1`.`scope1`.`kids`(_DISTINCT ARRAY `i` FOR `i` IN [1, 2] END) |
{
|
"#operator": "Advise", |
"advice": { |
"#operator": "IndexAdvice", |
"adviseinfo": { |
"recommended_indexes": { |
"indexes": [ |
{
|
"index_statement": "CREATE INDEX adv_DISTINCT ON `default`:`bucket1`.`scope1`.`kids`(_DISTINCT ARRAY `i` FOR `i` IN [1, 2] END)", |
"index_statement_relative": "", |
"keyspace_alias": "kids", |
"query_context": "bucket1.scope1", |
"recommending_rule": "Index keys follow order of predicate types: 2. equality/null/missing." |
}
|
]
|
}
|
}
|
},
|
"query": "SELECT * FROM kids WHERE any i IN [1,2] SATISFIES i = id END;" |
}
|
Attachments
For Gerrit Dashboard: MB-62059 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
210612,2 | MB-62059 Proper generation of array index key in index advisor | trinity | query | Status: MERGED | +2 | +1 |
210613,2 | MB-62059 Proper generation of array index key in index advisor | trinity | query-ee | Status: MERGED | +2 | +1 |
210656,2 | MB-62059 Proper generation of array index key in index advisor | neo | query | Status: MERGED | +2 | +1 |
210657,2 | MB-62059 Proper generation of array index key in index advisor | neo | query-ee | Status: MERGED | +2 | +1 |