momomobinx opened a new issue #5818:
URL: https://github.com/apache/dolphinscheduler/issues/5818


   **For better global communication, Please describe it in English. If you 
feel the description in English is not clear, then you can append description 
in Chinese(just for Mandarin(CN)), thx! **
   **Describe the bug**
   A clear and concise description of what the bug is.
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1. Create a SQL node With postgres sql
   2. `DO
   $do$
   BEGIN
   IF 
   (
   TRUE
   ) --如果前五分钟没有数据 表示断线了 则执行当天的全量查询 否则执行 五分钟增量 
   
   THEN 
   --当天全量查询
        
   WITH 
   time_range AS (
   SELECT
   TO_TIMESTAMP('${time_point}','YYYYMMddHH24miss') end_time,
   TO_DATE('${time_point}','YYYYMMdd000000')  begin_time
   )
   INSERT INTO test SELECT 'total_check_report_static_all', 
time_range.end_time, time_range.end_time FROM time_range;
                
                                
   --当天全量查询 END
   ELSE
   --当天增量查询
   INSERT INTO test SELECT 'total_check_report_static_incr', CURRENT_TIMESTAMP, 
CURRENT_DATE FROM time_range;
                                
   --当天增量查询 END
                 
   END IF;
   END
   $do$
   `
   3. run
   4. See error
   `[ERROR] 2021-07-15 09:13:49.355  - [taskAppId=TASK-33-5996-50366]:[243] - 
execute sql error
   org.postgresql.util.PSQLException: The column index is out of range: 1, 
number of columns: 0.
        at 
org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:65)
        at 
org.postgresql.core.v3.SimpleParameterList.setStringParameter(SimpleParameterList.java:128)
        at 
org.postgresql.jdbc.PgPreparedStatement.bindString(PgPreparedStatement.java:1029)
        at 
org.postgresql.jdbc.PgPreparedStatement.setString(PgPreparedStatement.java:369)
        at 
org.postgresql.jdbc.PgPreparedStatement.setString(PgPreparedStatement.java:353)
        at 
org.apache.dolphinscheduler.common.utils.ParameterUtils.setInParameter(ParameterUtils.java:130)
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.prepareStatementAndBind(SqlTask.java:411)
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:227)
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:139)
        at 
org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:133)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)`
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   
   **Which version of Dolphin Scheduler:**
    -docker.io/apache/dolphinscheduler   latest
   
   **Additional context**
   Add any other context about the problem here.
   
   **Requirement or improvement**
   - Please describe about your requirements or improvement suggestions.
   


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


Reply via email to