You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "China-Uncle (via GitHub)" <gi...@apache.org> on 2023/04/25 07:53:39 UTC

[GitHub] [shardingsphere] China-Uncle opened a new issue, #25320: mybatis cross-database joint query

China-Uncle opened a new issue, #25320:
URL: https://github.com/apache/shardingsphere/issues/25320

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
                   <groupId>org.apache.shardingsphere</groupId>
                   <artifactId>shardingsphere-jdbc-core</artifactId>
                   <version>5.3.2</version>
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   ### Actual behavior
   
   `org.springframework.jdbc.UncategorizedSQLException: 
   ### Error querying database.  Cause: java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long
   ### The error may exist in file [D:\work\Java\member_center\modules\member\target\classes\mapper\MemberMapper.xml]
   ### The error may involve com.evercare.member.mapper.MemberMapper.searchPlus-Inline
   ### The error occurred while setting parameters
   ### SQL: select * from member inner join info on member.custom_id=info.custom_id where  member.id =?   and info.update_time>= ?    
   ### Cause: java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long
   ; uncategorized SQLException; SQL state [null]; error code [0]; exception while executing query: java.lang.Integer cannot be cast to java.lang.Long; nested exception is java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long
   
   	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
   	at com.sun.proxy.$Proxy97.selectList(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:166)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:77)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
   	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
   	at com.sun.proxy.$Proxy98.searchPlus(Unknown Source)
   	at com.evercare.member.service.impl.MemberServiceImpl.searchPlus(MemberServiceImpl.java:45)
   	at com.evercare.member.service.impl.MemberServiceImpl$$FastClassBySpringCGLIB$$eacf3ac8.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
   	at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
   	at com.evercare.member.service.impl.MemberServiceImpl$$EnhancerBySpringCGLIB$$276a796.searchPlus(<generated>)
   	at com.evercare.member.MTest.search(MTest.java:63)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
   	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
   	at java.util.ArrayList.forEach(ArrayList.java:1259)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
   	at java.util.ArrayList.forEach(ArrayList.java:1259)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
   	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
   	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
   	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
   	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
   	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
   	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
   	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
   	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
   	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
   	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
   	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
   	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
   	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
   Caused by: java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long
   	at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
   	at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
   	at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:579)
   	at org.apache.calcite.avatica.AvaticaPreparedStatement.executeQuery(AvaticaPreparedStatement.java:137)
   	at org.apache.shardingsphere.sqlfederation.original.OriginalSQLFederationExecutor.executeQuery(OriginalSQLFederationExecutor.java:106)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeFederationQuery(ShardingSpherePreparedStatement.java:345)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:434)
   	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
   	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)
   	at com.sun.proxy.$Proxy177.execute(Unknown Source)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)
   	at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:62)
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:333)
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
   	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
   	at com.sun.proxy.$Proxy170.query(Unknown Source)
   	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:151)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
   	at com.sun.proxy.$Proxy170.query(Unknown Source)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	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:427)
   	... 84 more
   Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
   	at Buzz$1.execute(Unknown Source)
   	at Buzz$1.execute(Unknown Source)
   	at org.apache.calcite.interpreter.TableScanNode.lambda$createEnumerable$2(TableScanNode.java:276)
   	at org.apache.calcite.linq4j.EnumerableDefaults$28.moveNext(EnumerableDefaults.java:3707)
   	at org.apache.calcite.linq4j.TransformedEnumerator.moveNext(TransformedEnumerator.java:35)
   	at org.apache.calcite.linq4j.EnumerableDefaults$6$1.moveNext(EnumerableDefaults.java:1336)
   	at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3602)
   	at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4227)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.<init>(EnumerableDefaults.java:4185)
   	at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4227)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.<init>(EnumerableDefaults.java:4185)
   	at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4227)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.<init>(EnumerableDefaults.java:4185)
   	at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
   	at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
   	at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4227)
   	at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.<init>(EnumerableDefaults.java:4185)
   	at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
   	at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
   	at org.apache.calcite.linq4j.EnumerableDefaults.toLookup(EnumerableDefaults.java:3594)
   	at org.apache.calcite.linq4j.EnumerableDefaults.toLookup(EnumerableDefaults.java:3570)
   	at org.apache.calcite.linq4j.DefaultEnumerable.toLookup(DefaultEnumerable.java:748)
   	at org.apache.calcite.linq4j.EnumerableDefaults$6.enumerator(EnumerableDefaults.java:1316)
   	at org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:978)
   	at org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:781)
   	at org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:311)
   	at Baz.bind(Unknown Source)
   	at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:363)
   	at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:323)
   	at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:578)
   	at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:569)
   	at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184)
   	at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64)
   	at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43)
   	at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:575)
   	... 119 more
   
   `
   
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   `database1:
   CREATE TABLE member (
   id tinyint(11) unsigned NOT NULL,
   custom_id tinyint(11) unsigned NOT NULL,
   PRIMARY KEY (id)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
   
   database2:
   CREATE TABLE info (
   id int(11) unsigned NOT NULL AUTO_INCREMENT,
   custom_id int(11) unsigned NOT NULL,
   `update_time` datetime 
   PRIMARY KEY (id)
   ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
   
   Use mybatis parameterized query
   @Data
   public class MemberQuery{
    private Integer id;
    private String update_time;
   }
   sql:
   select * from member inner join info on member.custom_id=info.custom_id where  member.id =#{id}   and info.update_time &gt #{update_time}   
   No exception if you don't use parameterized query`
   sql:
   select * from member inner join info on member.custom_id=info.custom_id where  member.id =${id}   and info.update_time &gt ${update_time} 
   
   ### Example codes for reproduce this issue (such as a github link).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] linghengqian commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1522817113

   - I will verify this issue later.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] linghengqian commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1694713244

   - I found the problem in https://github.com/apache/shardingsphere/pull/28279 and https://github.com/linghengqian/sharding-demo/commit/e0927a4a30a62de1f7baee8c8000c770cd953076. Apache Calcite 1.32 does not support the `TIMESTAMP_TRUNC` function, which was added in Calcite 1.33.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] linghengqian commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1521917566

   - I'm not sure if this is an unprocessed case of ResultSet. Can you provide a minimum reproducible example through Git?
   
   - Displaying a log with images is difficult to read. Can you format this part of the log using Github's markdown syntax? Reference resources https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code .


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu closed issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long
URL: https://github.com/apache/shardingsphere/issues/25320


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] China-Uncle commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "China-Uncle (via GitHub)" <gi...@apache.org>.
China-Uncle commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1522751340

   > * I'm not sure if this is an unprocessed case of ResultSet. Can you provide a minimum reproducible example through Git?
   > * Displaying a log with images is difficult to read. Can you format this part of the log using Github's markdown syntax? Reference resources https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code .
   
   Hello, the demo is at https://github.com/China-Uncle/sharding-demo.git
   The sql statement is in README.md


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] linghengqian commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1538722970

   - @China-Uncle Late reply, I just completed the minified verification at https://github.com/linghengqian/sharding-demo/commit/c1ada5bc00ecc527c580fa1bb70a3cd32476e0cc a while ago.
   - @strongduanmu For the case where `sql-federation-type` is `ORIGINAL` or `ADVANCED`, I noticed that when the PreparedStatement does not carry parameters, the unit test executes normally. When PreparedStatement carries parameters, unit test execution fails. I was wondering if there is a known issue tracking this problem?
   - The minimal unit testing and verification process is located at https://github.com/linghengqian/sharding-demo .


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] linghengqian commented on issue #25320: mybatis cross-database joint query java.sql.SQLException: exception while executing query: java.lang.Integer cannot be cast to java.lang.Long

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #25320:
URL: https://github.com/apache/shardingsphere/issues/25320#issuecomment-1694705568

   - I updated this Example to Apache ShardingSphere 5.4.0 in https://github.com/linghengqian/sharding-demo/commit/0a56737eb0628aaa8f334fa3c04fa18bcdba37ee and https://github.com/linghengqian/sharding-demo , both unit tests now fail, which exhibits new inconsistent behavior with 5.3.2. I will reopen my investigation into this issue.
   
   - Some `sqlFederation`-related material is located in https://github.com/apache/shardingsphere/issues/26011.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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