terrymanu commented on issue #25103:
URL: 
https://github.com/apache/shardingsphere/issues/25103#issuecomment-3620614643

   • Issue Conclusion
   
     - We need to add visitCreateForeignTable / visitDropForeignTable in the 
openGauss DDL visitor, returning PostgreSQLCreateForeignTableStatement / 
PostgreSQLDropForeignTableStatement.
   
     Fix & Test Plan (XML SQL Parser IT)
   
     - SQL cases: In 
test/it/parser/src/main/resources/sql/supported/ddl/create-foreign-table.xml, 
add a case with SERVER and mark it for openGauss, e.g.
       <sql-case id="create_foreign_table_simple_opengauss" value="CREATE 
FOREIGN TABLE t_order (user_id int, order_name varchar(30)) SERVER fdw_svr;" 
db-types="PostgreSQL,openGauss" />
       (SERVER is required by the grammar.)
     - Assertion cases: In 
test/it/parser/src/main/resources/case/ddl/create-foreign-table.xml, add the 
placeholder:
       <create-foreign-table 
sql-case-id="create_foreign_table_simple_opengauss" />
       No extra fields needed—this just checks the parse succeeds.
     - Drop coverage: In 
test/it/parser/src/main/resources/sql/supported/ddl/drop-foreign-table.xml, 
extend the existing cases’ db-types to PostgreSQL,openGauss; no change needed 
in case/ddl/drop-foreign-table.xml because IDs already exist.
     - Verification command (recommended Parser IT scope):
       ./mvnw -pl test/it/parser -DskipITs=false 
-Dtest=org.apache.shardingsphere.test.it.sql.parser.opengauss.InternalOpenGaussParserIT
 test
   
     Open Invitation
   
     - Community contributors are warmly invited to submit a PR: add the 
visitor methods above, extend the XML cases for openGauss, and include the 
InternalOpenGaussParserIT run result in the PR. If you need examples or 
collaboration, please comment in the issue.


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