You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "blu3gui7ar (via GitHub)" <gi...@apache.org> on 2023/07/08 00:11:31 UTC

[GitHub] [dolphinscheduler] blu3gui7ar opened a new issue, #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

blu3gui7ar opened a new issue, #14483:
URL: https://github.com/apache/dolphinscheduler/issues/14483

   ### 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
   
   NullPointerException happened when running sql task, with both ? and customer parameter in sql.
   E.g. 
   `select '${mode}', '?'`
   
   `
   [INFO] 2023-07-07 23:51:17.551 +0000 - setSqlParamsMap: Property with paramName: mode put in sqlParamsMap of content select '${mode}', '?'
    successfully.
   [ERROR] 2023-07-07 23:51:17.551 +0000 - sql task error
   java.lang.NullPointerException: null
   [ERROR] 2023-07-07 23:51:17.551 +0000 - Task execute failed, due to meet an exception
   org.apache.dolphinscheduler.plugin.task.api.TaskException: Execute sql task failed
   	at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:168)
   	at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerDelayTaskExecuteRunnable.executeTask(DefaultWorkerDelayTaskExecuteRunnable.java:49)
   `
   
   ### What you expected to happen
   
   No Exception should happen.
   
   ### How to reproduce
   
   Create a SQL Task, use the sql 
   `select '${mode}', '?'`
   
   And run the task.
   
   ### Anything else
   
   My environment is 3.1.4. 
   After code investigate, the suspicious code is here:
   
   https://github.com/apache/dolphinscheduler/blob/a1bf597d0a348f67a3e943217dcf700e484ac9f8/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java#L195
   
   `        String[] split = sql.split("\\?");`
   
   Seems assuming any ? in sql is parameter holder, which is not true.
   
   ### Version
   
   3.1.x
   
   ### Are you willing to submit PR?
   
   - [ ] 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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #14483:
URL: https://github.com/apache/dolphinscheduler/issues/14483#issuecomment-1703547502

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


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


[GitHub] [dolphinscheduler] wangdmj commented on issue #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

Posted by "wangdmj (via GitHub)" <gi...@apache.org>.
wangdmj commented on issue #14483:
URL: https://github.com/apache/dolphinscheduler/issues/14483#issuecomment-1650952201

   same as #13136


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


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #14483:
URL: https://github.com/apache/dolphinscheduler/issues/14483#issuecomment-1694062581

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


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


[GitHub] [dolphinscheduler] github-actions[bot] closed issue #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #14483: [Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?
URL: https://github.com/apache/dolphinscheduler/issues/14483


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