New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes QueryResultUtil#getValueByColumnType unsigned int & bigint return value. #3288
Conversation
} | ||
BigDecimal value = resultSet.getBigDecimal(columnIndex); | ||
if (new BigDecimal(Long.MAX_VALUE).compareTo(value) <= -1) { | ||
return value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe return value.toBigInteger()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe return value.toBigInteger()?
Hi, yes, return BigInteger
is a good way, as the same with ShardingSphere team review suggestion. Thanks.
...src/main/java/org/apache/shardingsphere/core/execute/sql/execute/result/QueryResultUtil.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/shardingsphere/core/execute/sql/execute/result/QueryResultUtil.java
Outdated
Show resolved
Hide resolved
BigDecimal value = resultSet.getBigDecimal(columnIndex); | ||
if (new BigDecimal(Long.MAX_VALUE).compareTo(value) <= -1) { | ||
return value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use BigInteger replace BigDecimal may be better.
can use getBigDecimal().toBigInteger to get BigInteger
Fixes #3231 .
Changes proposed in this pull request:
@tuohai666 Please help me with the code review, Thanks.