You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/07/15 01:55:17 UTC
[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5818: [Bug][SQL node] RUN PL/pgSQL WITH parameter ERROR
github-actions[bot] commented on issue #5818:
URL: https://github.com/apache/dolphinscheduler/issues/5818#issuecomment-880327863
**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
) --If there is no data in the first five minutes, it means that the line is disconnected, then the full query of the day will be executed, otherwise the five-minute increment will be executed
THEN
--Full query on the same day
To
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;
To
To
--Full enquiry on the day END
ELSE
--Incremental query of the day
INSERT INTO test SELECT'total_check_report_static_incr', CURRENT_TIMESTAMP, CURRENT_DATE FROM time_range;
To
--Incremental query of the day END
To
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org