This is an automated email from the ASF dual-hosted git repository.

xincheng 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 baa252a0ed [DS-16046][fix] Set PreparedStatement parameter type 
(#16050)
baa252a0ed is described below

commit baa252a0edcb68f0bd4e4c64ee377822d890f026
Author: yinxiaolog <[email protected]>
AuthorDate: Fri May 24 13:12:16 2024 +0800

    [DS-16046][fix] Set PreparedStatement parameter type (#16050)
    
    Fix the PreparedStatement parameter is TIME, set it to java.sql.Time
    
    Co-authored-by: Aaron Wang <[email protected]>
    Co-authored-by: Rick Cheng <[email protected]>
---
 .../apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java
index ea334125d5..3347297a46 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java
@@ -145,7 +145,7 @@ public class ParameterUtils {
         } else if (dataType.equals(DataType.DATE)) {
             stmt.setDate(index, java.sql.Date.valueOf(value));
         } else if (dataType.equals(DataType.TIME)) {
-            stmt.setString(index, value);
+            stmt.setTime(index, java.sql.Time.valueOf(value));
         } else if (dataType.equals(DataType.TIMESTAMP)) {
             stmt.setTimestamp(index, java.sql.Timestamp.valueOf(value));
         } else if (dataType.equals(DataType.BOOLEAN)) {

Reply via email to