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/11/08 15:10:19 UTC

[GitHub] [shardingsphere] Jacob953 opened a new pull request, #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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

   Changes proposed in this pull request:
     - add ServiceProviderNotFoundServerException
     - resize empty result to 3
     - add databaseType as 3rd param
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [x] I have (or in comment I request) added corresponding labels for the pull request.
   - [x] I have passed maven check locally : `mvn clean install -B -T2C -DskipTests -Dmaven.javadoc.skip=true -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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] Jacob953 commented on a diff in pull request #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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


##########
test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/base/DynamicLoadingSQLParserParameterizedTest.java:
##########
@@ -133,7 +134,8 @@ public final void assertParseSQL() {
         try {
             ParseASTNode parseASTNode = new SQLParserEngine(databaseType, new CacheOption(128, 1024L)).parse(sql, false);
             new SQLVisitorEngine(databaseType, "STATEMENT", true, new Properties()).visit(parseASTNode);
-        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException | NumberFormatException | StringIndexOutOfBoundsException ignore) {
+        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException
+                | NumberFormatException | StringIndexOutOfBoundsException | ServiceProviderNotFoundServerException ignore) {

Review Comment:
   Exception and RuntimeException are not allowed.
   To make muli-exceptions easier to read, I combine 3 exceptions into ShardingSphereExternalException.



-- 
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] Jacob953 commented on a diff in pull request #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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


##########
test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/base/DynamicLoadingSQLParserParameterizedTest.java:
##########
@@ -133,7 +134,8 @@ public final void assertParseSQL() {
         try {
             ParseASTNode parseASTNode = new SQLParserEngine(databaseType, new CacheOption(128, 1024L)).parse(sql, false);
             new SQLVisitorEngine(databaseType, "STATEMENT", true, new Properties()).visit(parseASTNode);
-        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException | NumberFormatException | StringIndexOutOfBoundsException ignore) {
+        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException
+                | NumberFormatException | StringIndexOutOfBoundsException | ServiceProviderNotFoundServerException ignore) {

Review Comment:
   fixed.



-- 
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] Jacob953 commented on a diff in pull request #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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


##########
test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/base/DynamicLoadingSQLParserParameterizedTest.java:
##########
@@ -133,7 +134,8 @@ public final void assertParseSQL() {
         try {
             ParseASTNode parseASTNode = new SQLParserEngine(databaseType, new CacheOption(128, 1024L)).parse(sql, false);
             new SQLVisitorEngine(databaseType, "STATEMENT", true, new Properties()).visit(parseASTNode);
-        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException | NumberFormatException | StringIndexOutOfBoundsException ignore) {
+        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException
+                | NumberFormatException | StringIndexOutOfBoundsException | ServiceProviderNotFoundServerException ignore) {

Review Comment:
   Exception and RuntimeException are not allowed.
   To make muli-exceptions easier to read, I replace SQLParsingException & SQLASTVisitorException with KernelSQLException.



-- 
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] taojintianxia merged pull request #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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


-- 
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] taojintianxia commented on a diff in pull request #22022: Fix wrong number of arguments on IT of dynamic loading SQL case

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


##########
test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/base/DynamicLoadingSQLParserParameterizedTest.java:
##########
@@ -133,7 +134,8 @@ public final void assertParseSQL() {
         try {
             ParseASTNode parseASTNode = new SQLParserEngine(databaseType, new CacheOption(128, 1024L)).parse(sql, false);
             new SQLVisitorEngine(databaseType, "STATEMENT", true, new Properties()).visit(parseASTNode);
-        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException | NumberFormatException | StringIndexOutOfBoundsException ignore) {
+        } catch (final SQLParsingException | ClassCastException | NullPointerException | SQLASTVisitorException
+                | NumberFormatException | StringIndexOutOfBoundsException | ServiceProviderNotFoundServerException ignore) {

Review Comment:
   there are too much exception caught, looks a little bit chaos.
   if this will be ignored, is it possible to catch 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