Details
-
Bug
-
Resolution: Fixed
-
Test Blocker
-
4.5.0
-
2151 build
-
Untriaged
-
Yes
Description
Query which gives wrong result:
SELECT min( decimal_field1 ) FROM simple_table_1 WHERE NOT ((decimal_field1 < 5024) OR (decimal_field1 <= 5024)) ;
Result:
[
]
Explain of above query:
[
{
"plan": {
"#operator": "Sequence",
"~children": [
{
"#operator": "IndexScan",
"covers": [
"cover ((`simple_table_1`.`decimal_field1`))",
"cover ((meta(`simple_table_1`).`id`))"
],
"index": "simple_table_1_idx_decimal_field1",
"index_id": "fb8e662572c5708b",
"keyspace": "simple_table_1",
"limit": "1",
"namespace": "default",
"spans": [
{
"Range":
}
],
"using": "gsi"
},
{
"#operator": "Parallel",
"maxParallelism": 1,
"~child": {
"#operator": "Sequence",
"~children": [
,
{ "#operator": "InitialGroup", "aggregates": [ "min(cover ((`simple_table_1`.`decimal_field1`)))" ], "group_keys": [] } ]
}
},
,
,
{
"#operator": "Parallel",
"maxParallelism": 1,
"~child": {
"#operator": "Sequence",
"~children": [
{
"#operator": "InitialProject",
"result_terms": [
]
},
]
}
}
]
},
"text": "SELECT min( decimal_field1 ) FROM simple_table_1 WHERE NOT ((decimal_field1 < 5024) OR (decimal_field1 <= 5024)) ;"
}
]
Index used:
CREATE INDEX `simple_table_1_idx_decimal_field1` ON `simple_table_1`(`decimal_field1`) WITH
Same query with primary index gives correct result:
SELECT min( decimal_field1 ) FROM simple_table_1 use index(`#primary`) WHERE NOT ((decimal_field1 < 5024) OR (decimal_field1 <= 5024)) ;
Result:
[
]
Uploading dataset and logs soon.
Couchbase URL: http://172.23.107.87:8091/