Hi Apache IoTDB,

Thanks for the careful review.

I have pushed updates to PR #17843:
https://github.com/apache/iotdb/pull/17843

The latest changes address the review comments:

- Simplified SelectAlias so it only stores the canonical alias name and
output position. For resolveGroupBySelectAlias, the resolved expression is
now picked from outputExpressions by position, similar to GROUP BY ordinal
handling.
- Fixed SELECT alias resolution for GROUP BY ROLLUP / CUBE / GROUPING SETS,
including resolved-expression mapping for grouping sets.
- Restored ORDER BY analysis to use orderByScope by default, while
preserving explicit SELECT alias precedence.
- Added/updated analyzer unit tests in SelectAliasReuseTest.
- Added table-model integration tests in the existing
IoTDBTableAggregationIT class.

I also verified the changes locally with:
- SelectAliasReuseTest
- IoTDBTableAggregationIT#selectAliasInGroupByAndOrderByTest
- spotless for datanode and integration-test

One note: ROLLUP/CUBE currently still hit the existing execution-layer
limitation “Only support one groupingSet now”, so the IT covers that they
pass alias analysis and reach the current execution limitation, while the
analyzer behavior is covered by UTs.

Best,
Bryan Yang(杨易达)

Reply via email to