FlyingZC commented on code in PR #19746:
URL: https://github.com/apache/shardingsphere/pull/19746#discussion_r937391778


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ReactiveProxySQLExecutor.java:
##########
@@ -79,13 +80,24 @@ public void checkExecutePrerequisites(final 
ExecutionContext executionContext) {
     
     private boolean isExecuteDDLInXATransaction(final SQLStatement 
sqlStatement) {
         TransactionStatus transactionStatus = 
backendConnection.getConnectionSession().getTransactionStatus();
-        return TransactionType.XA == transactionStatus.getTransactionType() && 
sqlStatement instanceof DDLStatement && transactionStatus.isInTransaction();
+        return TransactionType.XA == transactionStatus.getTransactionType() && 
isUnsupportedDDLStatement(sqlStatement) && transactionStatus.isInTransaction();
     }
-    
+
     private boolean isExecuteDDLInPostgreSQLOpenGaussTransaction(final 
SQLStatement sqlStatement) {
         // TODO implement DDL statement commit/rollback in 
PostgreSQL/openGauss transaction
         boolean isPostgreSQLOpenGaussStatement = sqlStatement instanceof 
PostgreSQLStatement || sqlStatement instanceof OpenGaussStatement;

Review Comment:
   Your are right,there is repeated judgment logic here.



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