Hisoka-X commented on code in PR #9380: URL: https://github.com/apache/seatunnel/pull/9380#discussion_r2166697194
########## seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSourceTableConfig.java: ########## @@ -63,6 +63,13 @@ public class JdbcSourceTableConfig implements Serializable { @JsonProperty("skip_analyze") private Boolean skipAnalyze; + @JsonProperty("use_regex") + private Boolean useRegex; + + public Boolean getUseRegex() { + return useRegex != null ? useRegex : false; + } Review Comment: ```suggestion ``` ########## seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java: ########## @@ -83,24 +85,36 @@ public static Map<TablePath, JdbcSourceTable> getTables( Map<String, Map<String, String>> unsupportedTable = new LinkedHashMap<>(); for (JdbcSourceTableConfig tableConfig : tablesConfig) { try { - CatalogTable catalogTable = - getCatalogTable(tableConfig, jdbcCatalog, jdbcDialect); - TablePath tablePath = catalogTable.getTableId().toTablePath(); - JdbcSourceTable jdbcSourceTable = - JdbcSourceTable.builder() - .tablePath(tablePath) - .query(tableConfig.getQuery()) - .partitionColumn(tableConfig.getPartitionColumn()) - .partitionNumber(tableConfig.getPartitionNumber()) - .partitionStart(tableConfig.getPartitionStart()) - .partitionEnd(tableConfig.getPartitionEnd()) - .useSelectCount(tableConfig.getUseSelectCount()) - .skipAnalyze(tableConfig.getSkipAnalyze()) - .catalogTable(catalogTable) - .build(); - tables.put(tablePath, jdbcSourceTable); - if (log.isDebugEnabled()) { - log.debug("Loaded catalog table : {}, {}", tablePath, jdbcSourceTable); + boolean isRegexPath = tableConfig.getUseRegex(); + + if (StringUtils.isNotEmpty(tableConfig.getTablePath()) + && StringUtils.isEmpty(tableConfig.getQuery()) + && isRegexPath) { Review Comment: ```suggestion if (StringUtils.isNotEmpty(tableConfig.getTablePath()) && StringUtils.isEmpty(tableConfig.getQuery()) && tableConfig.getUseRegex()) { ``` -- 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-unsubscr...@seatunnel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org