shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Should add a method in HintManager to hint only use default datasource and none SQL rewrite

Open mfeng-ya opened this issue 7 years ago • 11 comments

complex sql parsing always error, but it not need sharding

mfeng-ya avatar Mar 18 '19 09:03 mfeng-ya

Skip complex SQL parsing is not good way to solve the issue, the better solution is make complex SQL parsing accurate. So we prefer make great efforts on SQL parsing, but not skip them on some special situation.

terrymanu avatar Mar 18 '19 10:03 terrymanu

@terrymanu You're right,however it's also good to provide another way for users to choose for themselves.

mfeng-ya avatar Mar 18 '19 11:03 mfeng-ya

and might perform better

mfeng-ya avatar Mar 18 '19 11:03 mfeng-ya

Provide another way may out of sharding sphere's scope. For example, use 2 datasource, one with sharding sphere, other one without sharding sphere.

terrymanu avatar Mar 18 '19 11:03 terrymanu

Users must be aware of the impact , only take effect with sharding sphere datasource

mfeng-ya avatar Mar 18 '19 11:03 mfeng-ya

If user want use sharding sphere as not transparent model (eg. know they are using default data source), that is not sharding sphere's expected usage

terrymanu avatar Mar 18 '19 15:03 terrymanu

@terrymanu

Skip complex SQL parsing is not good way to solve the issue, the better solution is make complex SQL parsing accurate. So we prefer make great efforts on SQL parsing, but not skip them on some special situation.

I've reported some issues related to this topic, and you just marked them won't fix. So could you please let us know what your plan is. Current version has so many problems to parse single node sql correctly.

joooohnli avatar Mar 19 '19 06:03 joooohnli

The plan is do better for SQL parse. We cannot afford all SQL parsed, why not join community to contribute codes? It is better than just waiting.

terrymanu avatar Mar 19 '19 09:03 terrymanu

#2017 #2018 #2059 sqls in these issues are all single node routing and supposed to be sent to physical datasource to be executed, but actually failed because of wrong sql parsing.

How about changing back to Druid SQL parsing, which could make sure SQL compatibility as much as possible. @terrymanu

joooohnli avatar Mar 20 '19 01:03 joooohnli

@joooohnli You can try to switch data sources on your own.

mfeng-ya avatar Mar 20 '19 03:03 mfeng-ya

Can I close this issue?

terrymanu avatar May 14 '19 03:05 terrymanu