yu199195 commented on a change in pull request #8693:
URL: https://github.com/apache/shardingsphere/pull/8693#discussion_r547175395



##########
File path: 
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java
##########
@@ -124,7 +126,16 @@ private int getLastPartition(final Range<Comparable<?>> 
valueRange) {
     }
     
     private long parseDate(final Comparable<?> shardingValue) {
-        LocalDateTime dateValue = 
LocalDateTime.parse(shardingValue.toString(), DATE_TIME_FORMAT);
+        LocalDateTime dateValue;

Review comment:
       Thank you very much for your contribution. 
   
   Now I would like to know when shardingValue is Date or LocalDateTime?
   
   We can't judge the treatment so simply,  because we define DateTimeFormatter 
like this 
   
   ```
   DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
   ```
   
   if you data or config not follow this, An exception is thrown, so you need 
to follow this DateTimeFormatter .
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to