You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/20 02:25:58 UTC

[GitHub] [shardingsphere] ZZemptypoint opened a new issue, #17821: LocalDateTime cannot be cast to String

ZZemptypoint opened a new issue, #17821:
URL: https://github.com/apache/shardingsphere/issues/17821

   ## Bug Report
   
   My sharding column's type is **java.time.LocalDateTime**.
   When I execute sql
   ```SQL
   select * from table where time between a and b group by time
   ```
   get the Exception:
   <pre>
   Caused by: java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
   	at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getString(ShardingSphereResultSet.java:192) ~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
   	at org.apache.ibatis.logging.jdbc.ResultSetLogger.printColumnValues(ResultSetLogger.java:111) ~[mybatis-3.5.7.jar:3.5.7]
   </pre>
   
   ### Which version of ShardingSphere did you use?
   
   shardingsphere-jdbc-core-spring-boot-starter 5.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
    ShardingSphere-JDBC
   
   ### Expected behavior
   
   log correctly.
   
   ### Actual behavior
   
   NO.
   
   ### Reason analyze (If you can)
   
   In **org.apache.shardingsphere.driver.jdbc.core.resultset.ResultSetUtil.java** function convertValue(), converting to String must be a higher priority.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   As above.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] terrymanu commented on issue #17821: LocalDateTime cannot be cast to String

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #17821:
URL: https://github.com/apache/shardingsphere/issues/17821#issuecomment-1182078057

   LocalDateTime cannot support is not critical issue, I just as the issue as `good pro issue`, welcome interested contributor handle this one.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] ZZemptypoint closed issue #17821: LocalDateTime cannot be cast to String

Posted by GitBox <gi...@apache.org>.
ZZemptypoint closed issue #17821:  LocalDateTime cannot be cast to String
URL: https://github.com/apache/shardingsphere/issues/17821


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org