nauu commented on issue #1379: [BUG] SQL task,date parameter need to add 
explicit type casts
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/1379#issuecomment-564349720
 
 
   Now all datatype use same method ` stmt.setString(index,value);` even DATE 
and TIMESTAMP.
   
   So i had improved it #1439 . 
   If datatype is DATE  then use `stmt.setDate(index, 
java.sql.Date.valueOf(value));` , 
   if datatype is TIMESTAMP  then use `stmt.setTimestamp(index, 
java.sql.Timestamp.valueOf(value));`.
   
   When use DATE , datatype must use Date and the param format must use 
`$[yyyy-MM-dd]` , 
   When use TIMESTAMP , datatype must use TIMESTAMP and the param format must 
use `$[yyyy-MM-dd hh:mm:ss]`.

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


With regards,
Apache Git Services

Reply via email to