This is an automated email from the ASF dual-hosted git repository.
dlych pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new e75c8ef [ASTERIXDB-2892][IDX] Fixing bug w/ range queries for array
indexes.
e75c8ef is described below
commit e75c8ef10fb419e5424f2ff4e3f81fcac0c6815b
Author: Glenn <[email protected]>
AuthorDate: Tue Apr 27 18:12:57 2021 -0700
[ASTERIXDB-2892][IDX] Fixing bug w/ range queries for array indexes.
- user mode changes: no
- storage format changes: no
- interface changes: no
Given some range queries where the range is on the lower end of the
index sort order and extremely selective, queries were still taking as
long as a full dataset scan.
Cause was discovered: the sidx-search was always assuming that the
upper-bound was not defined, and the primary-index validation would
remove an excessive amount of false positives.
Change-Id: I0c2c821e7005d821056324d5736bea904dd9ad7a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11205
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>
---
.../org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java | 5 -----
1 file changed, 5 deletions(-)
diff --git
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
index 09f9e41..c78e89f 100644
---
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
+++
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
@@ -2992,11 +2992,6 @@ public class AccessMethodUtils {
ArrayIndexUtil.getFlattenedKeyFieldNames(e.getUnnestList(), project);
List<Integer> arrayIndicator =
ArrayIndexUtil.getArrayDepthIndicator(e.getUnnestList(), project);
- // Do not match a variable that we have previously matched.
- if (matchedFuncExprs.stream().anyMatch(f ->
f.findFieldName(flattenedFieldName) != -1)) {
- continue;
- }
-
Triple<Integer, List<String>, IAType> fieldTriplet =
matchAssignFieldInUnnestAssignStack(assignOp.getVariables().get(assignVarIndex),
assignVarIndex, optFuncExpr, subTree,
datasetMetaVar, context, arrayIndicator,