RaigorJiang opened a new issue, #23823:
URL: https://github.com/apache/shardingsphere/issues/23823
## Bug Report
### Which version of ShardingSphere did you use?
master ae722dbf
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
The DistSQL obtained by convert yaml is correct
### Actual behavior
`CREATE SHARDING TABLE RULE` statement is incorrect when there is no table
strategy.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
- test.yaml
```yaml
databaseName: sharding_db
dataSources:
ds_0:
url:
jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url:
jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order
databaseStrategy:
complex:
shardingColumns: order_id, user_id
shardingAlgorithmName: complex_test
tableStrategy:
none:
keyGenerateStrategy:
column: order_id
keyGeneratorName: snowflake
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
shardingAlgorithms:
complex_test:
type: COMPLEX_INLINE
props:
algorithm-expression: ds_${(order_id + user_id) % 2}
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
```
- DistSQL
```sql
CONVERT YAML CONFIGURATION FROM FILE '/xxx/test.yaml'
```
--
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]