You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "iamcaoxudong (via GitHub)" <gi...@apache.org> on 2023/12/28 06:59:46 UTC

[I] [Bug] [SQL Task]Remove trailing semicolons from a SQL sentence. [dolphinscheduler]

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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

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


Re: [I] [Bug] [SQL Task]Remove trailing semicolons from a SQL sentence. [dolphinscheduler]

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

   If you only have one sql, you should remove the `;` here.


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


Re: [I] [Bug] [SQL Task]Remove trailing semicolons from a SQL sentence. [dolphinscheduler]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun closed issue #15374: [Bug] [SQL Task]Remove trailing semicolons from a SQL sentence.
URL: https://github.com/apache/dolphinscheduler/issues/15374


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