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 2021/04/23 09:48:21 UTC

[GitHub] [shardingsphere] huanghao495430759 opened a new pull request #10158: fix drop columns exception.

huanghao495430759 opened a new pull request #10158:
URL: https://github.com/apache/shardingsphere/pull/10158


   fix drop columns exception.
   


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



[GitHub] [shardingsphere] huanghao495430759 closed pull request #10158: fix drop columns exception.

Posted by GitBox <gi...@apache.org>.
huanghao495430759 closed pull request #10158:
URL: https://github.com/apache/shardingsphere/pull/10158


   


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



[GitHub] [shardingsphere] codecov-commenter commented on pull request #10158: fix drop columns exception.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10158:
URL: https://github.com/apache/shardingsphere/pull/10158#issuecomment-825561838


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10158](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (41260d4) into [master](https://codecov.io/gh/apache/shardingsphere/commit/b967e3150eab2931b3a996514204b436e0aa7135?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b967e31) will **decrease** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10158/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #10158      +/-   ##
   ============================================
   - Coverage     68.00%   68.00%   -0.01%     
     Complexity      680      680              
   ============================================
     Files          1694     1694              
     Lines         29052    29058       +6     
     Branches       5201     5202       +1     
   ============================================
   + Hits          19757    19761       +4     
   - Misses         7783     7785       +2     
     Partials       1512     1512              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...enerator/impl/EncryptAlterTableTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvaW1wbC9FbmNyeXB0QWx0ZXJUYWJsZVRva2VuR2VuZXJhdG9yLmphdmE=) | `98.78% <100.00%> (+1.21%)` | `0.00 <0.00> (ø)` | |
   | [...dl/impl/CreateShardingTableRuleBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL2ltcGwvQ3JlYXRlU2hhcmRpbmdUYWJsZVJ1bGVCYWNrZW5kSGFuZGxlci5qYXZh) | `90.90% <0.00%> (-9.10%)` | `1.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b967e31...41260d4](https://codecov.io/gh/apache/shardingsphere/pull/10158?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #10158: fix drop columns exception.

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #10158:
URL: https://github.com/apache/shardingsphere/pull/10158#discussion_r619142378



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-rewrite/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptAlterTableTokenGenerator.java
##########
@@ -130,7 +130,7 @@ protected boolean isGenerateSQLTokenForEncrypt(final SQLStatementContext sqlStat
     private Collection<SQLToken> getDropColumnTokens(final String tableName, final String columnName, 
                                                      final ColumnSegment columnSegment, final DropColumnDefinitionSegment dropColumnDefinitionSegment) {
         Collection<SQLToken> result = new LinkedList<>();
-        result.add(new RemoveToken(dropColumnDefinitionSegment.getStartIndex() - 1, columnSegment.getStopIndex() + 1));
+        result.add(new RemoveToken(columnSegment.getStartIndex() - "DROP COLUMN".length() - 2, columnSegment.getStopIndex()));

Review comment:
       "DROP COLUMN" is the literal which is incorrect.
   The `drop column` may keep more than one spaces or include comment inside, for example: `drop    /*xxxx*/ column` 




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



[GitHub] [shardingsphere] huanghao495430759 closed pull request #10158: fix drop columns exception.

Posted by GitBox <gi...@apache.org>.
huanghao495430759 closed pull request #10158:
URL: https://github.com/apache/shardingsphere/pull/10158


   


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