Skip to content

Commit

Permalink
0005491: Table reload request with "where" keyword gets error
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 3, 2022
1 parent 622f85a commit ff8806b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,9 @@ protected long getDataCountForReload(Table table, Node targetNode, String select
String quote = dbInfo.getDelimiterToken();
String catalogSeparator = dbInfo.getCatalogSeparator();
String schemaSeparator = dbInfo.getSchemaSeparator();
if (selectSql != null && selectSql.trim().toUpperCase().startsWith("WHERE")) {
selectSql = selectSql.trim().substring(5);
}
String sql = String.format("select count(*) from %s t where %s", table
.getQualifiedTableName(quote, catalogSeparator, schemaSeparator), selectSql);
sql = FormatUtils.replace("groupId", targetNode.getNodeGroupId(), sql);
Expand Down

0 comments on commit ff8806b

Please sign in to comment.