strongduanmu commented on issue #27640:
URL: 
https://github.com/apache/shardingsphere/issues/27640#issuecomment-1679908263

   > @strongduanmu I was trying to add support for `DROP USER joe CASCADE;`
   > 
   > I made changes in respective `drop-user.xml` before:
   > 
   > ```
   > <sql-case id="drop_user_cascade" value="DROP USER user_dev CASCADE" 
db-types="Oracle" />
   > ```
   > 
   > after:
   > 
   > ```
   > <sql-case id="drop_user_cascade" value="DROP USER user_dev CASCADE" 
db-types="Oracle,openGauss" />
   > ```
   > 
   > Also, checked openGauss docs and confirmed that syntax is correct.
   > 
   > But I am getting following error when I try to run tests:
   > 
   > ```
   > assertSupportedSQL{String, SQLCaseType, String}[352]  Time elapsed: 0.01 s 
 <<< ERROR!
   > org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You 
have an error in your SQL syntax: DROP USER user_dev CASCADE, no viable 
alternative at in
   > put 'user_devCASCADE' at line 1, position 19, near 
[@3,19:25='CASCADE',<246>,1:19]
   > ```
   > 
   > Could you guide me what am I missing out or what should I look for?
   
   You should modify dropUser antlr sytax in 
`parser/sql/dialect/opengauss/src/main/antlr4/imports/opengauss/DCLStatement.g4:58`.


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