shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

shard key parse fail: when uid is shard key, parse shard value fail

Open dongyun-coder opened this issue 7 months ago • 0 comments

Which version of ShardingSphere did you use?

5.5.3-SNAPSHOT

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

select * from table_xx where uid=123 uid is configured shard column, shardingsphere will get shard value=123.

Actual behavior

sharding could not find sharding value 123.

Reason

ColumnSegmentBinder.java


  private static final Collection<String> EXCLUDE_BIND_COLUMNS = new CaseInsensitiveSet<>(Arrays.asList(
            "ROWNUM", "ROW_NUMBER", "ROWNUM_", "ROWID", "SYSDATE", "SYSTIMESTAMP", "CURRENT_TIMESTAMP", "LOCALTIMESTAMP", "UID", "USER", "NEXTVAL", "LEVEL"));

UID is excluded. (why do this?)

dongyun-coder avatar May 27 '25 04:05 dongyun-coder