Skip to content

Commit

Permalink
[fix](jdbc catalog) fix jdbc table checksum and query jdbc tvf (#34780)
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-kkk committed May 13, 2024
1 parent 20a6f2a commit 40a1041
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ public void configureJdbcTable(JdbcTable jdbcTable, String tableName) {
jdbcTable.setJdbcPasswd(this.getJdbcPasswd());
jdbcTable.setDriverClass(this.getDriverClass());
jdbcTable.setDriverUrl(this.getDriverUrl());
jdbcTable.setCheckSum(this.getCheckSum());
jdbcTable.setResourceName(this.getResource());
jdbcTable.setConnectionPoolMinSize(this.getConnectionPoolMinSize());
jdbcTable.setConnectionPoolMaxSize(this.getConnectionPoolMaxSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ public abstract class QueryTableValueFunction extends TableValuedFunctionIf {
protected final String query;

public QueryTableValueFunction(Map<String, String> params) throws AnalysisException {
if (params.size() != 2) {
throw new AnalysisException("Query TableValueFunction must have 2 arguments: 'catalog' and 'query'");
}
if (!params.containsKey(CATALOG) || !params.containsKey(QUERY)) {
throw new AnalysisException("Query TableValueFunction must have 2 arguments: 'catalog' and 'query'");
}
String catalogName = params.get(CATALOG);
this.query = params.get(QUERY);
this.catalogIf = Env.getCurrentEnv().getCatalogMgr().getCatalog(catalogName);
}

public static QueryTableValueFunction createQueryTableValueFunction(Map<String, String> params)
throws AnalysisException {
if (params.size() != 2) {
throw new AnalysisException("Query TableValueFunction must have 2 arguments: 'catalog' and 'query'");
}
if (!params.containsKey(CATALOG) || !params.containsKey(QUERY)) {
throw new AnalysisException("Query TableValueFunction must have 2 arguments: 'catalog' and 'query'");
}
String catalogName = params.get(CATALOG);

// check priv
Expand Down

0 comments on commit 40a1041

Please sign in to comment.