gavinchou commented on code in PR #33847:
URL: https://github.com/apache/doris/pull/33847#discussion_r1574303955


##########
fe/fe-core/src/main/java/org/apache/doris/alter/CloudRollupJobV2.java:
##########
@@ -41,29 +41,35 @@
 import org.apache.doris.thrift.TTaskType;
 
 import com.google.common.base.Preconditions;
+import com.google.gson.annotations.SerializedName;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
 public class CloudRollupJobV2 extends RollupJobV2 {
     private static final Logger LOG = 
LogManager.getLogger(CloudRollupJobV2.class);
 
-    public static AlterJobV2 buildCloudRollupJobV2(RollupJobV2 job) throws 
IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dos = new DataOutputStream(baos);
-        job.write(dos);
-        ByteArrayInputStream bais = new 
ByteArrayInputStream(baos.toByteArray());
-        DataInputStream dis = new DataInputStream(bais);
-        CloudRollupJobV2 ret = (CloudRollupJobV2) CloudRollupJobV2.read(dis);
-        ret.partitionIdToRollupIndex = job.partitionIdToRollupIndex;
+    public static AlterJobV2 buildCloudRollupJobV2(RollupJobV2 job) throws 
IllegalAccessException {

Review Comment:
   consider  using template in the future.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to