zhongjiajie commented on code in PR #14528:
URL: 
https://github.com/apache/dolphinscheduler/pull/14528#discussion_r1262016665


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml:
##########
@@ -368,11 +358,11 @@
 
     <select id="queryByTriggerCode" 
resultType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
         select
-        <include refid="baseSqlV2">
-            <property name="alias" value="b"/>
-        </include>
-        from t_ds_trigger_relation a
-        join   t_ds_process_instance b on a.job_id  = b.id
-        where a.trigger_type = 0 and a.trigger_code = #{triggerCode}
+        <include refid="baseSql"/>
+        from t_ds_process_instance a
+        join
+            (select trigger_type, job_id, trigger_code from 
t_ds_trigger_relation) b

Review Comment:
   so can we add some comments for this line? to avoid some doing some wrong 
optimize here



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