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/09/25 08:28:24 UTC
[XL] Change in asterixdb[master]: [NO ISSUE][COMP] Drop CLUSTER BY's unread member record and centroid
From Ali Alsuliman <al...@gmail.com>:
Ali Alsuliman has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21889?usp=email )
Change subject: [NO ISSUE][COMP] Drop CLUSTER BY's unread member record and centroid
......................................................................
[NO ISSUE][COMP] Drop CLUSTER BY's unread member record and centroid
- user model changes: no
- storage format changes: no
- interface changes: no
Details: CLUSTER BY reported its member record as used whether or not
anything still read it. Once the aggregate pushdown turned a members
subquery into a nested plan reading a few fields, the record, and the
whole input records it is built from, stayed live: the join and the
replicate carried them, and the columnar scans read every column.
The expansion also always built the per-row assignment centroid. When
nothing reads the centroid, the aggregate over it is pruned only after
a projection has pinned it, so a vector per row still went through the
partitioning and the sort. It is now built only when the reported
centroid, or a pushed members-subquery, reads it.
Ext-ref: MB-74142
Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
Change-Id: I64515bed33115e0b507c27dc010a2c0db0e94c5e
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/RewriteClusterByToKMeansRule.java
A asterixdb/asterix-app/src/test/resources/optimizerts/queries/cluster-by/kmeans-join-members-projected.sqlpp
M asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-decor-validate.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-init-random-validate.plan
A asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-join-members-projected.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-limit-input-validate.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-syntax-full-validate.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/cluster-by/kmeans-syntax-validate.plan
M asterixdb/asterix-app/src/test/resources/runtimets/results/cluster-by/kmeans-num-iterations/kmeans-num-iterations.10.plan
M asterixdb/asterix-app/src/test/resources/runtimets/results/cluster-by/kmeans-num-iterations/kmeans-num-iterations.11.plan
M asterixdb/asterix-app/src/test/resources/runtimets/results/cluster-by/kmeans-num-iterations/kmeans-num-iterations.12.plan
M asterixdb/asterix-app/src/test/resources/runtimets/results/cluster-by/kmeans-num-iterations/kmeans-num-iterations.8.plan
M asterixdb/asterix-app/src/test/resources/runtimets/results/cluster-by/kmeans-num-iterations/kmeans-num-iterations.9.plan
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ClusterByOperator.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/UsedVariableVisitor.java
15 files changed, 1,492 insertions(+), 1,151 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/89/21889/1
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21889?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I64515bed33115e0b507c27dc010a2c0db0e94c5e
Gerrit-Change-Number: 21889
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>