[DOC] fix toSql of ShowPartitionsStmt (#5070)

This commit is contained in:
Lijia Liu
2020-12-19 11:18:00 +08:00
committed by GitHub
parent 9ddf434f6b
commit 6673306fda
2 changed files with 14 additions and 7 deletions

View File

@ -248,8 +248,11 @@ public class ShowPartitionsStmt extends ShowStmt {
@Override
public String toSql() {
StringBuilder sb = new StringBuilder();
sb.append("SHOW PARTITIONS FROM ");
StringBuilder sb = new StringBuilder("SHOW ");
if (isTempPartition) {
sb.append("TEMPORARY ");
}
sb.append("PARTITIONS FROM ");
if (!Strings.isNullOrEmpty(dbName)) {
sb.append("`").append(dbName).append("`");
}