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/12/16 01:33:13 UTC

[GitHub] [shardingsphere] dongzl opened a new pull request, #22901: Optimize sql hint.

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

   For #20736 .
   
   Changes proposed in this pull request:
     - optimize JDBC SQL hint.
   


-- 
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 #22901: Optimize JDBC SQL hint.

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


-- 
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 #22901: Optimize JDBC SQL hint.

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22901?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 [#22901](https://codecov.io/gh/apache/shardingsphere/pull/22901?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2394c6c) into [master](https://codecov.io/gh/apache/shardingsphere/commit/fe00d7fa8460297efb57ca6f0a4503e8cf873e12?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fe00d7f) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff            @@
   ##             master   #22901   +/-   ##
   =========================================
     Coverage     49.37%   49.37%           
   + Complexity     2458     2454    -4     
   =========================================
     Files          4150     4151    +1     
     Lines         57932    57932           
     Branches       9094     9099    +5     
   =========================================
   + Hits          28602    28606    +4     
   + Misses        26823    26820    -3     
   + Partials       2507     2506    -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ore/statement/ShardingSpherePreparedStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-amRiYy9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kcml2ZXIvamRiYy9jb3JlL3N0YXRlbWVudC9TaGFyZGluZ1NwaGVyZVByZXBhcmVkU3RhdGVtZW50LmphdmE=) | `61.68% <100.00%> (+0.11%)` | :arrow_up: |
   | [...r/jdbc/core/statement/ShardingSphereStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-amRiYy9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kcml2ZXIvamRiYy9jb3JlL3N0YXRlbWVudC9TaGFyZGluZ1NwaGVyZVN0YXRlbWVudC5qYXZh) | `50.16% <100.00%> (+0.16%)` | :arrow_up: |
   | [...handler/distsql/ral/hint/enums/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-cHJveHkvYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2Rpc3RzcWwvcmFsL2hpbnQvZW51bXMvSGludFNvdXJjZVR5cGUuamF2YQ==) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
   | [...phere/agent/core/transformer/AgentTransformer.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS90cmFuc2Zvcm1lci9BZ2VudFRyYW5zZm9ybWVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ingsphere/agent/bootstrap/ShardingSphereAgent.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9ib290c3RyYXAvU2hhcmRpbmdTcGhlcmVBZ2VudC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...re/agent/core/plugin/loader/AgentPluginLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vbG9hZGVyL0FnZW50UGx1Z2luTG9hZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...agent/core/plugin/loader/AdviceInstanceLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vbG9hZGVyL0FkdmljZUluc3RhbmNlTG9hZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...gin/advisor/ClassAdvisorConfigurationRegistry.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vYWR2aXNvci9DbGFzc0Fkdmlzb3JDb25maWd1cmF0aW9uUmVnaXN0cnkuamF2YQ==) | | |
   | [...agent/core/config/yaml/YamlAgentConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9jb25maWcveWFtbC9ZYW1sQWdlbnRDb25maWd1cmF0aW9uLmphdmE=) | | |
   | [...re/config/registry/AgentConfigurationRegistry.java](https://codecov.io/gh/apache/shardingsphere/pull/22901/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-YWdlbnQvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9jb25maWcvcmVnaXN0cnkvQWdlbnRDb25maWd1cmF0aW9uUmVnaXN0cnkuamF2YQ==) | | |
   | ... and [21 more](https://codecov.io/gh/apache/shardingsphere/pull/22901/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) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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 commented on a diff in pull request #22901: Optimize JDBC SQL hint.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #22901:
URL: https://github.com/apache/shardingsphere/pull/22901#discussion_r1050289917


##########
jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java:
##########
@@ -191,13 +194,14 @@ private ShardingSpherePreparedStatement(final ShardingSphereConnection connectio
         this.connection = connection;
         metaDataContexts = connection.getContextManager().getMetaDataContexts();
         eventBusContext = connection.getContextManager().getInstanceContext().getEventBusContext();
-        this.sql = sql;
+        this.originSQL = sql;

Review Comment:
   `removeHintSQL` may be better, just keep same with createQueryContext method.



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