Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0
-
5.0.0-3453,5.0.0-3317,5.0.0-3456
-
Untriaged
-
Yes
Description
This is a regression from 5.0.0-3217.
This test passes in 3217 but fails in 3317 and in 3453 build.
Query which fails:
explain select email,VMs[0].RAM from default where email LIKE '%@%.%' and VMs[0].RAM > 5 and join_day > 10
Index created:
CREATE INDEX `coveringindexwithwhere0` ON `default`(`email`,`VMs`,`join_day`) WHERE (10 < `join_day`)
Explain plan:
{
|
"plan": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "IndexScan2", |
"index": "coveringindexwithwhere0", |
"index_id": "71dbc359f8a5c5a8", |
"index_projection": { |
"primary_key": true |
},
|
"keyspace": "default", |
"namespace": "default", |
"spans": [ |
{
|
"range": [ |
{
|
"high": "[]", |
"inclusion": 1, |
"low": "\"\"" |
},
|
{
|
"inclusion": 0, |
"low": "null" |
},
|
{
|
"inclusion": 0, |
"low": "10" |
}
|
]
|
}
|
],
|
"using": "gsi" |
},
|
{
|
"#operator": "Fetch", |
"keyspace": "default", |
"namespace": "default" |
},
|
{
|
"#operator": "Parallel", |
"~child": { |
"#operator": "Sequence", |
"~children": [ |
{
|
"#operator": "Filter", |
"condition": "((((`default`.`email`) like \"%@%.%\") and (5 < (((`default`.`VMs`)[0]).`RAM`))) and (10 < (`default`.`join_day`)))" |
},
|
{
|
"#operator": "InitialProject", |
"result_terms": [ |
{
|
"expr": "(`default`.`email`)" |
},
|
{
|
"expr": "(((`default`.`VMs`)[0]).`RAM`)" |
}
|
]
|
},
|
{
|
"#operator": "FinalProject" |
}
|
]
|
}
|
}
|
]
|
},
|
"text": "select email,VMs[0].RAM from default where email LIKE '%@%.%' and VMs[0].RAM > 5 and join_day > 10;" |
}
|
]
|
Covers is missing from the explain plan above.
Test which fails:
./testrunner -i query4.ini -p gsi_type=memory_optimized -t tuqquery.tuq_2i_index.QueriesIndexTests.test_covering_partial_index -p covering_index=true -p doc-per-day=6 -p skip_index=True
Assert which fails:
https://github.com/couchbase/testrunner/blob/master/pytests/tuqquery/tuq_2i_index.py#L4336