You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "wangtiewu (via GitHub)" <gi...@apache.org> on 2023/02/21 12:12:20 UTC
[GitHub] [shardingsphere] wangtiewu opened a new issue, #24286: select * INNER JOIN Column index out of range
wangtiewu opened a new issue, #24286:
URL: https://github.com/apache/shardingsphere/issues/24286
## Which version of ShardingSphere did you use?
shardingsphere-jdbc-core-spring-boot-starter Version=5.2.1
--
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] RaigorJiang closed issue #24286: select * INNER JOIN Column index out of range
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #24286: select * INNER JOIN Column index out of range
URL: https://github.com/apache/shardingsphere/issues/24286
--
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] sandynz commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1471852781
Hi @wangtiewu , I tested on proxy (master branch) with similar SQL, there's no exception thrown.
```
select a.* from t_order a inner join (select order_id from t_order_item order by item_id desc limit 1,10) as b on a.order_id=b.order_id;
```
Could you try latest version 5.3.1?
--
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 #24286: select * INNER JOIN Column index out of range
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1579860235
This issue has been inactive for a long time, so I will close it.
If this problem persists, please reopen it or submit a new one.
--
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] sandynz commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1473165373
Could you try to set `sql-federation-type: ADVANCED` in `server.yaml`? It'll enable federation query with better support of sub-query
--
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] sandynz commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1473541098
Oops, If ZooKeeper is configured in server.yaml, then you need to update `sql-federation-type: ADVANCED` in ZooKeeper.
If it still doesn't work, could you supply a demo project to reproduce it? (Simplify it, just use raw JDBC API to query with final SQL, without tkmapper ORM)
--
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] wangtiewu commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "wangtiewu (via GitHub)" <gi...@apache.org>.
wangtiewu commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1439323425
Hi,@strongduanmu,
configuration:
mode:
type: Standalone
repository:
type: JDBC
dataSources:
ds-0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc.Driver
jdbcUrl: jdbc:mysql://127.0.0.1:33306/zs_test?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true
username: zs
password: xxxxx
rules:
- !SHARDING
tables:
T_TAG:
actualDataNodes: ds-0.T_TAG
tableStrategy:
complex:
shardingColumns: vendor_seq,product_seq
shardingAlgorithmName: tagShardingAlgorithm
shardingAlgorithms:
tagShardingAlgorithm:
type: class_based
props:
strategy: complex
algorithmClassName: comxxxx.zs.core.service.tag.TagShardingAlgorithm
props:
sql-show: true
sql-federation-enabled: true
tabel T_BATCH: batch_id is PRIMARY KEY,it has total 37 columns.
init sql:SELECT a.* FROM T_BATCH a INNER JOIN (SELECT batch_id FROM T_BATCH ORDER BY UPDATED_TIME DESC LIMIT ?, ?) AS a_b ON a.batch_id = a_b.batch_id
database:mysql5.6.
os:win10
java8
--
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 commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1439315762
Hi @wangtiewu, thank you for your feedback. Can you provide more information to help reproduce this exception? Such as configuration, table init sql, etc.
--
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] wangtiewu commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "wangtiewu (via GitHub)" <gi...@apache.org>.
wangtiewu commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1439498590
![image](https://user-images.githubusercontent.com/15358707/220538188-28a2db68-efd9-49e6-aa82-737372861255.png)
-- T_BATCH has total 37 columns, ProjectionsContext.expandProjections.size()=38,last element is {owner=a_b,name=batch_id},it's subtable a_b’s column,it's may be a sql parser bug.
--
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] wangtiewu commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "wangtiewu (via GitHub)" <gi...@apache.org>.
wangtiewu commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1473040345
thank you,@sandynz,I tryed the latest version 5.3.1,also got the previous error.
My test scene is pagination query:
1,Use ORM framework is tkmapper,homepage:https://github.com/mybatis-mapper/tk-mapper
2,Init sql:"SELECT a.* FROM T_BATCH a"
3,A new class extends com.github.pagehelper.dialect.helper.MySqlDialect,override public String getPageSql(String sql, Page page, CacheKey pageKey),in this func the sql modify to "SELECT a.* FROM T_BATCH a INNER JOIN (SELECT batch_id FROM T_BATCH ORDER BY UPDATED_TIME DESC LIMIT ?, ?) AS a_b ON a.batch_id = a_b.batch_id"
--
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] wangtiewu commented on issue #24286: select * INNER JOIN Column index out of range
Posted by "wangtiewu (via GitHub)" <gi...@apache.org>.
wangtiewu commented on issue #24286:
URL: https://github.com/apache/shardingsphere/issues/24286#issuecomment-1473282101
I tested,it's also get the same error.
In test yaml file,I added flow params,is it has problem?
props:
sql-show: true
sql-federation-enabled: true
sql-federation-type: ADVANCED
--
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