ruanwenjun commented on PR #15376:
URL:
https://github.com/apache/dolphinscheduler/pull/15376#issuecomment-1876450858
`SqlSplitUtils` has been removed, split sql is a complex work, we will use
`Driud` to split sql.
```
@Test
void splitAndRemoveComment() {
List<String> sqls =
hiveDatasourceProcessor.splitAndRemoveComment("select * from test1;\nselect *
from test2;");
Assertions.assertEquals(2, sqls.size());
Assertions.assertEquals("select * from test1", sqls.get(0));
Assertions.assertEquals("select * from test2", sqls.get(1));
}
```
If you have multiple sql, you need to use `;`, and Druid will remove `;`, if
you only have one sql, you don't need to use `;`;
--
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]