giggs131400 opened a new issue #9334: URL: https://github.com/apache/shardingsphere/issues/9334
## Bug Report ### Which version of ShardingSphere did you use? 5.0.0-alpha ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. 1. we have two tables, one is student, the other is score. And table student have column "stuname" we need to encryt 2. we have sql: ```sql select student.id, uid, stuname from score left join student on student.id = score.id where stuname = ? ``` 3. after shardingsphere rewrite it, we expected: ```sql select student.id, uid, stuname_enc from score left join student on student.id = score.id where stuname_enc = ? ``` but actually it parsed: ```sql select student.id, uid, **stuname** from score left join student on student.id = score.id where stuname_enc = ? ``` 4. another scenario, we have sql: ```sql select AA.id, AA.uid, AA.stuname from (select * from student whre stuname = ?) as AA ``` after rewrite it, we expect ```sql select AA.id, AA.uid, AA.stuname_enc AS stuname from (select * from student whre stuname_enc = ?) as AA ``` but actually it parsed: ```sql select AA.id, AA.uid, AA.stuname_enc AS stuname from (select * from student whre stuname = ?) as AA ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
