You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "448700174 (via GitHub)" <gi...@apache.org> on 2023/12/15 10:40:12 UTC
[I] Can not get all columns when join table [shardingsphere]
448700174 opened a new issue, #29421:
URL: https://github.com/apache/shardingsphere/issues/29421
select a.*, b.elder_name,b.insurance_no,b.gender,b.birth_day
from medical_medicine_kit_order a, elder_info b
where a.tenant_id = #{paramMap.tenantId} and a.elder_id = b.elder_id and a.status > 0
Logic SQL: select a.*, b.elder_name,b.insurance_no,b.gender,b.birth_day
from medical_medicine_kit_order_12 a, elder_info b
where a.elder_id = b.elder_id and a.status > 0 limit 10
Actual SQL: ds ::: select a.*, b.elder_name,b.insurance_no,b.gender,b.birth_day
from medical_medicine_kit_order_12 a, elder_info b
where a.elder_id = b.elder_id and a.status > 0 limit 10
Error attempting to get column 'id' from result set. Cause: java.sql.SQLFeatureNotSupportedException: Can not get index from column label `id`.
; Can not get index from column label `id`.; nested exception is java.sql.SQLFeatureNotSupportedException: Can not get index from column label `id`.
I can only get elder_name、insurance_no、gender、birth_day。
CREATE TABLE `medical_medicine_kit_order` (
`id` bigint unsigned NOT NULL COMMENT 'ID',
`elder_id` int unsigned NOT NULL COMMENT ' ',
`tenant_id` int unsigned NOT NULL COMMENT ' ',
`medicine_count` tinyint NOT NULL COMMENT ' ',
`source` tinyint NOT NULL COMMENT '';)',
`type` tinyint NOT NULL DEFAULT '1' COMMENT ' ',
...
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='';
--
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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "448700174 (via GitHub)" <gi...@apache.org>.
448700174 commented on issue #29421:
URL: https://github.com/apache/shardingsphere/issues/29421#issuecomment-1858729629
I have tried the 5.4.1, But it cannot execute correctly even a simple SQL.
And My configuration on 5.4.1 is as follows:
mode: # 不配置默认单机
type: Standalone # 运行模式类型。可选配置:Standalone、Cluster
repository:
type: JDBC # 持久化仓库类型
props:
sql-show: true
databaseName: yb_test
dataSources:
ds:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://192.168.3.227:3306/yb_test?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf-8
username: localdev
password: M42-7Z7f
minimumIdle: 2
idleTimeoutMilliseconds: 600000
maxPoolSize: 10
minPoolSize: 1
autoCommit: true
poolName: MyHikariCP
maxLifetimeMilliseconds: 1800000
connectionTimeout: 30000
connectionTestQuery: SELECT 1
rules:
- !SINGLE
tables:
- "*.*"
- !SHARDING
shardingAlgorithms:
tenant_id_sharding:
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.youban.medical.TenantIdShardingAlgorithm
bindingTables:
- medical_advice,medical_advice_main,medical_advice_group,medical_advice_item,medical_advice_dispense,medical_advice_settle,medical_advice_settle_item
- medical_ward_schedule,medical_ward_record,medical_ward_abnormal
- medical_medicine_kit_order,medical_medicine_kit_order_item
- medical_chronic_follow,medical_chronic_data,medical_device_data,medical_device_alarm
tables:
medical_advice:
actualDataNodes: ds.medical_advice_$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_main:
actualDataNodes: ds.medical_advice_main$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_group:
actualDataNodes: ds.medical_advice_group$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_item:
actualDataNodes: ds.medical_advice_item$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_dispense:
actualDataNodes: ds.medical_advice_dispense$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_settle:
actualDataNodes: ds.medical_advice_settle$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_advice_settle_item:
actualDataNodes: ds.medical_advice_settle_item$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_ward_schedule:
actualDataNodes: ds.medical_ward_schedule$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_ward_record:
actualDataNodes: ds.medical_ward_record$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_ward_abnormal:
actualDataNodes: ds.medical_ward_abnormal$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_medicine_kit_order:
actualDataNodes: ds.medical_medicine_kit_order$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_medicine_kit_order_item:
actualDataNodes: ds.medical_medicine_kit_order_item$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_chronic_follow:
actualDataNodes: ds.medical_chronic_follow$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_chronic_data:
actualDataNodes: ds.medical_chronic_data$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_device_data:
actualDataNodes: ds.medical_device_data$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
medical_device_alarm:
actualDataNodes: ds.medical_device_alarm$->{1..99}
tableStrategy:
standard:
shardingColumn: tenant_id
shardingAlgorithmName: tenant_id_sharding
------------------ 原始邮件 ------------------
发件人: "apache/shardingsphere" ***@***.***>;
发送时间: 2023年12月16日(星期六) 上午8:30
***@***.***>;
***@***.******@***.***>;
主题: Re: [apache/shardingsphere] Can not get all columns when join table (Issue #29421)
Hi @448700174, can you try the latest version 5.4.1? I think this problem has been solved.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message 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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #29421:
URL: https://github.com/apache/shardingsphere/issues/29421#issuecomment-1858638079
Hi @448700174, can you try the latest version 5.4.1? I think this problem has been solved.
--
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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #29421:
URL: https://github.com/apache/shardingsphere/issues/29421#issuecomment-3532391039
Duplicate with #28841
--
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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "448700174 (via GitHub)" <gi...@apache.org>.
448700174 commented on issue #29421:
URL: https://github.com/apache/shardingsphere/issues/29421#issuecomment-1869448539
Can you give me some suggestion on 5.4.1? I guess the problem is that I have not config the single tables with exact table name? But I don't want to do that because I have hundreds tables.
--
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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29421:
URL: https://github.com/apache/shardingsphere/issues/29421#issuecomment-1910908278
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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
Re: [I] Can not get all columns when join table [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #29421: Can not get all columns when join table
URL: https://github.com/apache/shardingsphere/issues/29421
--
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