RaigorJiang commented on code in PR #27336:
URL: https://github.com/apache/shardingsphere/pull/27336#discussion_r1270205905
##########
features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptAlterTableTokenGenerator.java:
##########
@@ -134,26 +134,13 @@ private Collection<SQLToken> getModifyColumnTokens(final
EncryptTable encryptTab
for (ModifyColumnDefinitionSegment each : segments) {
String columnName =
each.getColumnDefinition().getColumnName().getIdentifier().getValue();
if (encryptTable.isEncryptColumn(columnName)) {
-
result.addAll(getModifyColumnTokens(encryptTable.getEncryptColumn(columnName),
each));
+ throw new UnsupportedOperationException("Unsupported operation
'modify' for the cipher column");
Review Comment:
Is it better to use ShardingSpherePreconditions?
##########
features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptAlterTableTokenGenerator.java:
##########
@@ -165,6 +152,10 @@ private Optional<SQLToken> getColumnPositionToken(final
EncryptTable encryptTabl
private Collection<SQLToken> getChangeColumnTokens(final EncryptTable
encryptTable, final Collection<ChangeColumnDefinitionSegment> segments) {
Collection<SQLToken> result = new LinkedList<>();
for (ChangeColumnDefinitionSegment each : segments) {
+ String columnName =
each.getPreviousColumn().getIdentifier().getValue();
+ if (encryptTable.isEncryptColumn(columnName)) {
+ throw new UnsupportedOperationException("Unsupported operation
'change' for the cipher column");
Review Comment:
Is it better to use ShardingSpherePreconditions?
--
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]