This is an automated email from the ASF dual-hosted git repository.
fanjia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/seatunnel-web.git
The following commit(s) were added to refs/heads/main by this push:
new d11f6c5b [Bug] [Seatunnel-web] No configuration setting found for key
'where_c…ondition' (#240)
d11f6c5b is described below
commit d11f6c5b8c39bbbbcd74c96f5b2d3609cde93af7
Author: Mohammad Arshad <[email protected]>
AuthorDate: Mon Nov 11 08:13:30 2024 +0530
[Bug] [Seatunnel-web] No configuration setting found for key
'where_c…ondition' (#240)
---
.../datasource/impl/BaseJdbcDataSourceConfigSwitcher.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/datasource/impl/BaseJdbcDataSourceConfigSwitcher.java
b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/datasource/impl/BaseJdbcDataSourceConfigSwitcher.java
index 9c2a2105..f5136b87 100644
---
a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/datasource/impl/BaseJdbcDataSourceConfigSwitcher.java
+++
b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/datasource/impl/BaseJdbcDataSourceConfigSwitcher.java
@@ -139,12 +139,12 @@ public abstract class BaseJdbcDataSourceConfigSwitcher
extends AbstractDataSourc
List<String> tableFields = selectTableFields.getTableFields();
String sql = tableFieldsToSql(tableFields, databaseName,
tableName);
-
- String where_condition =
connectorConfig.getString(WHERE_CONDITION);
-
- if (where_condition != null && !where_condition.isEmpty()) {
- sql = sql + " " + where_condition;
- connectorConfig =
connectorConfig.withoutPath(WHERE_CONDITION);
+ if (connectorConfig.hasPath(WHERE_CONDITION)) {
+ String where_condition =
connectorConfig.getString(WHERE_CONDITION);
+ if (where_condition != null && !where_condition.isEmpty())
{
+ sql = sql + " " + where_condition;
+ connectorConfig =
connectorConfig.withoutPath(WHERE_CONDITION);
+ }
}
connectorConfig =