JackieTien97 opened a new pull request, #16248: URL: https://github.com/apache/iotdb/pull/16248
This pull request updates the device view aggregation logic in the query engine to better handle User-Defined Table Functions (UDTFs) and clarifies when special processing is needed. The main changes involve extending the special-case handling to include UDTFs and refactoring related method names for clarity. **Device view aggregation logic improvements:** * Updated the comment in `Analysis.java` to clarify that `deviceViewSpecialProcess` applies when all Aggregation Functions, UDTFs, and DIFF are present, not just Aggregation Functions and DIFF. * Modified the logic in `SourceRewriter.java` so that special processing for device views is triggered when UDTFs are present, in addition to existing conditions. This is achieved by checking for the UDTF function type in the relevant method. * Added `FunctionType` import in `SourceRewriter.java` to support the new UDTF check. **Code clarity and maintainability:** * Renamed the method `aggregationCannotUseMergeSort()` to `cannotUseAggMergeSort()` in `SourceRewriter.java` for improved readability and accuracy. [[1]](diffhunk://#diff-aeb97b321b306b0b926b350f5b29cd7e9d7673c211ba12825aeeb8a52ae9bb07L390-R406) [[2]](diffhunk://#diff-aeb97b321b306b0b926b350f5b29cd7e9d7673c211ba12825aeeb8a52ae9bb07L220-R221) * Updated all method calls and logic to use the new method name and signature. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
