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-unsubscr...@shardingsphere.apache.org

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


Reply via email to