<p dir="auto">In version 4.0.1, HintManager getInstance (). SetDatabaseShardingValue () can't use, don't enter DataSourceTypeHintShardingAlgorithm，I just want to switch database, not tables</p>
<p dir="auto">m1: !!org.apache.shardingsphere.orchestration.yaml.config.YamlDataSourceConfiguration<br>
dataSourceClassName: com.zaxxer.hikari.HikariDataSource<br>
properties:<br>
driverClassName: com.mysql.cj.jdbc.Driver<br>
jdbcUrl: jdbc:mysql://127.0.0.1:3306/order_db_1?useSSL=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;transformedBitIsBoolean=true&amp;autoReconnect=true&amp;failOverReadOnly=false&amp;allowMultiQueries=true&amp;serverTimezone=GMT<br>
username: root<br>
password: admin888<br>
connectionTimeout: 30000<br>
minimumIdle: 5<br>
maximumPoolSize: 15<br>
idleTimeout: 30000<br>
maxLifetime: 120000<br>
autoCommit: true<br>
m2: !!org.apache.shardingsphere.orchestration.yaml.config.YamlDataSourceConfiguration<br>
dataSourceClassName: com.zaxxer.hikari.HikariDataSource<br>
properties:<br>
driverClassName: com.mysql.cj.jdbc.Driver<br>
jdbcUrl: jdbc:mysql://127.0.0.1:3306/order_db_2?useSSL=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;transformedBitIsBoolean=true&amp;autoReconnect=true&amp;failOverReadOnly=false&amp;allowMultiQueries=true&amp;serverTimezone=GMT<br>
username: root<br>
password: admin888<br>
connectionTimeout: 30000<br>
minimumIdle: 5<br>
maximumPoolSize: 15<br>
idleTimeout: 30000<br>
maxLifetime: 120000<br>
autoCommit: true</p>
<p dir="auto">config:<br>
sharding:<br>
defaultDatabaseStrategy:<br>
hint:<br>
algorithmClassName: cn.com.hatech.sharding.config.DataSourceTypeHintShardingAlgorithm</p>
<p dir="auto">public class DataSourceTypeHintShardingAlgorithm implements HintShardingAlgorithm {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Override
public Collection&lt;String&gt; doSharding(Collection&lt;String&gt; availableTargetNames, HintShardingValue&lt;String&gt; shardingValue) {
    if (!CollectionUtils.isEmpty(shardingValue.getValues())) {
        log.info(&quot;当前所选择的数据源是：{}&quot;,shardingValue.getValues());
        return availableTargetNames.stream().filter(availableTargetName -&gt;
                shardingValue.getValues().contains(availableTargetName)).collect(Collectors.toList());
    }
    return availableTargetNames;
}"><pre class="notranslate"><code class="notranslate">@Override
public Collection&lt;String&gt; doSharding(Collection&lt;String&gt; availableTargetNames, HintShardingValue&lt;String&gt; shardingValue) {
    if (!CollectionUtils.isEmpty(shardingValue.getValues())) {
        log.info("当前所选择的数据源是：{}",shardingValue.getValues());
        return availableTargetNames.stream().filter(availableTargetName -&gt;
                shardingValue.getValues().contains(availableTargetName)).collect(Collectors.toList());
    }
    return availableTargetNames;
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">For English only, other languages we will close it directly.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of Sharding-Sphere do you using?</h3>
<p dir="auto">2.0.3</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">result success</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/28835304/43514603-1c7ab26a-95b3-11e8-8390-46b049eae169.jpg"><img src="https://user-images.githubusercontent.com/28835304/43514603-1c7ab26a-95b3-11e8-8390-46b049eae169.jpg" alt="1" style="max-width: 100%;"></a><br>
SQL：SELECT COUNT(1) FROM training_student WHERE (follow_up_status = ? OR tel1 = ? AND del_flag = ?)</p>
<h3 dir="auto">Reason analyze</h3>
<p dir="auto">官方文档上标明支持or语句，为何上面截图中的代码不支持呢？<br>
（抱歉，英文不灵光）</p>
<h3 dir="auto">Steps to reproduce the behavior</h3>
<h3 dir="auto">For bug report, please <em>MUST</em> provide the reproduce example codes (such as a github link).</h3>
<p dir="auto">mybatis mapper.xml 中的任意select * from tb_name where field1=1 or field2=1 都不支持</p>