This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new b1068e27ba Optimize date range condition (#11911)
b1068e27ba is described below
commit b1068e27bae3634c2df459fd3dc9a10315cddf4a
Author: juzimao <[email protected]>
AuthorDate: Wed Sep 14 16:55:10 2022 +0800
Optimize date range condition (#11911)
---
.../apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
index 0972fb7977..87e71a85f2 100644
---
a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
+++
b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
@@ -122,8 +122,11 @@
<if test="searchVal != null and searchVal != ''">
and instance.name like concat('%', #{searchVal}, '%')
</if>
- <if test="startTime != null and endTime != null ">
- and instance.start_time <![CDATA[ >= ]]> #{startTime} and
instance.start_time <![CDATA[ <= ]]> #{endTime}
+ <if test="startTime != null">
+ and instance.start_time <![CDATA[ >= ]]> #{startTime}
+ </if>
+ <if test="endTime != null">
+ and instance.start_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="states != null and states.length > 0">
and instance.state in