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/09/16 03:45:18 UTC

[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #11963: [Improvement] and task instance date range search

SbloodyS commented on code in PR #11963:
URL: https://github.com/apache/dolphinscheduler/pull/11963#discussion_r972587029


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml:
##########
@@ -184,7 +184,10 @@
         left join t_ds_process_instance process on process.id=instance.process_instance_id
         where define.project_code = #{projectCode}
         <if test="startTime != null">
-            and instance.start_time > #{startTime} and instance.start_time <![CDATA[ <=]]> #{endTime}
+            and instance.start_time <![CDATA[ >=]]> #{startTime}
+        </if>
+        <if test="endTime != null">
+            and instance.start_time <![CDATA[ <=]]> #{endTime}

Review Comment:
   It's better to add index for these columns.



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