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

   This pull request includes changes to enhance date handling and error 
reporting in arithmetic operations within the IoTDB project. The most 
significant changes involve adding new test cases, importing necessary classes, 
and handling specific exceptions for date-related operations.
   
   Enhancements to date handling and error reporting:
   
   * 
[`integration-test/src/test/java/org/apache/iotdb/relational/it/query/old/query/IoTDBArithmeticTableIT.java`](diffhunk://#diff-908fd9921b253d5bad61a0f1e2389379172b0031b3c541be95a08fe2645848f7R357-R368):
 Added new test cases in `testDateOutOfRange` to verify the correct handling of 
date arithmetic operations and ensure that the error message "Year must be 
between 1000 and 9999." is correctly triggered.
   
   * 
`iotdb-core/datanode/src/main/codegen/templates/ArithmeticBinaryColumnTransformer.ftl`:
 
     * Imported `DateTimeParseException` to handle date parsing errors and 
`DATE_OUT_OF_RANGE` status code for specific error reporting.
     * Added a catch block for `DateTimeParseException` in the class 
`${className} extends BinaryColumnTransformer` to throw an 
`IoTDBRuntimeException` with the message "Year must be between 1000 and 9999." 
and the appropriate status code.


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