[GitHub] [shardingsphere] tristaZero commented on issue #5544: Range from 0 to more than Integer.MAX_VALUE occur exception

2020-05-21 Thread GitBox


tristaZero commented on issue #5544:
URL: https://github.com/apache/shardingsphere/issues/5544#issuecomment-632448813


   > In the range query, we should initialize range class with the same data 
type to avoid such exception.
   @strongduanmu Hi, which class does do you mean?



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




[GitHub] [shardingsphere] tristaZero commented on issue #5544: Range from 0 to more than Integer.MAX_VALUE occur exception

2020-05-21 Thread GitBox


tristaZero commented on issue #5544:
URL: https://github.com/apache/shardingsphere/issues/5544#issuecomment-632036197


   @strongduanmu Hi Thanks for your attention. 
   
   From my understanding, there are two of ways to fix this issue.
   1. Like you said, `getBigInteger()` always return `BigInteger` instead of 
`longValue()` and `intValue()`. But you need to check whether this way impacts 
other functions or modules.
   2. Give a check and typecast (If needed) of `value1` and `value2` in 
`mergeRangeRouteValues()`
   , which will only take effect on `WhereClauseShardingConditionEngine`. 
   
   Since it locates in the core module, we should pay more attention to it. For 
me, I prefer the first one, and welcome your comment and PR!  



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