MaPpengCheng opened a new issue, #13914: URL: https://github.com/apache/dolphinscheduler/issues/13914
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened 我使用的是3.1.4版本,在创建sql任务的时候,想要获取表里面最大日期,但是获取的日期会少一天: Success set taskVarPool: [{"prop":"etl_date","direct":"OUT","type":"VARCHAR","value":"2023-04-11"}] [INFO] 2023-04-12 03:45:37.132 +0000 - Full sql parameters: SqlParameters{type='MYSQL', datasource=9, sql='select max(etl_date) etl_date from ods.ods_population_sys_person_info', sqlType=0, sendEmail=null, displayRows=10, limit=0, segmentSeparator=, udfs='null', showType='null', connParams='null', groupId='0', title='null', preStatements=[], postStatements=[]} [INFO] 2023-04-12 03:45:37.132 +0000 - sql type : MYSQL, datasource : 9, sql : select max(etl_date) etl_date from ods.ods_population_sys_person_info , localParams : [Property{prop='etl_date', direct=OUT, type=VARCHAR, value=''}],udfs : null,showType : null,connParams : null,varPool : [Property{prop='etl_date', direct=OUT, type=VARCHAR, value='2023-04-11'}] ,query max result limit 0 [INFO] 2023-04-12 03:45:37.132 +0000 - after replace sql , preparing : select max(etl_date) etl_date from ods.ods_population_sys_person_info [INFO] 2023-04-12 03:45:37.133 +0000 - Sql Params are replaced sql , parameters: [INFO] 2023-04-12 03:45:37.133 +0000 - can't find udf function resource [INFO] 2023-04-12 03:45:37.135 +0000 - prepare statement replace sql : select max(etl_date) etl_date from ods.ods_population_sys_person_info, sql parameters : {} [INFO] 2023-04-12 03:45:37.193 +0000 - display sql result 1 rows as follows: [INFO] 2023-04-12 03:45:37.193 +0000 - row 1 : {"etl_date":"2023-04-10"} [INFO] 2023-04-12 03:45:37.195 +0000 - Send task execute result to master, the current task status: TaskExecutionStatus{code=7, desc='success'} 在数据库中查询为:  ### What you expected to happen 请看日志里面打印的时间为2023-04-10 但是实际数据库中的时间应该为2023-04-11 ### How to reproduce 在sql任务中查询最大时间即可测试出来 ### Anything else _No response_ ### Version 3.1.x ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
