hiSandog opened a new issue, #18302: URL: https://github.com/apache/dolphinscheduler/issues/18302
### 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 `ClasspathSqlScriptParser` skips the initial block license header before parsing SQL resources. The closing marker check currently uses the raw line, so a standard indented closing marker such as ` */` is not recognized. When a SQL resource starts with an indented block license header closing marker, the parser can remain in license-header skipping mode and skip the SQL statements that follow the header. ### What you expected to happen `ClasspathSqlScriptParser` should recognize an indented block comment closing marker while skipping the leading license header, then continue parsing the SQL statements after the header. ### How to reproduce Add a SQL resource with a leading block license header whose closing marker is indented, followed by a SQL statement: ```sql /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. */ select 1; ``` Parse it with `ClasspathSqlScriptParser`. The SQL statement after the license header should be returned, but the current implementation can skip it because the indented ` */` line is not treated as the end of the header. ### Anything else The relevant code path is `dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/sql/ClasspathSqlScriptParser.java`. ### 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]
