Index: impl/memory/datastore_query_execution_test.go |
diff --git a/impl/memory/datastore_query_execution_test.go b/impl/memory/datastore_query_execution_test.go |
index 7e8af383a47a048c8a4da2c62f9e8594efe32b11..59fd2e8d6823e562c3d74bdabd9ee6bc4eeeeaa0 100644 |
--- a/impl/memory/datastore_query_execution_test.go |
+++ b/impl/memory/datastore_query_execution_test.go |
@@ -511,6 +511,29 @@ var queryExecutionTests = []qExTest{ |
}, |
}, |
}}, |
+ |
+ {"regression: avoid index bleedover for common fields in compound indices", []qExStage{ |
+ { |
+ addIdxs: []*ds.IndexDefinition{ |
+ indx("Kind", "A", "B"), |
+ indx("Other", "A", "B"), |
+ }, |
+ putEnts: []ds.PropertyMap{ |
+ pmap( |
+ "$key", key("Kind", 1), Next, |
+ "A", "value", Next, |
+ "B", "value", Next), |
+ }, |
+ }, |
+ { |
+ expect: []qExpect{ |
+ { |
+ q: nq("Other").Eq("A", "value").Order("B"), |
+ get: []ds.PropertyMap{}, |
+ }, |
+ }, |
+ }, |
+ }}, |
} |
func TestQueryExecution(t *testing.T) { |