>From Hongyu Shi <[email protected]>:

Attention is currently required from: Shahrzad Shirazi.

Hongyu Shi has posted comments on this change by Hongyu Shi. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618?usp=email )

Change subject: [ASTERIXDB-3785][COMP] Formalize CLUSTER BY WITH options
......................................................................


Patch Set 9:

(4 comments)

File 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/cluster-by/kmeans-no-descriptor/kmeans-no-descriptor.3.query.sqlpp:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618/comment/70b23db2_f9fab89f?usp=email
 :
PS9, Line 23: cluster by p.vec
Optional AS: the new kmeans-no-descriptor unit exercises the clause without the 
alias.


File 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppClusterByVisitor.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618/comment/c3a5fc4c_a0b228eb?usp=email
 :
PS9, Line 310:         if (cbc.hasClusterDescriptorVar()) {
Optional AS: with no alias declared there is nothing to substitute, so the 
rewrite skips it. The kmeans-no-descriptor test covers both read paths that 
remain (CLUSTER AS members, COUNT(*) sugar).


File 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618/comment/ee76c0c7_7560b470?usp=email
 :
PS9, Line 299:         if (cc.hasClusterDescriptorVar()) {
Optional AS: the alias joins the post-clause scope only when the query declared 
one, so a reference to an undeclared alias fails as an ordinary undefined 
identifier.


File asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618/comment/d26768ec_3028ee87?usp=email
 :
PS9, Line 6632:     ( <AS> descriptorVar = Variable() )?
Add new changes: this patchset also makes the AS alias optional (see the commit 
message).



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21618?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Iaa3724bf50fffd3b1d384a8243f5866461eabb5d
Gerrit-Change-Number: 21618
Gerrit-PatchSet: 9
Gerrit-Owner: Hongyu Shi <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Hongyu Shi <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Shahrzad Shirazi <[email protected]>
Gerrit-Attention: Shahrzad Shirazi <[email protected]>
Gerrit-Comment-Date: Fri, 28 Aug 2026 17:16:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to