You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2026/07/29 14:27:54 UTC

[S] Change in asterixdb[master]: [ASTERIXDB-3800][COMP]: speed up access-method analysis dedup from O(...

From Janhavi Tripurwar <ja...@apache.org>:

Attention is currently required from: Ali Alsuliman.

Hello Ali Alsuliman, Anon. E. Moose #1000171, Jenkins, 

I'd like you to reexamine a change. Please visit

    https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21368?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Contrib+1 by Anon. E. Moose #1000171, Integration-Tests+1 by Jenkins


Change subject: [ASTERIXDB-3800][COMP]: speed up access-method analysis dedup from O(n^2) to O(n)
......................................................................

[ASTERIXDB-3800][COMP]: speed up access-method analysis dedup from O(n^2) to O(n)

Details:
-  AccessMethodUtils.addNewOptFuncExprToAnalysisCtx deduplicated each new
   candidate by scanning all already-matched func-exprs and calling a deep
   AbstractFunctionCallExpression.equals() on each. Per insertion this is
   O(n x expr-size), i.e. O(n^2) overall for conditions with many
   conjuncts/disjuncts (e.g. a large IN list expanded to a 430-way OR).

-  Add a side HashSet<AbstractFunctionCallExpression> (matchedFuncExprSet)
   in AccessMethodAnalysisContext, maintained in lockstep with
   matchedFuncExprs via addMatchedFuncExpr, and replace the linear scan
   with an O(1) containsMatchedFuncExpr() lookup.

- Compile-time only; no runtime/plan change.

Ext-Ref: MB-72987

Change-Id: Ie9cbb77084510244bd119cbd2f1023c816ae351e
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodAnalysisContext.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
2 files changed, 15 insertions(+), 5 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/21368/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21368?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ie9cbb77084510244bd119cbd2f1023c816ae351e
Gerrit-Change-Number: 21368
Gerrit-PatchSet: 3
Gerrit-Owner: Janhavi Tripurwar <ja...@apache.org>
Gerrit-Reviewer: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Janhavi Tripurwar <ja...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Attention: Ali Alsuliman <al...@gmail.com>