FearfulTomcat27 opened a new pull request, #13711:
URL: https://github.com/apache/iotdb/pull/13711

   This pull request introduces several changes to enhance arithmetic 
operations in the IoTDB project, particularly focusing on handling date 
arithmetic and overflow scenarios. The key updates include adding a new status 
code for date out-of-range errors, updating test cases to cover these 
scenarios, and refining the error handling logic.
   
   ### Enhancements to Arithmetic Operations:
   
   * 
[`iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java`](diffhunk://#diff-02b6f3f950aa3c87eed0b5ec88c3f8724e2b5fbc2c92d897512986f620ec5bd7R139):
 Added a new status code `DATE_OUT_OF_RANGE` to handle date-related errors.
   
   ### Test Case Updates:
   
   * 
[`integration-test/src/test/java/org/apache/iotdb/relational/it/query/old/query/IoTDBArithmeticTableIT.java`](diffhunk://#diff-908fd9921b253d5bad61a0f1e2389379172b0031b3c541be95a08fe2645848f7R72-R75):
 Added new test cases for date arithmetic operations and overflow scenarios. 
[[1]](diffhunk://#diff-908fd9921b253d5bad61a0f1e2389379172b0031b3c541be95a08fe2645848f7R72-R75)
 
[[2]](diffhunk://#diff-908fd9921b253d5bad61a0f1e2389379172b0031b3c541be95a08fe2645848f7R298-R299)
   
   ### Error Handling Improvements:
   
   * 
[`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java`](diffhunk://#diff-7f6166a8f1581ee65b7d661a090b3d223876333b1a5e7e70ee3df545c16f9809L109-R110):
 Updated the error handling logic to include the new `DATE_OUT_OF_RANGE` status 
code.
   
   ### Code Generation Templates:
   
   * 
[`iotdb-core/datanode/src/main/codegen/templates/ArithmeticBinaryColumnTransformer.ftl`](diffhunk://#diff-9cd2377fe278d6e4ebe464a12c9b88e50281580fcc974a1fcae71319cd295a89R45-R49):
 Enhanced the arithmetic binary column transformer to handle date arithmetic 
and overflow scenarios more robustly, including catching 
`DateTimeParseException` and throwing a new `IoTDBRuntimeException` for date 
out-of-range errors.
   


-- 
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]

Reply via email to