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/07/18 16:36:23 UTC

[GitHub] [shardingsphere] RaigorJiang opened a new pull request, #19337: Fix exception occurred for encrypt DistSQL.

RaigorJiang opened a new pull request, #19337:
URL: https://github.com/apache/shardingsphere/pull/19337

   Revise #18179.
   
   ### Before
   ```sql
   mysql> SHOW ENCRYPT RULES;
   ERROR 1997 (C1997): Runtime exception: [null]
   mysql> CREATE ENCRYPT RULE t_encrypt (
       -> COLUMNS(
       -> (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
       -> (NAME=order_id, CIPHER =order_cipher,TYPE(NAME=MD5))
       -> ),QUERY_WITH_CIPHER_COLUMN=true
       -> );
   ERROR 1997 (C1997): Runtime exception: [Cannot invoke "org.apache.shardingsphere.distsql.parser.segment.AlgorithmSegment.getName()" because the return value of "org.apache.shardingsphere.encrypt.distsql.parser.segment.EncryptColumnSegment.getAssistedQueryEncryptor()" is null]
   ```
   
   ##### Log
   ```sql
   java.lang.IllegalStateException: null
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:492)
   	at org.apache.shardingsphere.encrypt.distsql.handler.query.EncryptRuleQueryResultSet.init(EncryptRuleQueryResultSet.java:51)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rql.RQLBackendHandler.execute(RQLBackendHandler.java:51)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rql.RQLBackendHandler.execute(RQLBackendHandler.java:40)
   
   
   java.lang.NullPointerException: Cannot invoke "org.apache.shardingsphere.distsql.parser.segment.AlgorithmSegment.getName()" because the return value of "org.apache.shardingsphere.encrypt.distsql.parser.segment.EncryptColumnSegment.getAssistedQueryEncryptor()" is null
   	at org.apache.shardingsphere.encrypt.distsql.handler.converter.EncryptRuleStatementConverter.createAssistedQueryEncryptorConfiguration(EncryptRuleStatementConverter.java:80)
   	at org.apache.shardingsphere.encrypt.distsql.handler.converter.EncryptRuleStatementConverter.createEncryptorConfigurations(EncryptRuleStatementConverter.java:70)
   	at org.apache.shardingsphere.encrypt.distsql.handler.converter.EncryptRuleStatementConverter.convert(EncryptRuleStatementConverter.java:48)
   
   ```
   
   ### After
   <img width="1236" alt="Snipaste_2022-07-18_23-40-24" src="https://user-images.githubusercontent.com/5668787/179559625-6347f1b4-8a42-4244-84ff-f3e40205b316.png">
   
   


-- 
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] tristaZero merged pull request #19337: Fix exception occurred for encrypt DistSQL.

Posted by GitBox <gi...@apache.org>.
tristaZero merged PR #19337:
URL: https://github.com/apache/shardingsphere/pull/19337


-- 
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 #19337: Fix exception occurred for encrypt DistSQL.

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/19337?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 [#19337](https://codecov.io/gh/apache/shardingsphere/pull/19337?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fb87cb6) into [master](https://codecov.io/gh/apache/shardingsphere/commit/adb4295783713c2febceb7014dca96d6bf3220ff?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (adb4295) will **increase** coverage by `0.04%`.
   > The diff coverage is `66.66%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19337      +/-   ##
   ============================================
   + Coverage     59.57%   59.61%   +0.04%     
     Complexity     2371     2371              
   ============================================
     Files          3817     3817              
     Lines         54335    54332       -3     
     Branches       9250     9252       +2     
   ============================================
   + Hits          32369    32391      +22     
   + Misses        19207    19176      -31     
   - Partials       2759     2765       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/19337?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...t/distsql/parser/segment/EncryptColumnSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC1kaXN0c3FsLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZW5jcnlwdC9kaXN0c3FsL3BhcnNlci9zZWdtZW50L0VuY3J5cHRDb2x1bW5TZWdtZW50LmphdmE=) | `0.00% <ø> (ø)` | |
   | [...ndler/converter/EncryptRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC1kaXN0c3FsLWhhbmRsZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvZGlzdHNxbC9oYW5kbGVyL2NvbnZlcnRlci9FbmNyeXB0UnVsZVN0YXRlbWVudENvbnZlcnRlci5qYXZh) | `88.88% <60.00%> (-7.12%)` | :arrow_down: |
   | [...stsql/handler/query/EncryptRuleQueryResultSet.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC1kaXN0c3FsLWhhbmRsZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvZGlzdHNxbC9oYW5kbGVyL3F1ZXJ5L0VuY3J5cHRSdWxlUXVlcnlSZXN1bHRTZXQuamF2YQ==) | `78.26% <100.00%> (-0.91%)` | :arrow_down: |
   | [...nd/text/distsql/ral/hint/enums/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2hpbnQvZW51bXMvSGludFNvdXJjZVR5cGUuamF2YQ==) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
   | [...sphere/sharding/rewrite/token/pojo/IndexToken.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcmV3cml0ZS90b2tlbi9wb2pvL0luZGV4VG9rZW4uamF2YQ==) | `76.92% <0.00%> (+50.00%)` | :arrow_up: |
   | [...sphere/sharding/rewrite/token/pojo/TableToken.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcmV3cml0ZS90b2tlbi9wb2pvL1RhYmxlVG9rZW4uamF2YQ==) | `93.75% <0.00%> (+56.25%)` | :arrow_up: |
   | [...ine/core/datasource/PipelineDataSourceFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvZGF0YXNvdXJjZS9QaXBlbGluZURhdGFTb3VyY2VGYWN0b3J5LmphdmE=) | `66.66% <0.00%> (+66.66%)` | :arrow_up: |
   | [...reator/impl/StandardPipelineDataSourceCreator.java](https://codecov.io/gh/apache/shardingsphere/pull/19337/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvZGF0YXNvdXJjZS9jcmVhdG9yL2ltcGwvU3RhbmRhcmRQaXBlbGluZURhdGFTb3VyY2VDcmVhdG9yLmphdmE=) | `100.00% <0.00%> (+66.66%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/19337?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/19337?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 [ef561ed...fb87cb6](https://codecov.io/gh/apache/shardingsphere/pull/19337?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