ysrotciv opened a new issue #5322:
URL: https://github.com/apache/dolphinscheduler/issues/5322


   **For better global communication, Please describe it in English. If you 
feel the description in English is not clear, then you can append the 
description in Chinese(just for Mandarin(CN)), thx! **
   **Describe the bug**
   DATASORUCE: clickhouse
   My process only has one SQL like:
   `INSERT INTO test
   SELECT dt, count(1) as c
     FROM dau
    GROUP BY dt
    ORDER BY dt`
   The process failed but the data has been successfully inserted into the 
table.
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1.  Create a new process with only one SQL
   `INSERT INTO test
   SELECT dt, count(1) as c
     FROM dau
    GROUP BY dt
    ORDER BY dt`
   2. Save and run it.
   3. See error below
   [INFO] 2021-04-19 17:49:57.364  - [taskAppId=TASK-2-9-10]:[115] - create dir 
success /tmp/dolphinscheduler/exec/process/1/2/9/10
   [INFO] 2021-04-19 17:49:57.367  - [taskAppId=TASK-2-9-10]:[88] - sql task 
params 
{"postStatements":[],"connParams":"","receiversCc":"","udfs":"","type":"CLICKHOUSE","title":"test","sql":"INSERT
 INTO test\nSELECT dt, count(1) as c\n  FROM dau\n GROUP BY dt\n ORDER BY 
dt\n","preStatements":[],"sqlType":"0","receivers":"[email protected]","datasource":1,"showType":"TABLE","localParams":[]}
   [INFO] 2021-04-19 17:49:57.369  - [taskAppId=TASK-2-9-10]:[104] - Full sql 
parameters: SqlParameters{type='CLICKHOUSE', datasource=1, sql='INSERT INTO test
   SELECT dt, count(1) as c
     FROM dau
    GROUP BY dt
    ORDER BY dt
   ', sqlType=0, udfs='', showType='TABLE', connParams='', title='test', 
receivers='[email protected]', receiversCc='', preStatements=[], postStatements=[]}
   [INFO] 2021-04-19 17:49:57.369  - [taskAppId=TASK-2-9-10]:[105] - sql type : 
CLICKHOUSE, datasource : 1, sql : INSERT INTO test
   SELECT dt, count(1) as c
     FROM dau
    GROUP BY dt
    ORDER BY dt
    , localParams : [],udfs : ,showType : TABLE,connParams : 
   [INFO] 2021-04-19 17:49:57.369  - [taskAppId=TASK-2-9-10]:[176] - SQL title 
: test
   [INFO] 2021-04-19 17:49:57.370  - [taskAppId=TASK-2-9-10]:[498] - after 
replace sql , preparing : INSERT INTO test
   SELECT dt, count(1) as c
     FROM dau
    GROUP BY dt
    ORDER BY dt
   
   [INFO] 2021-04-19 17:49:57.370  - [taskAppId=TASK-2-9-10]:[503] - Sql Params 
are replaced sql , parameters:
   [INFO] 2021-04-19 17:49:57.370  - [taskAppId=TASK-2-9-10]:[52] - can't find 
udf function resource
   [INFO] 2021-04-19 17:49:57.381  - [taskAppId=TASK-2-9-10]:[414] - prepare 
statement replace sql : 
ru.yandex.clickhouse.ClickHousePreparedStatementImpl@65fc3a50 
   [ERROR] 2021-04-19 17:49:57.388  - [taskAppId=TASK-2-9-10]:[243] - execute 
sql error
   java.lang.NullPointerException: null
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.resultProcess(SqlTask.java:258)
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:233)
        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)
   [ERROR] 2021-04-19 17:49:57.388  - [taskAppId=TASK-2-9-10]:[145] - sql task 
error
   java.lang.RuntimeException: execute sql error
        at 
org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:244)
        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.
   
   Data inserted into the table and process status should be successful.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
![1618827014390](https://user-images.githubusercontent.com/4523603/115220161-d04fd500-a13a-11eb-9a5e-471897e4180a.jpg)
   
![1618827054023](https://user-images.githubusercontent.com/4523603/115220193-d776e300-a13a-11eb-95ce-61b719789c2e.jpg)
   
![1618827080868](https://user-images.githubusercontent.com/4523603/115220240-e2ca0e80-a13a-11eb-9b79-547627751944.jpg)
   
   
   **Which version of Dolphin Scheduler:**
    -1.3.5
   
   **Additional context**
   Add any other context about the problem here.
   No matter deployed by docker or k8s, both met this problem.
   
   **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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to