terrymanu commented on issue #3284: Fix assignmentValueNode get error index
URL: 
https://github.com/apache/incubator-shardingsphere/pull/3284#issuecomment-542581832
 
 
   > > 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
   >     ;
   > ```
   
   Maybe not enough ,because they may have calculate expression like 
`values(xx) + values(yy)`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to