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 2021/04/18 03:52:33 UTC

[GitHub] [shardingsphere] November22 opened a new issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

November22 opened a new issue #10119:
URL: https://github.com/apache/shardingsphere/issues/10119


   I specified the generic type as the time type, but in actual use it is indeed a string type, which makes me feel puzzled。
   version: 4.1.1
   Slice key: create_time
   SQL:select * from t_trade where create_time >= '2021-07-12' order by create_time desc
   RangeShardingAlgorithm:
   ![image](https://user-images.githubusercontent.com/26109828/115133653-7bc63000-a03c-11eb-8e43-2721ae1e4bcb.png)
   
   Exception:
   java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.String
   
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] November22 commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   is there a release version of 5.0.0? I want to use version 4.1。
   In fact, the generic type of StandardShardingAlgorithm does not convert or verify the actual value。I specify a BigInteger type as Date type, and no error will be reported。 I think this should be converted, and an exception is thrown if the conversion fails.
   ![image](https://user-images.githubusercontent.com/26109828/115192475-6ffe6a80-a11d-11eb-8d38-36ecc37aff8a.png)
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero edited a comment on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #10119:
URL: https://github.com/apache/shardingsphere/issues/10119#issuecomment-826314458


   Hi please try the released one, i.e., 5.0.0-alpha


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] November22 commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   OK, when is the release time of 5. X? ☺


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   Hi @November22 ,  is this problem exists in version 5.0.0?   did you have a try?


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   Hi please try the release one, i.e., 5.0.0-alpha


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero edited a comment on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #10119:
URL: https://github.com/apache/shardingsphere/issues/10119#issuecomment-826314458


   Hi please try the released one, i.e., 5.0.0-alpha


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang closed issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #10119:
URL: https://github.com/apache/shardingsphere/issues/10119


   


-- 
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] tristaZero commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   Hi please try the release one, i.e., 5.0.0-alpha


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   Hi as @RaigorJiang said, we have fixed this one from 5.x release.


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] November22 commented on issue #10119: RangeShardingAlgorithm Generic problem, specified as Date, actually a string

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


   Sorry, ClassCastException is indeed thrown when doing actual value acquisition. 
   Now I have a doubt. When actually inserting or querying, instead of creating SQL by replacing values, I use string values directly in SQL, such as create_time> '2021-04-19', then the incoming points The slice value type is a string, although it is a time type in the database.
   version: 5.0.0-alpha 
   ![image](https://user-images.githubusercontent.com/26109828/115193844-43e3e900-a11f-11eb-992f-338915417b44.png)
   


-- 
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:
users@infra.apache.org