You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/08/05 11:02:03 UTC

[GitHub] [shardingsphere] johnny2002 commented on issue #6458: How to skip sql parse and rewrite phase

johnny2002 commented on issue #6458:
URL: https://github.com/apache/shardingsphere/issues/6458#issuecomment-669128677


   > @johnny2002 The reason is that we can not know whether this `logicTableName` exists at your input SQL if there is no SQL parsing.
   > 
   > > > sql parsing is a necessary phase.
   > > 
   > > 
   > > If you know the logicTableName, why do you need to parse SQL?
   > > So suggestted solution:
   > > HintManager hintManager = HintManager.getInstance();
   > > hintManager.setDatabaseShardingValue("0");
   > > hintManager.setLogicTableName("tab_user");
   > > Then skip sql parsing
   
   Dear,
   Since I already told you the logicTableName, you should treat it as exists, even sometimes, the logicTableName not exists in SQL, but this is my intent. e.g. I want to use the sharding rule of table-a to shard table-b, this should be allowed.
   
   Hope you can double check my suggestion. This feature should broadly promote the usage of Sharding-jdbc.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org