You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/12 02:22:35 UTC
[GitHub] [dolphinscheduler] lenboo commented on a diff in pull request #10873: [fix] delete workflow or task used by other tasks
lenboo commented on code in PR #10873:
URL: https://github.com/apache/dolphinscheduler/pull/10873#discussion_r918490326
##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/WorkFlowLineageMapper.xml:
##########
@@ -161,4 +161,58 @@
</if>
AND a.task_type = 'DEPENDENT'
</select>
+
+ <select id="queryTaskDepOnProcess" resultType="org.apache.dolphinscheduler.dao.entity.TaskMainInfo">
+ select td.id
+ , td.name as taskName
+ , td.code as taskCode
+ , td.version as taskVersion
+ , td.task_type as taskType
+ , ptr.process_definition_code as processDefinitionCode
+ , pd.name as processDefinitionName
+ , pd.version as processDefinitionVersion
+ , pd.release_state as processReleaseState
+ from t_ds_task_definition td
+ join t_ds_process_task_relation ptr on ptr.post_task_code = td.code and td.version = ptr.post_task_version
+ join t_ds_process_definition pd on pd.code = ptr.process_definition_code and pd.version = ptr.process_definition_version
+ <where>
+ <if test="projectCode != 0">
+ and ptr.project_code = #{projectCode}
+ </if>
+ <if test="processDefinitionCode != 0">
+ and ptr.process_definition_code != #{processDefinitionCode}
+ and (
+ td.task_params like concat('%"definitionCode":', #{processDefinitionCode}, '%')
Review Comment:
It's too complex in the mapper, can we handle it in the program?
--
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-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org