You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "ClaireLytt (via GitHub)" <gi...@apache.org> on 2026/06/23 07:53:52 UTC
[PR] Support SqlServer update statement for Specifying a view as the target object when use encrypt feature [shardingsphere]
ClaireLytt opened a new pull request, #38896:
URL: https://github.com/apache/shardingsphere/pull/38896
for https://github.com/apache/shardingsphere/issues/30227
official document:https://learn.microsoft.com/en-us/sql/t-sql/queries/update-transact-sql?view=sql-server-ver17#k-specifying-a-view-as-the-target-object.
Changes proposed in this pull request:
-
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
- [x] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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: [PR] Support SqlServer update statement for Specifying a view as the target object when use encrypt feature [shardingsphere]
Posted by "ClaireLytt (via GitHub)" <gi...@apache.org>.
ClaireLytt commented on PR #38896:
URL: https://github.com/apache/shardingsphere/pull/38896#issuecomment-4786190741
@terrymanu
Could you please rerun e2e test? It failed because of unstable network. Thanks.
--
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: [PR] Support SqlServer update statement for Specifying a view as the target object when use encrypt feature [shardingsphere]
Posted by "ClaireLytt (via GitHub)" <gi...@apache.org>.
ClaireLytt commented on PR #38896:
URL: https://github.com/apache/shardingsphere/pull/38896#issuecomment-4777035025
This PR fixes the SQL Server error **“Column name 'CountryRegionName' is invalid”** when running `UPDATE` on an encrypted view.
ShardingSphere was not rewriting `CREATE VIEW` projections correctly, so the view was created with the logical column name instead of the cipher column. Later, `UPDATE ... SET CountryRegionName = ...` was sent to SQL Server with a column the physical view does not have.
The change makes encrypt rewrite map logical columns to cipher columns in view definitions, so `UPDATE`/`SELECT` through the view works with encryption rules.


--
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: [PR] Support SqlServer update statement for Specifying a view as the target object when use encrypt feature [shardingsphere]
Posted by "ClaireLytt (via GitHub)" <gi...@apache.org>.
ClaireLytt commented on PR #38896:
URL: https://github.com/apache/shardingsphere/pull/38896#issuecomment-4786027504
@terrymanu
Thanks for the feedback. I added two rewriter cases for the `VIEW_DEFINITION` path:
- `ddl/create/create-view.xml` — `CREATE VIEW ...`
- `ddl/alter/alter-view.xml` — `ALTER VIEW ...`
For the mock-metadata conflict (view already exists for the UPDATE fixture), I followed the same approach as `scenario/sharding/case/ddl/create-table.xml` and used `SKIP_METADATA_VALIDATE=true` on the input SQL.
And the `RELEASE-NOTES.md` merge conflict has also been resolved.
--
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: [PR] Support SqlServer update statement for Specifying a view as the target object when use encrypt feature [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #38896:
URL: https://github.com/apache/shardingsphere/pull/38896
--
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