userhujiong opened a new issue, #19998:
URL: https://github.com/apache/shardingsphere/issues/19998
version
```xml
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.2</version>
<exclusions>
<exclusion>
<artifactId>jooq</artifactId>
<groupId>org.jooq</groupId>
</exclusion>
</exclusions>
</dependency>
```
config
```yml
sharding:
binding-tables:
- test,ga_app_attendance_department
tables:
ga_app_attendance_department:
actual-data-nodes:
master.ga_app_attendance_department_2022_0$->{1..8}
table-strategy:
standard:
sharding-column: checkin_sharding
sharding-algorithm-name: attendance-table-inline
test:
actual-data-nodes: master.test_2022_0$->{1..8}
table-strategy:
standard:
sharding-column: checkin_sharding
sharding-algorithm-name: attendance_dept_table-inline
```
sql
```sql
SELECT att.user_id,
*
FROM
`test` att
RIGHT JOIN (
SELECT
temp.user_id,
temp.checkin_date
FROM
(SELECT DISTINCT o.create_user_id user_id, o.checkin_date FROM
ga_app_attendance_department as o WHERE
o.checkin_sharding in
<foreach item="sharding" collection="shardingDate" open="("
separator="," close=")">
#{sharding}
</foreach>
ORDER BY o.checkin_date_time DESC
limit ${param.pageNum} , ${param.limit}
) AS temp
) AS t ON t.checkin_date = att.checkin_date
WHERE
att.user_id = t.user_id
AND att.checkin_sharding in
<foreach item="sharding" collection="shardingDate" open="("
separator="," close=")">
#{sharding}
</foreach>
GROUP BY
att.user_id
ORDER BY
max( att.checkin_date_time ) DESC
```
result
```txt
Route table ga_app_attendance_department_2022_08 does not exist, available
actual table: [test_2022_01, test_2022_02, test_2022_03, test_2022_04,
test_2022_05, test_2022_06, test_2022_07, test_2022_08]
```
--
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]