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 2020/03/21 10:34:52 UTC

[GitHub] [incubator-shardingsphere] dongzl opened a new pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.

dongzl opened a new pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877
 
 
   Fixes #4770.
   
   Changes proposed in this pull request:
   - Logic table name to lower case, for user sql's table name is inconsistent with real table name.
   - Logic column name to lower case, for user sql's column name is inconsistent with real column name.
   - add unit test.
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877#issuecomment-602027727
 
 
   ## Pull Request Test Coverage Report for [Build 2201](https://coveralls.io/builds/29518323)
   
   * **28** of **28**   **(100.0%)**  changed or added relevant lines in **4** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.08%**) to **58.273%**
   
   ---
   
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29518323/badge)](https://coveralls.io/builds/29518323) |
   | :-- | --: |
   | Change from base [Build 1137](https://coveralls.io/builds/29517148): |  0.08% |
   | Covered Lines: | 11897 |
   | Relevant Lines: | 20416 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] dongzl closed pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
dongzl closed pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877
 
 
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] dongzl commented on a change in pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
dongzl 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_r395988739
 
 

 ##########
 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:
   OK, I fix it.

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] coveralls commented on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877#issuecomment-602027727
 
 
   ## Pull Request Test Coverage Report for [Build 2199](https://coveralls.io/builds/29517469)
   
   * **28** of **28**   **(100.0%)**  changed or added relevant lines in **4** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.08%**) to **58.273%**
   
   ---
   
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29517469/badge)](https://coveralls.io/builds/29517469) |
   | :-- | --: |
   | Change from base [Build 1137](https://coveralls.io/builds/29517148): |  0.08% |
   | Covered Lines: | 11897 |
   | Relevant Lines: | 20416 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] dongzl commented on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877#issuecomment-602191493
 
 
   This pr is not suitable, lots of code is not well considered.

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4877: Logic table name and logic column name toLowerCase() for Encrypt.
URL: https://github.com/apache/incubator-shardingsphere/pull/4877#issuecomment-602027727
 
 
   ## Pull Request Test Coverage Report for [Build 10465](https://coveralls.io/builds/29520002)
   
   * **28** of **28**   **(100.0%)**  changed or added relevant lines in **4** files are covered.
   * **3** unchanged lines in **1** file lost coverage.
   * Overall coverage increased (+**0.003%**) to **58.195%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29520002/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
   <!-- | **Total:** | **3** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29520002/badge)](https://coveralls.io/builds/29520002) |
   | :-- | --: |
   | Change from base [Build 1137](https://coveralls.io/builds/29517148): |  0.003% |
   | Covered Lines: | 11881 |
   | Relevant Lines: | 20416 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
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

[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull request #4877: Logic table name and logic column name toLowerCase() for Encrypt.

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services