280780363 opened a new issue, #31608:
URL: https://github.com/apache/shardingsphere/issues/31608
- db: mysql 8.0
- sharding sphere version ,docker image: apache/shardingsphere-proxy:5.5.0
- sharding rule config:
```yaml
- !SHARDING
tables:
feature_data:
actualDataNodes: eqms_sharding_test.feature_data_${201706..201713}
tableStrategy:
standard:
shardingColumn: date_stamp
shardingAlgorithmName: week-algorithms
keyGenerateStrategy:
column: feature_data_id
keyGeneratorName: snowflake
waveform_data:
actualDataNodes: eqms_sharding_test.waveform_data_${201706..201713}
tableStrategy:
standard:
shardingColumn: date_stamp
shardingAlgorithmName: week-algorithms
keyGenerateStrategy:
column: waveform_data_id
keyGeneratorName: snowflake
operation_data:
actualDataNodes: eqms_sharding_test.operation_data_${201706..201713}
tableStrategy:
standard:
shardingColumn: date_stamp
shardingAlgorithmName: week-algorithms
keyGenerateStrategy:
column: operation_data_id
keyGeneratorName: snowflake
keyGenerators:
snowflake:
type: SNOWFLAKE
shardingAlgorithms:
week-algorithms:
type: INTERVAL
props:
datetime-pattern: "yyyy-MM-dd HH:mm:ss" # 分片字段格式
datetime-lower: "2017-01-01 00:00:00" # 范围下限
datetime-upper: "2038-12-30 23:59:59" # 范围上限
sharding-suffix-pattern: "yyyyww" # 分片名后缀,可以是MM,yyyyMMdd等。
datetime-interval-amount: 1 # 分片间隔,这里指一个月
datetime-interval-unit: "WEEKS" # 分片间隔单位
```
- bug description:
when i use "partition by" in select field, i get unexpected rows, my
shading rule is by "WEEKS", and this query should be use tables
"feature_data_201710/feature_data_201711/operation_data_201710/operation_data_201711"
this is my expected rows from really table:

bug i got only one row:

this is sql log:

It is interesting that if use rownumber() can be got expected rows:

I guess it's because the aggregate function and the patition by grouping
caused the result to only return the first item.
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]