<p dir="auto">Hi community,</p>
<p dir="auto">ShardingKeyGenerator configuration on spring namespace  is like this now,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;incrementAlgorithm&quot; class=&quot;org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGenerateAlgorithmFactoryBean&quot;&gt;   
   &lt;property name=&quot;type&quot; value=&quot;INCREMENT&quot; /&gt;   
&lt;/bean&gt;   

&lt;sharding:key-generator id=&quot;orderKeyGenerator&quot; column=&quot;order_id&quot; algorithm-ref=&quot;incrementAlgorithm&quot; /&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="incrementAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGenerateAlgorithmFactoryBean"&gt;   
   &lt;property name="type" value="INCREMENT" /&gt;   
&lt;/bean&gt;   

&lt;sharding:key-generator id="orderKeyGenerator" column="order_id" algorithm-ref="incrementAlgorithm" /&gt;
</code></pre></div>
<p dir="auto">The following configuration will hide KeyGenerateAlgorithmFactoryBean may be more simplified,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;sharding:key-generate-algorithm id=&quot;incrementAlgorithm&quot; type=&quot;INCREMENT&quot;/&gt;

&lt;sharding:key-generator id=&quot;orderKeyGenerator&quot; column=&quot;order_id&quot; algorithm-ref=&quot;incrementAlgorithm&quot; /&gt;"><pre class="notranslate"><code class="notranslate">&lt;sharding:key-generate-algorithm id="incrementAlgorithm" type="INCREMENT"/&gt;

&lt;sharding:key-generator id="orderKeyGenerator" column="order_id" algorithm-ref="incrementAlgorithm" /&gt;
</code></pre></div>
<p dir="auto">But element <code class="notranslate">&lt;sharding:key-generate-algorithm&gt;</code> has some strange for keyGenerateAlgorithm itself has nothing to do with Sharding. Besides, the elements <code class="notranslate">&lt;key-generate-algorithm&gt;</code> and <code class="notranslate">&lt;key-generator&gt;</code> has a duplicate word.</p>
<p dir="auto">Do we need to make any changes to simplify this configuration? I will really appreciate any help on this. Thanks.</p>
<h2 dir="auto">Bug Report</h2>
<p dir="auto">for example db1  db2，table order</p>
<p dir="auto">sql has been routed to the target db2,  limit 15,15.but also pagination revision,sql rewrite as limit 0,30</p>
<h3 dir="auto">Which version of Sharding-Sphere did you use?</h3>
<p dir="auto">3.0.0 / 3.0.0.M4</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">use sharding-jdbc</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">select * from order where storeId=5 and (barcode is not null or barcode !='') limit 15,15</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">select * from order where storeId=5 and (barcode is not null or barcode !='') limit 0,30</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">ParsingSQLRouter-&gt;method route-&gt;isSingleRouting=false-&gt;this.processLimit-&gt;limit-&gt;rewrite</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<p dir="auto">sql:<br>
select * from order where storeId=5 and (barcode is not null or barcode !='') limit 15,15<br>
select * from order where storeId=5 and (firstcode in (1,2,3) or secondcode in (1,2,3) or thirdcode in(1,2,3)) limit 15,15</p>
<p dir="auto">config:<br>
sharding.jdbc.config.sharding.tables.order.database-strategy.standard.sharding-column: storeId</p>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>