This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 39748ddc4b5 Refactor constructor of 
AlterReadwriteSplittingStorageUnitStatusStatement to empty buildAttributes 
(#38280)
39748ddc4b5 is described below

commit 39748ddc4b5d528ffc1e25fd979a7f77bf7f8e43
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Mar 1 13:48:14 2026 +0800

    Refactor constructor of AlterReadwriteSplittingStorageUnitStatusStatement 
to empty buildAttributes (#38280)
---
 .../AlterReadwriteSplittingStorageUnitStatusStatement.java  | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git 
a/features/readwrite-splitting/distsql/statement/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/statement/AlterReadwriteSplittingStorageUnitStatusStatement.java
 
b/features/readwrite-splitting/distsql/statement/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/statement/AlterReadwriteSplittingStorageUnitStatusStatement.java
index 216990cf348..6bd45754839 100644
--- 
a/features/readwrite-splitting/distsql/statement/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/statement/AlterReadwriteSplittingStorageUnitStatusStatement.java
+++ 
b/features/readwrite-splitting/distsql/statement/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/statement/AlterReadwriteSplittingStorageUnitStatusStatement.java
@@ -18,7 +18,6 @@
 package org.apache.shardingsphere.readwritesplitting.distsql.statement;
 
 import lombok.Getter;
-import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.distsql.statement.type.ral.updatable.UpdatableRALStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.FromDatabaseSegment;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttributes;
@@ -27,7 +26,6 @@ import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.t
 /**
  * Set readwrite-splitting status statement.
  */
-@RequiredArgsConstructor
 @Getter
 public final class AlterReadwriteSplittingStorageUnitStatusStatement extends 
UpdatableRALStatement {
     
@@ -39,10 +37,17 @@ public final class 
AlterReadwriteSplittingStorageUnitStatusStatement extends Upd
     
     private final boolean enable;
     
-    private SQLStatementAttributes attributes;
+    private final SQLStatementAttributes attributes;
+    
+    public AlterReadwriteSplittingStorageUnitStatusStatement(final 
FromDatabaseSegment fromDatabase, final String ruleName, final String 
storageUnitName, final boolean enable) {
+        this.fromDatabase = fromDatabase;
+        this.ruleName = ruleName;
+        this.storageUnitName = storageUnitName;
+        this.enable = enable;
+        attributes = new SQLStatementAttributes(new 
FromDatabaseSQLStatementAttribute(fromDatabase));
+    }
     
     @Override
     public void buildAttributes() {
-        attributes = new SQLStatementAttributes(new 
FromDatabaseSQLStatementAttribute(fromDatabase));
     }
 }

Reply via email to