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

   ### 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
   
   If a SQL task only has one SQL sentence, then this line will not ended with 
a ";/n" or ";/r/n". Instead it just has a trailing ";".  In this case we need 
to manually remove the trailing ";", or it may cause a syntax error in some 
JDBC implementations (e.g. Hive JDBC). 
   
   ### What you expected to happen
   
   If a SQL task only contains one single line, then we need to manully remove 
the trailing ";"
   
   ### How to reproduce
   
   1. Create a SQL task that has only one line
   
![V3dQIH2aYv](https://github.com/apache/dolphinscheduler/assets/50730962/1473b04c-bf72-4287-8578-5eabd7d90b28)
   
   2. Run this task, then we can see a syntax error in som JDBC implementations 
(below is the HIVE case)
   
![VcwhoU8ZMd](https://github.com/apache/dolphinscheduler/assets/50730962/94985f52-a800-4844-b358-463afad086eb)
   
   
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### 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]

Reply via email to