You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
simple sql: SELECT * FROM a WHERE pid = #{pid} AND typeIN (selecttypefrom b where pid = #{bpid} );
a is a shard table, pid is shard column
b is a single table, it has a column named 'pid' too
in method org.apache.shardingsphere.sharding.route.engine.condition.engine.WhereClauseShardingConditionEngine#createShardingConditions(org.apache.shardingsphere.infra.binder.context.statement.SQLStatementContext, java.util.List<java.lang.Object>)
variable columnExpressionTableNames mapping column and table, because table a and b both exist a column 'pid', so the mapping result is pid -> b, but expected is pid -> a, because b is a single table, should be ignored
Which version of ShardingSphere did you use?
5.5.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
shard on table a_xxx
Actual behavior
shard on all tables for a
The text was updated successfully, but these errors were encountered:
KolorYan
changed the title
shard failed when there is a subquery and shard column name existe bot tables
shard failed when there is a subquery and shard column name existe both tables
Jan 8, 2025
KolorYan
changed the title
shard failed when there is a subquery and shard column name existe both tables
shard failed when there is a subquery and shard column name existed in both tables
Jan 8, 2025
Bug Report
simple sql:
SELECT * FROM a WHERE pid = #{pid} AND
typeIN (select
typefrom b where pid = #{bpid} );
variable columnExpressionTableNames mapping column and table, because table a and b both exist a column 'pid', so the mapping result is pid -> b, but expected is pid -> a, because b is a single table, should be ignored
Which version of ShardingSphere did you use?
5.5.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
shard on table a_xxx
Actual behavior
shard on all tables for a
The text was updated successfully, but these errors were encountered: