You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:42:16 UTC

[GitHub] [shardingsphere] oulexue opened a new issue, #14100: Complex SQL paging exception

oulexue opened a new issue, #14100:
URL: https://github.com/apache/shardingsphere/issues/14100

   ### Which version of ShardingSphere did you use?
   
   5.0.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   sharding-jdbc
   
   ### Expected behavior
   
   ```sql
   SELECT
   	b.hashchildarea,
   	b.regname regionName,
   	ifnull( t.settleNum, 0 ) settleNum,
   	ifnull( t.settleNumAll, 0 ) settleNumAll,
   	ifnull( t2.shouldSettle, 0 ) shouldSettle,
   	ifnull( t2.totalSob, 0 ) totalSob,
   	ifnull( t2.totalSobVile, 0 ) totalSobVile,
   	ifnull( t2.totalSobComm, 0 ) totalSobComm,
   	b.regionid regionId,
   	ifnull( t1.totalVoucher, 0 ) totalVoucher,
   	ifnull( t1.totalVoucherCur, 0 ) totalVoucherCur,(
   	SELECT
   		count( id ) 
   	FROM
   		bus_regions 
   	WHERE
   		regionid LIKE concat( b.regionid, '%' ) 
   		AND hashchildarea = 1 
   	) totalRegion,
   	(
   	SELECT
   		count( id ) 
   	FROM
   		bus_regions bu 
   	WHERE
   		regionid LIKE concat( t2.ca, '%' ) 
   		AND hashchildarea = 1 
   	AND EXISTS ( SELECT 1 FROM tb_finance_sob sob WHERE sob.region_id = bu.regionid )) totalRegionOnSob,
   	(
   	SELECT
   		count(
   		DISTINCT ( region_id )) 
   	FROM
   		tb_finance_sob s 
   	WHERE
   		region_id LIKE concat( t2.ca, '%' ) 
   		AND length( region_id )> 12 
   		AND EXISTS (
   		SELECT
   			1 
   		FROM
   			tb_finance_settle_accounts_record r 
   		WHERE
   			s.id = r.sob_id 
   			AND settle_accounts_date BETWEEN ? 
   		AND ?)) totalSobCommSettle,
   	(
   	SELECT
   		count(
   		DISTINCT ( region_id )) 
   	FROM
   		tb_finance_sob s 
   	WHERE
   		region_id LIKE concat( t2.ca, '%' ) 
   		AND length( region_id )= 12 
   		AND EXISTS (
   		SELECT
   			1 
   		FROM
   			tb_finance_settle_accounts_record r 
   		WHERE
   			s.id = r.sob_id 
   			AND settle_accounts_date BETWEEN ? 
   		AND ?)) totalSobVileSettle 
   FROM
   	bus_regions b
   	LEFT JOIN (
   	SELECT
   		count( sob.id ) totalSob,
   		region_id,
   		substr(
   			region_id,
   		1,?) ca,
   		sum( CASE sob_profession_type WHEN ? THEN 1 END ) totalSobVile,
   		sum( CASE sob_profession_type WHEN ? THEN 1 END ) totalSobComm,
   		sum(
   		CASE
   				
   				WHEN sob_enable_date BETWEEN ? 
   				AND ? THEN
   					TIMESTAMPDIFF(
   						MONTH,
   						concat( sob_enable_date, '-01' ),
   					concat( ?, '-01' ))+ 1 
   					WHEN sob_enable_date < ? THEN
   					TIMESTAMPDIFF(
   						MONTH,
   						concat( ?, '-01' ),
   					concat( ?, '-01' ))+ 1 
   				END 
   				) shouldSettle 
   			FROM
   				tb_finance_sob sob 
   			WHERE
   				region_id LIKE concat(?, '%' ) 
   				AND length(
   					substr(
   						region_id,
   					1,?))=? 
   			GROUP BY
   				ca 
   			) t2 ON b.regionid = t2.ca
   			LEFT JOIN (
   			SELECT
   				substr(
   					region_id,
   				1,?) ca,
   				sum( CASE WHEN settle_accounts_date = ? THEN 1 END ) settleNum,
   				sum( CASE WHEN settle_accounts_date BETWEEN ? AND ? THEN 1 END ) settleNumAll 
   			FROM
   				tb_finance_sob sob
   				LEFT JOIN tb_finance_settle_accounts_record record ON sob.id = record.sob_id 
   			WHERE
   				sob.region_id LIKE concat(?, '%' ) 
   				AND length(
   					substr(
   						region_id,
   					1,?))=? 
   			GROUP BY
   				ca 
   			) t ON t2.ca = t.ca
   			LEFT JOIN (
   			SELECT
   				sum( CASE WHEN date_format( v.voucher_date, '%Y-%m' ) BETWEEN sob.sob_enable_date AND ? THEN 1 END ) totalVoucher,
   				sum( CASE WHEN date_format( v.voucher_date, '%Y-%m' ) BETWEEN ? AND ? THEN 1 ELSE 0 END ) totalVoucherCur,
   				region_id,
   				substr(
   					region_id,
   				1,?) ca 
   			FROM
   				tb_finance_sob sob
   				LEFT JOIN tb_finance_voucher v ON sob.id = v.sob_id 
   			WHERE
   				region_id LIKE concat(?, '%' ) 
   				AND length(
   					substr(
   						region_id,
   					1,?))=? 
   			GROUP BY
   				ca 
   			) t1 ON b.regionid = t1.ca 
   		WHERE
   			b.regionid LIKE concat(?, '%' ) 
   		AND length( regionid )=? 
   	LIMIT ?,?
   ```
   
   ### Actual behavior
   
   ![image](https://user-images.githubusercontent.com/26663469/146296385-9e0e4e8a-262c-4a93-adee-ff52279b1eb2.png)
   
   ```log
   Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.getValue(PaginationContext.java:57)
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.<init>(PaginationContext.java:50)
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.LimitPaginationContextEngine.createPaginationContext(LimitPaginationContextEngine.java:38)
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.PaginationContextEngine.createPaginationContext(PaginationContextEngine.java:57)
   	at org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext.<init>(SelectStatementContext.java:91)
   	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:127)
   	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:110)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createLogicSQL(ShardingSpherePreparedStatement.java:385)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:375)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:286)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
   	at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source)
   	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:63)
   	at com.sun.proxy.$Proxy461.query(Unknown Source)
   	at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source)
   	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:63)
   	at com.sun.proxy.$Proxy461.query(Unknown Source)
   	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
   ```
   


-- 
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] github-actions[bot] commented on issue #14100: Complex SQL paging exception

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #14100:
URL: https://github.com/apache/shardingsphere/issues/14100#issuecomment-1272350587

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] puppylpg commented on issue #14100: Complex SQL paging exception

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

   > Still meets the same error if there are many(50+) parameters in the sql. Version: **shardingsphere-jdbc-core:5.1.1**:
   > 
   > ```
   > ### Cause: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
   > 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_292]
   > 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_292]
   > 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   > 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   > 	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.5.jar:2.0.5]
   > 	... 15 common frames omitted
   > Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
   > 	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.getValue(PaginationContext.java:57) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.<init>(PaginationContext.java:50) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.LimitPaginationContextEngine.createPaginationContext(LimitPaginationContextEngine.java:38) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.PaginationContextEngine.createPaginationContext(PaginationContextEngine.java:57) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext.setUpParameters(SelectStatementContext.java:338) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createLogicSQL(ShardingSpherePreparedStatement.java:478) ~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
   > 	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:358) ~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
   > 	at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[na:na]
   > 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   > 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   > 	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at com.sun.proxy.$Proxy210.execute(Unknown Source) ~[na:na]
   > 	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) ~[na:na]
   > 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   > 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   > 	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at com.sun.proxy.$Proxy209.query(Unknown Source) ~[na:na]
   > 	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:69) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   > 	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.6.jar:3.5.6]
   > 	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:165) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   > 	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:92) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   > 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) ~[mybatis-3.5.6.jar:3.5.6]
   > 	... 21 common frames omitted
   > ```
   > 
   > sql:
   > 
   > > SELECT sk.U_ID as kol_id, same_product, same_company, same_industry         FROM SK_TABLE sk         JOIN (SELECT ton.K_ID,         MAX(IF(ob.CUSTOMER_PRODUCT_ID = ?, 1, 0)) AS same_product,         MAX(IF(ob.CUSTOMER_COMPANY_ID = ?, 1, 0)) AS same_company,         MAX(IF(ob.CUSTOMER_INDUSTRY_TYPE = ?, 1, 0)) AS same_industry         FROM OB_TABLE ob         INNER JOIN TO_TABLE ton ON ob.ID = ton.OB_ID         GROUP BY ton.K_ID) AS history_task ON sk.U_ID = history_task.K_ID         LEFT JOIN KM_TABLE km on sk.U_ID = km.U_ID          WHERE sk.PLATFORM = ?                              AND sk.country IN                 (                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,     
                 ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,  
                    ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 )          ORDER BY same_product desc,         same_company desc,         same_i
 ndustry desc,         km.MEDIA desc,                  IF(sk.K_L = 4, 3, IF(sk.K_L = 1, 3, IF(sk.K_L = 2, 2, IF(sk.K_L = 3, 1, sk.K_L)))) desc,         sk.C_TIMES desc,         IF(sk.CO_TYPE = 1, 1, 0) desc,         sk.H_P desc,         km.V_R desc         limit ?, ?
   > 
   > ![image](https://user-images.githubusercontent.com/9563181/236622889-22a513ac-de27-4544-92e5-c9c26791152d.png)
   > 
   > delete the `AND sk.country IN ( ... )` clause to eliminate these many parameters seems ok. Any hints about the bug? thanks
   
   I find that the `where` clause can't be put after `join`, and after reversing them, there's no parameter cast error ┑( ̄Д  ̄)┍


-- 
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] github-actions[bot] closed issue #14100: Complex SQL paging exception

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #14100: Complex SQL paging exception
URL: https://github.com/apache/shardingsphere/issues/14100


-- 
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] puppylpg commented on issue #14100: Complex SQL paging exception

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

   Still meets the same error if there are many(50+) parameters in the sql:
   ```
   ### Cause: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
   	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.6.jar:3.5.6]
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149) ~[mybatis-3.5.6.jar:3.5.6]
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.6.jar:3.5.6]
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_292]
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_292]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.5.jar:2.0.5]
   	... 15 common frames omitted
   Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.getValue(PaginationContext.java:57) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.<init>(PaginationContext.java:50) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.LimitPaginationContextEngine.createPaginationContext(LimitPaginationContextEngine.java:38) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.PaginationContextEngine.createPaginationContext(PaginationContextEngine.java:57) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext.setUpParameters(SelectStatementContext.java:338) ~[shardingsphere-infra-binder-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createLogicSQL(ShardingSpherePreparedStatement.java:478) ~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:358) ~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
   	at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[na:na]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.6.jar:3.5.6]
   	at com.sun.proxy.$Proxy210.execute(Unknown Source) ~[na:na]
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.6.jar:3.5.6]
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.6.jar:3.5.6]
   	at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) ~[na:na]
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_292]
   	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_292]
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.6.jar:3.5.6]
   	at com.sun.proxy.$Proxy209.query(Unknown Source) ~[na:na]
   	at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:69) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.6.jar:3.5.6]
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.6.jar:3.5.6]
   	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:165) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   	at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:92) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) ~[mybatis-3.5.6.jar:3.5.6]
   	... 21 common frames omitted
   ```
   
   sql:
   
   > SELECT sk.U_ID as kol_id, same_product, same_company, same_industry         FROM SK_TABLE sk         JOIN (SELECT ton.K_ID,         MAX(IF(ob.CUSTOMER_PRODUCT_ID = ?, 1, 0)) AS same_product,         MAX(IF(ob.CUSTOMER_COMPANY_ID = ?, 1, 0)) AS same_company,         MAX(IF(ob.CUSTOMER_INDUSTRY_TYPE = ?, 1, 0)) AS same_industry         FROM OB_TABLE ob         INNER JOIN TO_TABLE ton ON ob.ID = ton.OB_ID         GROUP BY ton.K_ID) AS history_task ON sk.U_ID = history_task.K_ID         LEFT JOIN KM_TABLE km on sk.U_ID = km.U_ID          WHERE sk.PLATFORM = ?                              AND sk.country IN                 (                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,       
               ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,    
                  ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 ,                     ?                 )          ORDER BY same_product desc,         same_company desc,         same_ind
 ustry desc,         km.MEDIA desc,                  IF(sk.K_L = 4, 3, IF(sk.K_L = 1, 3, IF(sk.K_L = 2, 2, IF(sk.K_L = 3, 1, sk.K_L)))) desc,         sk.C_TIMES desc,         IF(sk.CO_TYPE = 1, 1, 0) desc,         sk.H_P desc,         km.V_R desc         limit ?, ?
   
   Version: shardingsphere-jdbc-core:5.1.1
   
   ![image](https://user-images.githubusercontent.com/9563181/236622889-22a513ac-de27-4544-92e5-c9c26791152d.png)
   


-- 
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] RaigorJiang commented on issue #14100: Complex SQL paging exception

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

   > @agoodcoolman I believe we had fixed it on master branch. Can you try the master branch?
   
   Fixed.


-- 
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] RaigorJiang closed issue #14100: Complex SQL paging exception

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #14100: Complex SQL paging exception
URL: https://github.com/apache/shardingsphere/issues/14100


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