tristaZero commented on a change in pull request #3276: Add table owner for
logic encrypt column
URL:
https://github.com/apache/incubator-shardingsphere/pull/3276#discussion_r335254899
##########
File path:
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/feature/encrypt/EncryptCondition.java
##########
@@ -56,18 +58,20 @@
private final Map<Integer, Object> positionValueMap = new
LinkedHashMap<>();
- public EncryptCondition(final String columnName, final String tableName,
final int startIndex, final int stopIndex, final ExpressionSegment
expressionSegment) {
+ public EncryptCondition(final String columnName, final String tableName,
final String tableOwner, final int startIndex, final int stopIndex, final
ExpressionSegment expressionSegment) {
this.columnName = columnName;
this.tableName = tableName;
+ this.tableOwner = tableOwner;
this.startIndex = startIndex;
this.stopIndex = stopIndex;
operator = ShardingOperator.EQUAL;
putPositionMap(0, expressionSegment);
}
- public EncryptCondition(final String columnName, final String tableName,
final int startIndex, final int stopIndex, final List<ExpressionSegment>
expressionSegments) {
Review comment:
Do you think it is better to store tableAlias instead of tableOwner, for
people will puzzle by tableName and tableOwner from this list of parameters.
Therefore if tableAlias is nulll, we can pass tableName to
`EncryptPredicateToken` as a tableOwner, otherwise tableAlias will be
tableOwner. What' your opinion?
----------------------------------------------------------------
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]
With regards,
Apache Git Services