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/08/09 05:21:40 UTC
[GitHub] [shardingsphere] mazhai opened a new issue #11713: The query result is incorrect
mazhai opened a new issue #11713:
URL: https://github.com/apache/shardingsphere/issues/11713
### Which version of ShardingSphere did you use?
5.0.0-beta
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
I have an executed SQL
```
select a.ct from(
SELECT
count( 1 ) as ct
FROM
service_attendance_detail sad
WHERE
sad.course_date between '2021-07-01 00:00:00' and '2021-10-31 00:00:00'
) a
```
`service_attendance_detail` is sharding table
config-sharding.yaml
```
rules:
- !SHARDING
tables:
service_attendance_detail:
actualDataNodes: ds_0.service_attendance_detail_2021_0$->{1..9},ds_0.service_attendance_detail_2021_1$->{0..2}
tableStrategy:
standard:
shardingColumn: course_date
shardingAlgorithmName: t_order_inline #截取该字段的5-6位决定落在哪张表
keyGenerateStrategy:
column: id
keyGeneratorName: snowflake
bindingTables:
- service_attendance_detail
shardingAlgorithms:
t_order_inline:
type: INTERVAL
props:
datetime-pattern: yyyy-MM-dd HH:mm:ss
datetime-lower: "2021-01-01 00:00:00"
sharding-suffix-pattern: _yyyy_MM # 表名后缀格式,一定要跟创建的表名后缀一致。
datetime-upper: "2021-12-31 23:59:59"
datetime-interval-unit: MONTHS # 按照月份分表
```
I want the result
![image](https://user-images.githubusercontent.com/5811436/128663101-a31bc3a0-8f92-4d48-b41a-506e1ad1be9b.png)
### Actual behavior
![image](https://user-images.githubusercontent.com/5811436/128663120-bbc0c971-e13d-4538-9cbd-3d110ca6c515.png)
The result is not one line, but one result every month, which is not what I want
--
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