Details
Description
./testrunner -i b/resources/dev-6-nodes-xdcr_n1ql_2i.ini -t rqg.test_rqg.RQGTests.test_rqg_concurrent_with_predefined_input,database=multiple_table_db,reset_database=True,concurreny_count=1,index_quota_percent=40,use_mysql=False,replicas=0,input_rqg_path=/tmp/data_dump,populate_with_replay=True,reset_database=True,create_secondary_indexes=True,run_query_with_primary=True
Scenario :: run_query_without_index_hint
Reason :: Results are incorrect.Actual num 251. Expected num: 484.:: mismatch in results :: expected :: [
,
{u'int_field1': 123},
{u'int_field1': 143},
{u'int_field1': 148},
{u'int_field1': 181}], actual :: [
{u'int_field1': 90},
{u'int_field1': 123},
{u'int_field1': 143},
{u'int_field1': 181},
{u'int_field1': 271}]
Explain
{
"requestID": "5909e511-f823-45a6-b763-b69bdb9945bc",
"signature": "json",
"results": [
{
"#operator": "Sequence",
"~children": [
{
"#operator": "UnionScan",
"scans": [
{
"#operator": "IndexScan",
"index": "simple_table_idx_char_field1_bool_field1_datetime_field1",
"keyspace": "simple_table",
"limit": 9.223372036854776e+18,
"namespace": "default",
"spans": [
{
"Range":
,
"Seek": null
},
{
"Range":
,
"Seek": null
}
],
"using": "gsi"
}
]
},
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
,
,
{ "#operator": "InitialGroup", "aggregates": [], "group_keys": [ "(`simple_table`.`int_field1`)" ] } ]
}
},
,
,
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
,
{
"#operator": "InitialProject",
"result_terms": [
]
},
]
}
}
]
}
],
"status": "success",
"metrics":
}
cbq>
This works fine with primary index
cbq> SELECT int_field1 FROM simple_table USE INDEX(`#primary` USING GSI) WHERE NOT ((NOT (bool_field1) OR char_field1 = "N")) GROUP BY int_field1 ;
{
"requestID": "8ade4651-e5f7-4e1b-9482-04f50a01a3f5",
"signature":
,
"results": [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
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 , 53 )) OR (int_field1 IS NULL))
n1ql_query :: SELECT int_field1 FROM simple_table WHERE NOT ((NOT (bool_field1) OR char_field1 = "N")) GROUP BY int_field1 HAVING NOT ((int_field1 IN [ 16 , 23 , 25 , 39 , 53 ]) OR (int_field1 IS NULL))