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 2022/02/23 11:18:08 UTC

[GitHub] [shardingsphere] tuichenchuxin opened a new pull request #15597: Fix InsertValueContext.getValue cast exception

tuichenchuxin opened a new pull request #15597:
URL: https://github.com/apache/shardingsphere/pull/15597


   Fixes #15334.
   
   Changes proposed in this pull request:
   - Fix InsertValueContext.getValue cast 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuichenchuxin commented on a change in pull request #15597: Fix InsertValueContext.getValue cast exception

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



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/parameter/rewriter/EncryptInsertValueParameterRewriter.java
##########
@@ -82,7 +83,8 @@ private void encryptInsertValues(final GroupedParameterBuilder parameterBuilder,
                 ExpressionSegment expressionSegment = insertStatementContext.getInsertValueContexts().get(count).getValueExpressions().get(columnIndex);
                 if (expressionSegment instanceof ParameterMarkerExpressionSegment) {
                     encryptInsertValue(
-                            encryptAlgorithm, parameterIndex, insertStatementContext.getInsertValueContexts().get(count).getValue(columnIndex),
+                            encryptAlgorithm, parameterIndex, insertStatementContext.getInsertValueContexts().get(count).getValue(columnIndex)

Review comment:
       @strongduanmu Because It's for function encrypt,can not support yet.




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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #15597: Fix InsertValueContext.getValue cast exception

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



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/parameter/rewriter/EncryptInsertValueParameterRewriter.java
##########
@@ -82,7 +83,8 @@ private void encryptInsertValues(final GroupedParameterBuilder parameterBuilder,
                 ExpressionSegment expressionSegment = insertStatementContext.getInsertValueContexts().get(count).getValueExpressions().get(columnIndex);
                 if (expressionSegment instanceof ParameterMarkerExpressionSegment) {
                     encryptInsertValue(
-                            encryptAlgorithm, parameterIndex, insertStatementContext.getInsertValueContexts().get(count).getValue(columnIndex),
+                            encryptAlgorithm, parameterIndex, insertStatementContext.getInsertValueContexts().get(count).getValue(columnIndex)

Review comment:
       @tuichenchuxin Why throw exception here?




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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter commented on pull request #15597: Fix InsertValueContext.getValue cast exception

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15597?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 [#15597](https://codecov.io/gh/apache/shardingsphere/pull/15597?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07f58f1) into [master](https://codecov.io/gh/apache/shardingsphere/commit/79c3c2e898e98f20758412f281745c36c1144333?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (79c3c2e) will **increase** coverage by `0.04%`.
   > The diff coverage is `45.45%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/15597/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/15597?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   #15597      +/-   ##
   ============================================
   + Coverage     60.41%   60.45%   +0.04%     
   - Complexity     1986     1991       +5     
   ============================================
     Files          3232     3238       +6     
     Lines         48667    48695      +28     
     Branches       8317     8319       +2     
   ============================================
   + Hits          29402    29439      +37     
   + Misses        16851    16842       -9     
     Partials       2414     2414              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/15597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../rewriter/EncryptInsertValueParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS9wYXJhbWV0ZXIvcmV3cml0ZXIvRW5jcnlwdEluc2VydFZhbHVlUGFyYW1ldGVyUmV3cml0ZXIuamF2YQ==) | `2.22% <0.00%> (-0.06%)` | :arrow_down: |
   | [...n/generator/EncryptInsertValuesTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvcmV3cml0ZS90b2tlbi9nZW5lcmF0b3IvRW5jcnlwdEluc2VydFZhbHVlc1Rva2VuR2VuZXJhdG9yLmphdmE=) | `1.29% <0.00%> (ø)` | |
   | [...nder/segment/insert/values/InsertValueContext.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC9pbnNlcnQvdmFsdWVzL0luc2VydFZhbHVlQ29udGV4dC5qYXZh) | `80.00% <60.00%> (-6.37%)` | :arrow_down: |
   | [...engine/dml/ShadowInsertStatementRoutingEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhZG93L3NoYXJkaW5nc3BoZXJlLXNoYWRvdy1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFkb3cvcm91dGUvZW5naW5lL2RtbC9TaGFkb3dJbnNlcnRTdGF0ZW1lbnRSb3V0aW5nRW5naW5lLmphdmE=) | `84.61% <66.66%> (ø)` | |
   | [...gine/impl/InsertClauseShardingConditionEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL2NvbmRpdGlvbi9lbmdpbmUvaW1wbC9JbnNlcnRDbGF1c2VTaGFyZGluZ0NvbmRpdGlvbkVuZ2luZS5qYXZh) | `50.94% <0.00%> (-1.06%)` | :arrow_down: |
   | [...re/infra/rewrite/engine/RouteSQLRewriteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtcmV3cml0ZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvcmV3cml0ZS9lbmdpbmUvUm91dGVTUUxSZXdyaXRlRW5naW5lLmphdmE=) | `75.00% <0.00%> (-0.81%)` | :arrow_down: |
   | [...he/shardingsphere/mode/manager/ContextManager.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWFuYWdlci9Db250ZXh0TWFuYWdlci5qYXZh) | `69.53% <0.00%> (-0.80%)` | :arrow_down: |
   | [...ana/config/NarayanaConfigurationFileGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uLXR5cGUvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24teGEvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24teGEtcHJvdmlkZXIvc2hhcmRpbmdzcGhlcmUtdHJhbnNhY3Rpb24teGEtbmFyYXlhbmEvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3RyYW5zYWN0aW9uL3hhL25hcmF5YW5hL2NvbmZpZy9OYXJheWFuYUNvbmZpZ3VyYXRpb25GaWxlR2VuZXJhdG9yLmphdmE=) | `60.60% <0.00%> (-0.62%)` | :arrow_down: |
   | [...here/infra/binder/segment/table/TablesContext.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC90YWJsZS9UYWJsZXNDb250ZXh0LmphdmE=) | `80.61% <0.00%> (-0.39%)` | :arrow_down: |
   | [...ser/core/common/CommonDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/15597/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-c2hhcmRpbmdzcGhlcmUtZGlzdHNxbC9zaGFyZGluZ3NwaGVyZS1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGlzdHNxbC9wYXJzZXIvY29yZS9jb21tb24vQ29tbW9uRGlzdFNRTFN0YXRlbWVudFZpc2l0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | ... and [17 more](https://codecov.io/gh/apache/shardingsphere/pull/15597/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15597?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/15597?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 [79c3c2e...07f58f1](https://codecov.io/gh/apache/shardingsphere/pull/15597?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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu merged pull request #15597: Fix InsertValueContext.getValue cast exception

Posted by GitBox <gi...@apache.org>.
strongduanmu merged pull request #15597:
URL: https://github.com/apache/shardingsphere/pull/15597


   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org