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/09/06 17:06:16 UTC
[GitHub] [shardingsphere] Icesource opened a new pull request #12247: add SQLServer grammar Create View
Icesource opened a new pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247
For #6478.
Changes proposed in this pull request:
- add SQLServer grammar Create View
- move sqlserver visitSelect from DMLVisitor to SQLVisitor
--
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 #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247#issuecomment-913788679
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12247?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 [#12247](https://codecov.io/gh/apache/shardingsphere/pull/12247?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (efe4e3c) into [master](https://codecov.io/gh/apache/shardingsphere/commit/bf812c0e85afa392c4013cb71fd2945f75189f81?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bf812c0) will **increase** coverage by `0.00%`.
> The diff coverage is `90.10%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/12247/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/12247?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 #12247 +/- ##
=========================================
Coverage 63.74% 63.74%
Complexity 1261 1261
=========================================
Files 2351 2352 +1
Lines 35746 35758 +12
Branches 6210 6211 +1
=========================================
+ Hits 22785 22793 +8
- Misses 11135 11138 +3
- Partials 1826 1827 +1
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/12247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...tatement/impl/SQLServerDMLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/12247/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWxzZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3Fsc2VydmVyL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvU1FMU2VydmVyRE1MU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `85.04% <ø> (-2.18%)` | :arrow_down: |
| [...nt/sqlserver/ddl/SQLServerCreateViewStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/12247/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvc3Fsc2VydmVyL2RkbC9TUUxTZXJ2ZXJDcmVhdGVWaWV3U3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...r/statement/impl/SQLServerStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/12247/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWxzZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3Fsc2VydmVyL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvU1FMU2VydmVyU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `74.34% <91.76%> (+6.76%)` | :arrow_up: |
| [...tatement/impl/SQLServerDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/12247/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWxzZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3Fsc2VydmVyL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvU1FMU2VydmVyRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `83.56% <100.00%> (+0.46%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12247?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/12247?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 [bf812c0...efe4e3c](https://codecov.io/gh/apache/shardingsphere/pull/12247?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] Icesource commented on a change in pull request #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
Icesource commented on a change in pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247#discussion_r703632921
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -39,6 +39,10 @@ createProcedure
: CREATE (OR ALTER)? (PROC | PROCEDURE) procedureName procParameters createProcClause
;
+createView
+ : CREATE (OR ALTER)? VIEW viewName createViewClause
+ ;
+
Review comment:
@jingshanglu The grammar definition here is a bit confusing. ```CREATE (OR ALTER)?``` is defined in CREATE syntax. It corresponds to such a sentence “CREATE OR ALTER VIEW ...”. This is a new T-SQL language statement announced in SQL Server 2016 SP1. And it can be applied on the following object: procedures,functions,triggers and views.
https://docs.microsoft.com/en-us/archive/blogs/sqlserverstorageengine/create-or-alter-another-great-language-enhancement-in-sql-server-2016-sp1.
Create View Definition: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql?view=sql-server-ver15
Alter View Definition: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-view-transact-sql?view=sql-server-ver15
Although their grammar is almost the same, should I think it(```CREATE OR ALTER```) should be parsed as a SQLServerCreateViewStatement ?
--
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] jingshanglu commented on a change in pull request #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247#discussion_r703370048
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -39,6 +39,10 @@ createProcedure
: CREATE (OR ALTER)? (PROC | PROCEDURE) procedureName procParameters createProcClause
;
+createView
+ : CREATE (OR ALTER)? VIEW viewName createViewClause
+ ;
+
Review comment:
@Icesource Maybe `viewStatement` is a better name。
--
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] jingshanglu merged pull request #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
jingshanglu merged pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247
--
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] jingshanglu commented on a change in pull request #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247#discussion_r703961161
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -39,6 +39,10 @@ createProcedure
: CREATE (OR ALTER)? (PROC | PROCEDURE) procedureName procParameters createProcClause
;
+createView
+ : CREATE (OR ALTER)? VIEW viewName createViewClause
+ ;
+
Review comment:
@Icesource Ok
--
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] Icesource commented on a change in pull request #12247: add SQLServer grammar Create View
Posted by GitBox <gi...@apache.org>.
Icesource commented on a change in pull request #12247:
URL: https://github.com/apache/shardingsphere/pull/12247#discussion_r703632921
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -39,6 +39,10 @@ createProcedure
: CREATE (OR ALTER)? (PROC | PROCEDURE) procedureName procParameters createProcClause
;
+createView
+ : CREATE (OR ALTER)? VIEW viewName createViewClause
+ ;
+
Review comment:
@jingshanglu The grammar definition here is a bit confusing. ```CREATE (OR ALTER)?``` is defined in CREATE syntax. It corresponds to such a sentence “CREATE OR ALTER VIEW ...”. This is a new T-SQL language statement announced in SQL Server 2016 SP1. And it can be applied on the following object: procedures,functions,triggers and views.
https://docs.microsoft.com/en-us/archive/blogs/sqlserverstorageengine/create-or-alter-another-great-language-enhancement-in-sql-server-2016-sp1.
Create View Definition: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql?view=sql-server-ver15
Alter View Definition: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-view-transact-sql?view=sql-server-ver15
Although their grammar is almost the same, should I think it(```CREATE OR ALTER```) should be parsed into a SQLServerCreateViewStatement ?
--
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