azexcy commented on PR #17873:
URL: https://github.com/apache/shardingsphere/pull/17873#issuecomment-1134347558
dist sql:
```
CREATE TABLE test.t_order (
id int8 NOT NULL,
order_id int4 NOT NULL,
user_id int NOT NULL,
status varchar(50) DEFAULT NULL,
PRIMARY KEY (id)
)
```
```
CREATE TABLE test.t_order_item (
item_id int8 NOT NULL,
order_id int4 NOT NULL,
user_id int8 NOT NULL,
status varchar(50),
PRIMARY KEY (item_id)
)
```
```
ADD RESOURCE ds_2 (
URL="jdbc:postgresql://db.host:5432/ds_2?serverTimezone=UTC&useSSL=false&preferQueryMode=extendedForPrepared",
USER=root,
***
),ds_3 (
URL="jdbc:postgresql://db.host:5432/ds_3?serverTimezone=UTC&useSSL=false&preferQueryMode=extendedForPrepared",
USER=root,
***
),ds_4 (
URL="jdbc:postgresql://db.host:5432/ds_4?serverTimezone=UTC&useSSL=false&preferQueryMode=extendedForPrepared",
USER=root,
***
)
```
```
ALTER SHARDING TABLE RULE t_order(
RESOURCES(ds_2, ds_3, ds_4),
SHARDING_COLUMN=order_id,
TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
),t_order_item(
RESOURCES(ds_2, ds_3, ds_4),
SHARDING_COLUMN=order_id,
TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
)
]
```
then the error will happen
--
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]