SbloodyS commented on code in PR #14190:
URL:
https://github.com/apache/dolphinscheduler/pull/14190#discussion_r1267590560
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -227,8 +230,17 @@ public void executeFuncAndSql(List<SqlBinds>
mainStatementsBinds,
try {
// create connection
- connection =
DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()),
- baseConnectionParam);
+ if (DbType.valueOf(sqlParameters.getType()) == KYUUBI) {
+ log.info("full jdbc url : {}, user : {} begin to build a
connection",
+ DataSourceUtils.getJdbcUrl(DbType.KYUUBI,
baseConnectionParam), baseConnectionParam.getUser());
+ Class.forName(baseConnectionParam.getDriverClassName());
+ connection =
DriverManager.getConnection(baseConnectionParam.getJdbcUrl(),
+ baseConnectionParam.getUser(),
baseConnectionParam.getPassword());
+ } else {
+ connection =
+
DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()),
+ baseConnectionParam);
+ }
Review Comment:
I'm not sure if this is a good approach. If there are new data sources or
task types in the future that need to share the same implementation.
--
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]