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 2019/10/16 05:19:44 UTC

[GitHub] [incubator-shardingsphere] jingshanglu commented on issue #3284: Fix assignmentValueNode get error index

jingshanglu commented on issue #3284: Fix assignmentValueNode get error index
URL: https://github.com/apache/incubator-shardingsphere/pull/3284#issuecomment-542520482
 
 
   > The modification may cause problem.
   > Right now we just can recognize 2 model:
   > 
   >     1. xxx = xxx
   > 
   >     2. xxx = values(xxx)
   > 
   > 
   > So the value we need to fetch is index `2` or index `4`.
   > 
   > I know we cannot get all scenarios, but if we change index to `3` on this pr, the scenario `xxx = values(xxx)` will be broken.
   > 
   > The problem of this issue is AST. AST should make consist of set assignment as `3` children, the right value should in one node and other more expression should in the next level of AST.
   > We need to modify g4 file to change the structure of AST.
   
   g4 like this will be ok?
   ```
   assignment
       : columnName EQ_ assignmentRight_
       ;
   
   assignmentRight_
       : VALUES LP_ RP_ | assignmentValue
       ;
   
   ```

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