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 2020/03/19 10:04:04 UTC

[GitHub] [incubator-shardingsphere] tristaZero opened a new issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

tristaZero opened a new issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849
 
 
   Hi, we are glad you can fix this issue to become a contributor to Apache Sharding Sphere.
   Welcome! 😃
   
   By doing this assignment, you can learn more about how a query SQL is parsed and how to verify the parsing result of a SQL in Apache ShardingSphere.
   
   This issue is to add the parsing assertion for `ParameterMarkerExpression` by adding the start-index and stop-index attributes in parsing-result.xml.
   
   It is not difficult, and the following comment also gives you the detailed instruction. BTW, if you need any help, please be free to reply to this one.

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849#issuecomment-601099984
 
 
   @JasonKing168 Welcome

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849#issuecomment-601093808
 
 
   ### How to find the targets to be fixed?
   1. Open class `SQLParserParameterizedTest` and delete the following lines,
   ```
           // TODO Correct for new parser, please remove them after using new parser
           sqlCases.add("insert_on_duplicate_key_update_with_base64_aes_encrypt");
           sqlCases.add("insert_with_one_auto_increment_column");
           sqlCases.add("insert_on_duplicate_key_update_with_complicated_expression");
           sqlCases.add("insert_without_columns_and_with_generate_key_column");
           sqlCases.add("insert_without_columns_and_without_generate_key_column");
           sqlCases.add("insert_without_columns_with_all_placeholders");
   ```
   2. run `SQLParserParameterizedTest`
   3. All the SQL cases which have the error assertion results are our targets to be fixed.
   
   ### How to fix the above assertion results?
   1. Look at the exception log and find the corresponding `SQL Case ID` and `SQL`.
   2. Find out the `parsing result` of this `SQL Case ID` in `./incubator-shardingsphere/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml`
   3. Calculate the correct `start-index` and `stop-index` of `parameter-marker-expression` segment (i.e., `?`) of this `SQL`.
   4. Add the calculated `start-index` and `stop-index` labels of `parameter-marker-expression` segment to `parsing result` of this `SQL Case ID`, like
   ```
               <parameter-marker-expression value="2" start-index="10" stop-index="11" />
   ```
   5. Run `SQLParserParameterizedTest` again to check whether this `SQL Case ID` does not stay in the list of `SQL` with  `bad assertion result`.

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849#issuecomment-601108808
 
 
   > I'd love to try to fix it.
   
   Looking forward to your contribution.

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu closed issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] JasonKing168 commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression

Posted by GitBox <gi...@apache.org>.
JasonKing168 commented on issue #4849: Add start-index and stop-index assertion for ParameterMarkerExpression
URL: https://github.com/apache/incubator-shardingsphere/issues/4849#issuecomment-601099643
 
 
   I'd love to try to fix it.

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


With regards,
Apache Git Services