terrymanu commented on issue #35432:
URL:
https://github.com/apache/shardingsphere/issues/35432#issuecomment-3670324632
## Problem Understanding:
Using 5.2.1 Spring Boot starter with Encrypt rule on T_USER.ID_CARD (cipher
+ assisted). SQL uses a subquery with column aliases (u_card, u_name) and an
outer predicate on tu.u_card; user reports alias-related parsing/behavior issue.
## Root Cause:
Version 5.2.1 is old; its parser/binder has limited support for mapping
derived-column aliases back to source table columns. Encrypt rewrite then can’t
resolve tu.u_card to T_USER.ID_CARD, leading to parsing/binding errors or
missing rewrite.
## Analysis:
Latest stable release is 5.5.2, which includes multiple enhancements for
alias/derived-column parsing and binding. ShardingSphere’s recommended Encrypt
usage is to place predicates directly on the real encrypted column (e.g.,
inside the subquery) rather than
relying on derived aliases in outer predicates, especially on older
versions.
## Conclusion:
Please upgrade to the latest version (5.5.2) and retry the same SQL. If it
still reproduces, share the exact version, mode (JDBC/Proxy), database
type/version, and the error/log output so we can confirm if it’s a real defect.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]