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/06/14 07:41:58 UTC
[GitHub] [shardingsphere] Liangda-w opened a new pull request #10768: Add Oracle SQL - ANALYZE
Liangda-w opened a new pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768
Relates #10513
Changes proposed in this pull request:
- Add Oracle SQL - [ANALYZE](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ANALYZE.html#GUID-535CE98E-2359-4147-839F-DCB3772C1B0E)
- Add corresponding test cases
@wgy8283335
--
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] wgy8283335 merged pull request #10768: Add Oracle SQL - ANALYZE
Posted by GitBox <gi...@apache.org>.
wgy8283335 merged pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768
--
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] wgy8283335 commented on a change in pull request #10768: Add Oracle SQL - ANALYZE
Posted by GitBox <gi...@apache.org>.
wgy8283335 commented on a change in pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768#discussion_r650334988
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorRule.java
##########
@@ -108,6 +108,8 @@
DROP_VIEW("DropView", SQLStatementType.DDL),
+ ANALYZE("Analyze", SQLStatementType.DDL),
Review comment:
Why set `Analyze` as DDL?
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
##########
@@ -87,6 +90,8 @@ public static void assertIs(final SQLCaseAssertContext assertContext, final DDLS
AlterSessionStatementAssert.assertIs(assertContext, (OracleAlterSessionStatement) actual, (AlterSessionStatementTestCase) expected);
} else if (actual instanceof AlterSystemStatement) {
AlterSystemStatementAssert.assertIs(assertContext, (AlterSystemStatement) actual, (AlterSystemStatementTestCase) expected);
+ } else if (actual instanceof OracleAnalyzeStatement) {
Review comment:
Are you sure that `analyze` should be put in the DDL?
--
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] Liangda-w commented on pull request #10768: Add Oracle SQL - ANALYZE
Posted by GitBox <gi...@apache.org>.
Liangda-w commented on pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768#issuecomment-860025724
> The `Analyze` should be classified as DDL or DAL?
Hi @wgy8283335 I thought it will be DDL because of the [Oracle Doc](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Types-of-SQL-Statements.html#GUID-FD9A8CB4-6B9A-44E5-B114-EFB8DA76FC88):
![image](https://user-images.githubusercontent.com/66914151/121771072-6a496200-cb6d-11eb-9c24-5fd0775ca80b.png)
But you're right, in [MySQL](https://dev.mysql.com/doc/refman/8.0/en/analyze-table.html) `ANALYZE` is classified as DAL. So do you think change to DAL is 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
[GitHub] [shardingsphere] codecov-commenter commented on pull request #10768: Add Oracle SQL - ANALYZE
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768#issuecomment-859576131
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10768?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 [#10768](https://codecov.io/gh/apache/shardingsphere/pull/10768?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6cdf90) into [master](https://codecov.io/gh/apache/shardingsphere/commit/3d86628e96c8310117ae64d67cb97f2679c2f829?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d86628) will **increase** coverage by `0.24%`.
> The diff coverage is `90.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10768/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/10768?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 #10768 +/- ##
============================================
+ Coverage 65.21% 65.46% +0.24%
- Complexity 686 689 +3
============================================
Files 1779 1781 +2
Lines 30783 30842 +59
Branches 5534 5556 +22
============================================
+ Hits 20076 20190 +114
+ Misses 9114 9046 -68
- Partials 1593 1606 +13
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10768?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/statement/oracle/ddl/OracleAnalyzeStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbmFseXplU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `82.50% <100.00%> (+0.68%)` | :arrow_up: |
| [...itor/statement/impl/OracleStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `70.56% <100.00%> (ø)` | |
| [...sphere/sql/parser/core/visitor/SQLVisitorRule.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWVuZ2luZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9jb3JlL3Zpc2l0b3IvU1FMVmlzaXRvclJ1bGUuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [.../AlterShardingBindingTableRulesBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL2ltcGwvQWx0ZXJTaGFyZGluZ0JpbmRpbmdUYWJsZVJ1bGVzQmFja2VuZEhhbmRsZXIuamF2YQ==) | `89.47% <0.00%> (-2.53%)` | :arrow_down: |
| [...CreateShardingBindingTableRulesBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL2ltcGwvQ3JlYXRlU2hhcmRpbmdCaW5kaW5nVGFibGVSdWxlc0JhY2tlbmRIYW5kbGVyLmphdmE=) | `89.74% <0.00%> (-2.26%)` | :arrow_down: |
| [.../route/engine/type/ShardingRouteEngineFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL3R5cGUvU2hhcmRpbmdSb3V0ZUVuZ2luZUZhY3RvcnkuamF2YQ==) | `63.63% <0.00%> (-1.99%)` | :arrow_down: |
| [...roxy/frontend/mysql/err/MySQLErrPacketFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Byb3h5L2Zyb250ZW5kL215c3FsL2Vyci9NeVNRTEVyclBhY2tldEZhY3RvcnkuamF2YQ==) | `39.77% <0.00%> (-0.93%)` | :arrow_down: |
| [...rdingsphere/db/protocol/error/CommonErrorCode.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvZXJyb3IvQ29tbW9uRXJyb3JDb2RlLmphdmE=) | `100.00% <0.00%> (ø)` | |
| [...dl/impl/CreateShardingTableRuleBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10768/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) | `66.66% <0.00%> (ø)` | |
| ... and [14 more](https://codecov.io/gh/apache/shardingsphere/pull/10768/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/10768?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/10768?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 [3d86628...f6cdf90](https://codecov.io/gh/apache/shardingsphere/pull/10768?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] wgy8283335 commented on pull request #10768: Add Oracle SQL - ANALYZE
Posted by GitBox <gi...@apache.org>.
wgy8283335 commented on pull request #10768:
URL: https://github.com/apache/shardingsphere/pull/10768#issuecomment-860052732
> > The `Analyze` should be classified as DDL or DAL?
>
> Hi @wgy8283335 I thought it will be DDL because of the [Oracle Doc](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Types-of-SQL-Statements.html#GUID-FD9A8CB4-6B9A-44E5-B114-EFB8DA76FC88):
>
> ![image](https://user-images.githubusercontent.com/66914151/121771072-6a496200-cb6d-11eb-9c24-5fd0775ca80b.png)
>
> But you're right, in [MySQL](https://dev.mysql.com/doc/refman/8.0/en/analyze-table.html) `ANALYZE` is classified as DAL. So do you think change to DAL is better?
I think DDL is 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