x1ng-z commented on issue #37797:
URL: 
https://github.com/apache/shardingsphere/issues/37797#issuecomment-3782562139

   Let me explain(DMLStatement.g4):
   
   (fromClause withTempTable? withTableHint?)?
   
   1. `fromClause` matches a block starting from `from` followed by `join`, 
`on`, etc.
   
   That is, it matches the block `FROM xx with(nolock)`, `LEFT JOIN xx 
WITH(nolock) on xx.xx=xx.xx`.
   
   2. `withTempTable` is skipped for now,it doesn't matter.
   
   3. `withTableHint` matches `WITH(nolock)`. Regarding the matching rules 
mentioned above, let's explain why it throws an error:
   
   It first matches the outer block `fromClause withTempTable?`, which matches 
`FROM xx`. `withTableHint` matches `with(nolock)`. The subsequent `join` should 
obviously be placed as a block within `fromClause`, but it's matched separately 
outside, causing an error
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to