Support sub-query Sql
Routing to single data node MySQL in documents is 100% supported, but I found that sub-query reported errors in actual test usage.
SQL is as follows: SELECT COUNT(*) FROM (SELECT * FROM chat_status WHERE id = '123' ) o
Errors were reported as follows:
Caused by: java.lang.IllegalStateException: Must have sharding column with subquery.
At com. google. common. base. Preconditions. checkState (Preconditions. java: 173)
At io. shardingsphere. core. routing. router. sharding. ParsingSQLRouter. mergeShardingValue For SubQuery (ParsingSQLRouter. java: 154)
At io. shardingsphere. core. routing. router. sharding. ParsingSQLRouter. route (ParsingSQLRouter. java: 100)
At io. shardingsphere. core. routing. PreparedStatement Routing Engine. route (PreparedStatement Routing Engine. java: 64)
At io. shardingsphere. shardingjdbc. jdbc. core. statement. ShardingPreparedStatement. sqlRoute (ShardingPreparedStatement. java: 214)
Shardingsphere. shardingjdbc. jdbc. core. statement. ShardingPreparedStatement. executeQuery (ShardingPreparedStatement. java: 106)
At im.qingtui.db.route.test.Test.
duplicate with #1753