kimmking commented on a change in pull request #4877: Logic table name and
logic column name toLowerCase() for Encrypt.
URL:
https://github.com/apache/incubator-shardingsphere/pull/4877#discussion_r395986164
##########
File path:
encrypt-core/encrypt-core-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java
##########
@@ -210,7 +210,7 @@ public boolean isCipherColumn(final String tableName,
final String columnName) {
* @return logic and cipher columns
*/
public Map<String, String> getLogicAndCipherColumns(final String
logicTable) {
- return tables.containsKey(logicTable) ?
tables.get(logicTable).getLogicAndCipherColumns() : Collections.emptyMap();
+ return tables.containsKey(logicTable.toLowerCase()) ?
tables.get(logicTable.toLowerCase()).getLogicAndCipherColumns() :
Collections.emptyMap();
Review comment:
return
Optional.ofNullable(tables.get(logicTable)).map(EncryptTable::getLogicAndPlainColumns).orElse(Collections.emptyMap());
should be better.
----------------------------------------------------------------
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