HxpSerein commented on code in PR #13217:
URL: https://github.com/apache/iotdb/pull/13217#discussion_r1722608169
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionExecutionResult.java:
##########
@@ -30,6 +30,17 @@ public class RegionExecutionResult {
private TSStatus status;
private boolean needRetry;
+ private RegionExecutionResult(boolean accepted, String message, TSStatus
status) {
+ this.accepted = accepted;
+ this.message = message;
+ this.status = status;
+ this.needRetry = false;
+ }
+
+ public static RegionExecutionResult create(boolean accepted, String message,
TSStatus status) {
+ return new RegionExecutionResult(accepted, message, status);
+ }
Review Comment:
`RegionExecutionResult.create` provides a layer of abstraction for object
creation, encapsulating the details of object construction. Directly calling
`new RegionExecutionResult` is a straightforward way to create objects,
suitable for simpler scenarios. It makes the code more intuitive but offers
less flexibility.
--
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]