<p dir="auto">that was the pervious question:</p>
<p dir="auto">I used the XML of mybatis-plus to write simple query statements, but there was no shard rule, so the database table could not be found</p>
<p dir="auto">here's my code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="spring.shardingsphere.datasource.names=ds0
spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://xxx:3306/xxx_user_profile?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false
spring.shardingsphere.datasource.ds0.username=xxx
spring.shardingsphere.datasource.ds0.password=xxxxxxx

spring.shardingsphere.props.sql.show= true

spring.shardingsphere.sharding.tables.user_tag_.actual-data-nodes = ds0.user_tag_$-&gt;{0..31}
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.sharding-column = ax_uid
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.algorithm-expression = user_tag_$-&gt;{ax_uid % 32}

&lt;select id=&quot;listByAxUidFromXml&quot; resultMap=&quot;BaseResultMap&quot;&gt;
		select &lt;include refid=&quot;Base_Column_List&quot;/&gt;
		from user_tag
		where ax_uid = #{axUid}
&lt;/select&gt;"><pre class="notranslate"><code class="notranslate">spring.shardingsphere.datasource.names=ds0
spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://xxx:3306/xxx_user_profile?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false
spring.shardingsphere.datasource.ds0.username=xxx
spring.shardingsphere.datasource.ds0.password=xxxxxxx

spring.shardingsphere.props.sql.show= true

spring.shardingsphere.sharding.tables.user_tag_.actual-data-nodes = ds0.user_tag_$-&gt;{0..31}
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.sharding-column = ax_uid
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.algorithm-expression = user_tag_$-&gt;{ax_uid % 32}

&lt;select id="listByAxUidFromXml" resultMap="BaseResultMap"&gt;
		select &lt;include refid="Base_Column_List"/&gt;
		from user_tag
		where ax_uid = #{axUid}
&lt;/select&gt;
</code></pre></div>
<p dir="auto">Because I need to use the XML of mybatis plus to write complex SQL, please tell me whether it is supported or there is a problem with it,Thank you.</p>
<h2 dir="auto">Question</h2>
<p dir="auto">when I use join query with two databases, it will throw this error<br>
<code class="notranslate">String sql = "select * from t_user t join p_order p on t.id = p.user_id "; while (rs.next()) { for (int i = 1; i &lt;= count; i++) { System.out.print(rs.getObject(i)); if (i != count) { System.out.print("|"); } } System.out.println(); } </code></p>
<p dir="auto">`java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.Number</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="at org.apache.calcite.avatica.util.AbstractCursor$NumberAccessor.getNumber(AbstractCursor.java:722)
at org.apache.calcite.avatica.util.AbstractCursor$TimestampFromNumberAccessor.getTimestamp(AbstractCursor.java:996)
at org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:372)
at org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:393)
at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult.getValue(JDBCStreamQueryResult.java:87)
at org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult.getValue(StreamMergedResult.java:47)
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getObject(ShardingSphereResultSet.java:359)`"><pre class="notranslate"><code class="notranslate">at org.apache.calcite.avatica.util.AbstractCursor$NumberAccessor.getNumber(AbstractCursor.java:722)
at org.apache.calcite.avatica.util.AbstractCursor$TimestampFromNumberAccessor.getTimestamp(AbstractCursor.java:996)
at org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:372)
at org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:393)
at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult.getValue(JDBCStreamQueryResult.java:87)
at org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult.getValue(StreamMergedResult.java:47)
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getObject(ShardingSphereResultSet.java:359)`
</code></pre></div>
<p dir="auto">it will cast timestamp to Number and error, if I just use single table query ,it's ok like this<br>
'String sql = "select * from t_user t ";'</p>