You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "tuichenchuxin (via GitHub)" <gi...@apache.org> on 2023/06/28 08:14:31 UTC
[GitHub] [shardingsphere] tuichenchuxin opened a new issue, #26654: Alter sql_parse rule not really change the parser engine.
tuichenchuxin opened a new issue, #26654:
URL: https://github.com/apache/shardingsphere/issues/26654
## Bug Report
### Which version of ShardingSphere did you use?
master - 56835d1531f22c7012d7c67fc774c2f85efa285f
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
proxy
### Expected behavior
refresh parser engine
### Actual behavior
not change parser engine
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```sql
ALTER SQL_PARSER RULE (
SQL_COMMENT_PARSE_ENABLED=false,
PARSE_TREE_CACHE(INITIAL_CAPACITY=128, MAXIMUM_SIZE=1024),
SQL_STATEMENT_CACHE(INITIAL_CAPACITY=2000, MAXIMUM_SIZE=65535)
);
```
change to false, but parser engine still parse Comment info.
use this sql to debug.
```sql
/* SHARDINGSPHERE_HINT: t_order_item.SHARDING_DATABASE_VALUE=1, t_order_item.SHARDING_TABLE_VALUE=1 */ select * from t_order_item;
```
```
- !SHARDING
defaultDatabaseStrategy:
standard:
shardingAlgorithmName: database_inline
shardingColumn: user_id
defaultTableStrategy:
none: ''
keyGenerators:
snowflake:
type: SNOWFLAKE
shardingAlgorithms:
database_inline:
props:
algorithm-expression: ds_${user_id % 2}
type: INLINE
t_order_inline:
props:
algorithm-expression: t_order_${order_id % 2}
type: INLINE
t_order_item_inline:
props:
algorithm-expression: t_order_item_${order_id % 2}
type: INLINE
t_order_item_hint_inline:
props:
algorithm-expression: ds_${Integer.valueOf(value) % 2}
type: HINT_INLINE
t_order_item_table_hint_inline:
props:
algorithm-expression: t_order_item_${Integer.valueOf(value) % 2}
type: HINT_INLINE
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..1}
keyGenerateStrategy:
column: order_id
keyGeneratorName: snowflake
logicTable: t_order
tableStrategy:
standard:
shardingAlgorithmName: t_order_inline
shardingColumn: order_id
t_order_item:
actualDataNodes: ds_${0..1}.t_order_item_${0..1}
databaseStrategy:
hint:
shardingAlgorithmName: t_order_item_hint_inline
keyGenerateStrategy:
column: order_item_id
keyGeneratorName: snowflake
logicTable: t_order_item
tableStrategy:
hint:
shardingAlgorithmName: t_order_item_table_hint_inline
```
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang closed issue #26654: Alter sql_parse rule not really change the parser engine.
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #26654: Alter sql_parse rule not really change the parser engine.
URL: https://github.com/apache/shardingsphere/issues/26654
--
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