You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/12/07 03:08:40 UTC
[GitHub] [incubator-shardingsphere] RaigorJiang commented on a change in
pull request #3663: Fixes #2884
RaigorJiang commented on a change in pull request #3663: Fixes #2884
URL: https://github.com/apache/incubator-shardingsphere/pull/3663#discussion_r355095713
##########
File path: sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/feature/encrypt/token/generator/impl/AssistQueryAndPlainInsertColumnsTokenGenerator.java
##########
@@ -52,9 +54,13 @@ protected boolean isGenerateSQLTokenForEncrypt(final SQLStatementContext sqlStat
Collection<InsertColumnsToken> result = new LinkedList<>();
Optional<EncryptTable> encryptTable = getEncryptRule().findEncryptTable(sqlStatementContext.getTablesContext().getSingleTableName());
Preconditions.checkState(encryptTable.isPresent());
+ Set<String> columnNames = new HashSet(((InsertStatement) sqlStatementContext.getSqlStatement()).getColumnNames());
for (ColumnSegment each : ((InsertStatement) sqlStatementContext.getSqlStatement()).getColumns()) {
List<String> columns = getColumns(encryptTable.get(), each);
if (!columns.isEmpty()) {
+ if (columnNames.contains(columns.get(0))) {
+ continue;
+ }
Review comment:
Yes, moved.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services