<h3 dir="auto">Which version of Sharding-Jdbc do you using?</h3>
<p dir="auto">1.5.0</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">对较复杂sql能正确解析</p>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="### Error querying database.  Cause: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
### The error may exist in file [D:\Develop\Git\fcs2\fcs2-inv\fcs2-inv\fcs2-inv-public\target\classes\com\vip\fcs\app\item\job\dao\custom\mybatis\InvCstIntercompanyTrnSumTempMapperCustom.xml]
### The error may involve com.vip.fcs.app.item.job.dao.custom.mybatis.InvCstIntercompanyTrnSumTempMapper.queryInvCstSumQTY-Inline
### The error occurred while setting parameters
### SQL: select  id, db_no, gid, item_no, s_qty, forg_id, sorg_id,  f_c, s_c  from inv_sum_temp  where        is_deleted = 0   AND period_name = ?   AND item_no in     (  ?    ,  ?  )         AND ( forg_id in  (  ? ,  ? )           OR sorg_id in    ( ?  ,  ?   )  )        AND ( f_c in    (  ?  ,   ?  )    OR s_c in   (  ?   ,   ? )  )
### Cause: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
	... 48 more
Caused by: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.SQLParser.parseConditions(SQLParser.java:261)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.SQLParser.parseWhere(SQLParser.java:252)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.select.AbstractSelectParser.parseWhere(AbstractSelectParser.java:205)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.dialect.mysql.MySQLSelectParser.query(MySQLSelectParser.java:52)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.select.AbstractSelectParser.parse(AbstractSelectParser.java:78)
	at com.dangdang.ddframe.rdb.sharding.parsing.SQLParsingEngine.parse(SQLParsingEngine.java:63)
	at com.dangdang.ddframe.rdb.sharding.routing.router.ParsingSQLRouter.parse(ParsingSQLRouter.java:74)
	at com.dangdang.ddframe.rdb.sharding.routing.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:54)
	at com.dangdang.ddframe.rdb.sharding.jdbc.core.statement.ShardingPreparedStatement.route(ShardingPreparedStatement.java:120)
	at com.dangdang.ddframe.rdb.sharding.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:110)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	... 53 more"><pre class="notranslate"><code class="notranslate">### Error querying database.  Cause: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
### The error may exist in file [D:\Develop\Git\fcs2\fcs2-inv\fcs2-inv\fcs2-inv-public\target\classes\com\vip\fcs\app\item\job\dao\custom\mybatis\InvCstIntercompanyTrnSumTempMapperCustom.xml]
### The error may involve com.vip.fcs.app.item.job.dao.custom.mybatis.InvCstIntercompanyTrnSumTempMapper.queryInvCstSumQTY-Inline
### The error occurred while setting parameters
### SQL: select  id, db_no, gid, item_no, s_qty, forg_id, sorg_id,  f_c, s_c  from inv_sum_temp  where        is_deleted = 0   AND period_name = ?   AND item_no in     (  ?    ,  ?  )         AND ( forg_id in  (  ? ,  ? )           OR sorg_id in    ( ?  ,  ?   )  )        AND ( f_c in    (  ?  ,   ?  )    OR s_c in   (  ?   ,   ? )  )
### Cause: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
	... 48 more
Caused by: com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'OR'.
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.SQLParser.parseConditions(SQLParser.java:261)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.SQLParser.parseWhere(SQLParser.java:252)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.select.AbstractSelectParser.parseWhere(AbstractSelectParser.java:205)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.dialect.mysql.MySQLSelectParser.query(MySQLSelectParser.java:52)
	at com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.select.AbstractSelectParser.parse(AbstractSelectParser.java:78)
	at com.dangdang.ddframe.rdb.sharding.parsing.SQLParsingEngine.parse(SQLParsingEngine.java:63)
	at com.dangdang.ddframe.rdb.sharding.routing.router.ParsingSQLRouter.parse(ParsingSQLRouter.java:74)
	at com.dangdang.ddframe.rdb.sharding.routing.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:54)
	at com.dangdang.ddframe.rdb.sharding.jdbc.core.statement.ShardingPreparedStatement.route(ShardingPreparedStatement.java:120)
	at com.dangdang.ddframe.rdb.sharding.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:110)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	... 53 more
</code></pre></div>
<h3 dir="auto">Steps to reproduce the behavior</h3>
<p dir="auto">通过mybatis配置的查询sql，执行后即报错</p>
<h2 dir="auto">Feature Request</h2>
<h3 dir="auto">Is your feature request related to a problem?</h3>
<p dir="auto">I was upgrading from version 1.5.x which is support hint with other shardingStrategy.<br>
I find out that I can not only update/modify sharding-jdbc related code in my project to migrate to version 3.1.0 .</p>
<p dir="auto">example:<br>
Given a table <strong>order</strong> with columns: <strong>order_id,name,user_id</strong> sharding-column is user_id.<br>
In  UserOrderList module, I need to find all the orders belongs to this user, so we pass user_id to SQL, which is correct.<br>
But In another module ,outer system request for a Order's detail, and they only have order_id, order_id can infer a sharding value, In this case if hint supported will be very helpful.</p>
<h3 dir="auto">Describe the feature you would like.</h3>
<p dir="auto">How about support HintShardingStrategy with other ShardingStrategy at same time?<br>
make HintShardingStrategy has higher priority than other ShardingStrategy?</p>