JackieTien97 opened a new pull request, #18179: URL: https://github.com/apache/iotdb/pull/18179
This pull request improves the handling of the `WHERE` condition in query statements to better support retries during query analysis. The main changes ensure that the original `WHERE` condition is preserved and can be restored if needed, preventing issues caused by modifications during query processing. The most important changes are: **Enhancements for Query Retry Handling:** * Added an `originalWhereCondition` field to the `QueryStatement` class, along with getter and setter methods, to store the initial `WHERE` condition for potential restoration. [[1]](diffhunk://#diff-c27f780f4ac191a945fa66f7f8a268be5e03d7720ed35e1afe0b38a0acf31537R85-R88) [[2]](diffhunk://#diff-c27f780f4ac191a945fa66f7f8a268be5e03d7720ed35e1afe0b38a0acf31537R248-R257) * Implemented the `setWhereConditionBackToOriginal()` method in `QueryStatement` to allow resetting the `WHERE` condition to its original state. * Updated the `visitQuery` method in `AnalyzeVisitor` to reset the `WHERE` condition to its original value at the start of analysis, ensuring retries work as expected. **Preservation of Original WHERE Condition:** * Modified the `analyzeGlobalTimeFilter` method in `AnalyzeVisitor` to create and store a copy of the original `WHERE` condition before extracting the time predicate, and to set this copy in the `QueryStatement`. [[1]](diffhunk://#diff-ed96fadbf5536b38a17546cbbf977c19b193174dc94e61e50cb3b282644e34fdR530-R531) [[2]](diffhunk://#diff-ed96fadbf5536b38a17546cbbf977c19b193174dc94e61e50cb3b282644e34fdR548-R549) -- 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]
