njnu-seafish commented on code in PR #18444:
URL: 
https://github.com/apache/dolphinscheduler/pull/18444#discussion_r3801518937


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/workflowInstance/WorkflowInstanceQueryDTO.java:
##########
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.api.dto.workflowInstance;
+
+import org.apache.dolphinscheduler.common.enums.CommandType;
+import org.apache.dolphinscheduler.common.enums.FailureStrategy;
+import org.apache.dolphinscheduler.common.enums.Flag;
+import org.apache.dolphinscheduler.common.enums.Priority;
+import org.apache.dolphinscheduler.common.enums.TaskDependType;
+import org.apache.dolphinscheduler.common.enums.WarningType;
+import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+
+import java.util.Date;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+/**
+ * Lightweight response DTO for workflow instance list / top-N / trigger 
queries.
+ *
+ * <p>Unlike {@link WorkflowInstance}, this DTO intentionally omits heavy 
columns
+ * that are only needed for detail views or internal processing. This allows 
the
+ * corresponding DAO queries to use the optimized {@code listSql} projection
+ * instead of the full {@code baseSql}.
+ *
+ * <p><b>Incompatible API change (documented):</b> The following properties 
that
+ * were previously present in list/topN/trigger API responses are no longer
+ * returned:
+ *
+ * <p><b>Heavy DB-backed fields removed from the SQL projection:</b>
+ * <ul>
+ *   <li>{@code commandParam}</li>
+ *   <li>{@code globalParams}</li>
+ *   <li>{@code historyCmd}</li>
+ *   <li>{@code varPool}</li>
+ *   <li>{@code stateHistory}</li>
+ * </ul>
+ *
+ * <p><b>Transient (non-DB) fields removed from the entity that were always
+ * {@code null} in list responses:</b>
+ * <ul>
+ *   <li>{@code stateDescList}</li>
+ *   <li>{@code workflowDefinition} (deprecated)</li>
+ *   <li>{@code dagData}</li>
+ *   <li>{@code queue}</li>
+ *   <li>{@code locations}</li>
+ *   <li>{@code dependenceScheduleTimes}</li>
+ * </ul>
+ *
+ * <p><b>Derived getter properties removed:</b>
+ * <ul>
+ *   <li>{@code cmdTypeIfComplement} — previously returned
+ *       {@link CommandType#COMPLEMENT_DATA} for complement-data executions;
+ *       consumers should inspect {@code commandType} on the detail endpoint
+ *       instead</li>
+ *   <li>{@code complementData} — previously returned {@code true} for
+ *       complement-data executions; no longer available in list responses</li>
+ * </ul>
+ *
+ * <p>Consumers that require any of these fields should call the detail 
endpoint
+ * {@code GET /projects/{projectCode}/workflow-instances/{id}} instead, which
+ * continues to return the full {@link WorkflowInstance}.
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "WORKFLOW_INSTANCE_QUERY_RESPONSE")
+public class WorkflowInstanceQueryDTO {

Review Comment:
   Rename WorkflowInstanceQueryDTO to WorkflowInstanceSummaryDTO 



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