hermeshephaestus commented on a change in pull request #3940:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/3940#discussion_r531533488
##########
File path:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/WorkFlowLineageMapper.xml
##########
@@ -24,23 +24,24 @@
left join t_ds_schedules tes on tepd.id = tes.process_definition_id
where tepd.project_id = #{projectId}
<if test="searchVal != null and searchVal != ''">
- and tepd.name like concat('%', #{searchVal}, '%')
+ and tepd.name like concat('%', #{searchVal}, '%')
</if>
</select>
<select id="queryByIds"
resultType="org.apache.dolphinscheduler.dao.entity.WorkFlowLineage"
databaseId="mysql">
select tepd.id as work_flow_id,tepd.name as work_flow_name,
- (case when json_extract(tepd.process_definition_json,
'$**.dependItemList') is not null then 1 else 0 end) as is_depend_work_flow,
- json_extract(tepd.process_definition_json,
'$**.definitionId') as source_work_flow_id,
- tepd.release_state as work_flow_publish_status,
- tes.start_time as schedule_start_time,
- tes.end_time as schedule_end_time,
- tes.crontab as crontab,
- tes.release_state as schedule_publish_status
+ (case when json_extract(tepd.process_definition_json,
'$**.dependItemList') is not null then 1 else 0 end) as
+ is_depend_work_flow,
+ json_extract(tepd.process_definition_json, '$**.definitionId') as
source_work_flow_id,
+ tepd.release_state as work_flow_publish_status,
+ tes.start_time as schedule_start_time,
+ tes.end_time as schedule_end_time,
+ tes.crontab as crontab,
+ tes.release_state as schedule_publish_status
Review comment:
just remain this!
##########
File path:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/WorkFlowLineageMapper.xml
##########
@@ -49,39 +50,42 @@
<select id="queryByIds"
resultType="org.apache.dolphinscheduler.dao.entity.WorkFlowLineage"
databaseId="pg">
select a.work_flow_id,
- a.work_flow_name,
- a.is_depend_work_flow,
- array_agg(a.source_id) as source_id,
- a.work_flow_publish_status,
- a.schedule_start_time,
- a.schedule_end_time,
- a.crontab,
- a.schedule_publish_status
- from (
- select tepd.id as work_flow_id,tepd.name as work_flow_name,
- case when
tepd.process_definition_json::json#>'{tasks,1,dependence}' is not null then 1
else 0 end as is_depend_work_flow,
-
(json_array_elements(tepd.process_definition_json::json#>'{tasks}')#>>'{dependence,dependTaskList,0,dependItemList,0,definitionId}')
as source_id,
- tepd.release_state as work_flow_publish_status,
- tes.start_time as schedule_start_time,
- tes.end_time as schedule_end_time,
- tes.crontab as crontab,
- tes.release_state as schedule_publish_status
- from t_ds_process_definition tepd
- left join t_ds_schedules tes on tepd.id =
tes.process_definition_id
- where tepd.project_id = #{projectId}
- <if test="ids != null and ids.size()>0">
- and tepd.id in
- <foreach collection="ids" index="index" item="i" open="("
separator="," close=")">
- #{i}
- </foreach>
- </if>
- ) a
+ a.work_flow_name,
+ a.is_depend_work_flow,
+ array_agg(a.source_id) as source_id,
+ a.work_flow_publish_status,
+ a.schedule_start_time,
+ a.schedule_end_time,
+ a.crontab,
+ a.schedule_publish_status
+ from (
+ select tepd.id as work_flow_id,tepd.name as work_flow_name,
+ case when tepd.process_definition_json::json#>'{tasks,1,dependence}'
is not null then 1 else 0 end as
+ is_depend_work_flow,
+
(json_array_elements(tepd.process_definition_json::json#>'{tasks}')#>>'{dependence,dependTaskList,0,dependItemList,0,definitionId}')
+ as source_id,
+ tepd.release_state as work_flow_publish_status,
+ tes.start_time as schedule_start_time,
+ tes.end_time as schedule_end_time,
+ tes.crontab as crontab,
+ tes.release_state as schedule_publish_status
+ from t_ds_process_definition tepd
+ left join t_ds_schedules tes on tepd.id = tes.process_definition_id
+ where tepd.project_id = #{projectId}
+ <if test="ids != null and ids.size()>0">
+ and tepd.id in
+ <foreach collection="ids" index="index" item="i" open="("
separator="," close=")">
+ #{i}
+ </foreach>
+ </if>
+ ) a
Review comment:
just remain this!
##########
File path:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/WorkFlowLineageMapper.xml
##########
@@ -49,39 +50,42 @@
<select id="queryByIds"
resultType="org.apache.dolphinscheduler.dao.entity.WorkFlowLineage"
databaseId="pg">
select a.work_flow_id,
- a.work_flow_name,
- a.is_depend_work_flow,
- array_agg(a.source_id) as source_id,
- a.work_flow_publish_status,
- a.schedule_start_time,
- a.schedule_end_time,
- a.crontab,
- a.schedule_publish_status
- from (
- select tepd.id as work_flow_id,tepd.name as work_flow_name,
- case when
tepd.process_definition_json::json#>'{tasks,1,dependence}' is not null then 1
else 0 end as is_depend_work_flow,
-
(json_array_elements(tepd.process_definition_json::json#>'{tasks}')#>>'{dependence,dependTaskList,0,dependItemList,0,definitionId}')
as source_id,
- tepd.release_state as work_flow_publish_status,
- tes.start_time as schedule_start_time,
- tes.end_time as schedule_end_time,
- tes.crontab as crontab,
- tes.release_state as schedule_publish_status
- from t_ds_process_definition tepd
- left join t_ds_schedules tes on tepd.id =
tes.process_definition_id
- where tepd.project_id = #{projectId}
- <if test="ids != null and ids.size()>0">
- and tepd.id in
- <foreach collection="ids" index="index" item="i" open="("
separator="," close=")">
- #{i}
- </foreach>
- </if>
- ) a
+ a.work_flow_name,
+ a.is_depend_work_flow,
+ array_agg(a.source_id) as source_id,
+ a.work_flow_publish_status,
+ a.schedule_start_time,
+ a.schedule_end_time,
+ a.crontab,
+ a.schedule_publish_status
+ from (
+ select tepd.id as work_flow_id,tepd.name as work_flow_name,
+ case when tepd.process_definition_json::json#>'{tasks,1,dependence}'
is not null then 1 else 0 end as
+ is_depend_work_flow,
+
(json_array_elements(tepd.process_definition_json::json#>'{tasks}')#>>'{dependence,dependTaskList,0,dependItemList,0,definitionId}')
+ as source_id,
+ tepd.release_state as work_flow_publish_status,
+ tes.start_time as schedule_start_time,
+ tes.end_time as schedule_end_time,
+ tes.crontab as crontab,
+ tes.release_state as schedule_publish_status
+ from t_ds_process_definition tepd
+ left join t_ds_schedules tes on tepd.id = tes.process_definition_id
+ where tepd.project_id = #{projectId}
+ <if test="ids != null and ids.size()>0">
+ and tepd.id in
+ <foreach collection="ids" index="index" item="i" open="("
separator="," close=")">
+ #{i}
+ </foreach>
+ </if>
+ ) a
where (a.is_depend_work_flow = 1 and source_id is not null) or
(a.is_depend_work_flow = 0)
group by
a.work_flow_id,a.work_flow_name,a.is_depend_work_flow,a.work_flow_publish_status,a.schedule_start_time,
- a.schedule_end_time,a.crontab,a.schedule_publish_status
+ a.schedule_end_time,a.crontab,a.schedule_publish_status
Review comment:
just remain this!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]