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/12/30 03:08:12 UTC
[GitHub] [shardingsphere] weichaocst opened a new issue #14432: In the sharding table scenario, the result obtained by avg(distinct intField) is wrong
weichaocst opened a new issue #14432:
URL: https://github.com/apache/shardingsphere/issues/14432
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
-Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
-Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
5.0.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
The expected result is 100
### Actual behavior
The result obtained is 1
### Reason analyze (If you can)
Table Structure:
CREATE TABLE IF NOT EXISTS t_order (order_id BIGINT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, intField int(11) DEFAULT NULL, address_id BIGINT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id))
Fragmentation rules:
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..3}
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=t-order-inline
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.key-generator-name=snowflake
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
I have a physical table t_order divided into four sub-tables, and there is an intField field of type int in the four sub-tables. There are a total of 100 intField field values of 100 data in the four sub-tables, but logical SQL is executed through ShardingSphere-JDBC: select avg(distinct intField) from t_order, the result obtained is 1, and the expected value should be 100.
### 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
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #14432: In the sharding table scenario, the result obtained by avg(distinct intField) is wrong
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #14432:
URL: https://github.com/apache/shardingsphere/issues/14432#issuecomment-1002854875
Hi @weichaocst, thank you for your feedback. Can you try master branch? We have fixed this bug recently.
--
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] strongduanmu commented on issue #14432: In the sharding table scenario, the result obtained by avg(distinct intField) is wrong
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #14432:
URL: https://github.com/apache/shardingsphere/issues/14432#issuecomment-1002855132
You can get the latest jdbc jar from here——http://117.48.121.24:8080/.
--
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] strongduanmu commented on issue #14432: In the sharding table scenario, the result obtained by avg(distinct intField) is wrong
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #14432:
URL: https://github.com/apache/shardingsphere/issues/14432#issuecomment-1018058701
Close because long time no response.
--
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] strongduanmu closed issue #14432: In the sharding table scenario, the result obtained by avg(distinct intField) is wrong
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #14432:
URL: https://github.com/apache/shardingsphere/issues/14432
--
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