Skip to content

Commit

Permalink
Merge pull request #1022 from Shlpeng/patch-1
Browse files Browse the repository at this point in the history
use isBlank judge partition
  • Loading branch information
peacewong authored Oct 11, 2021
2 parents dace507 + 1230588 commit badef8c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.webank.wedatasphere.linkis.metadata.service.DataSourceService;
import com.webank.wedatasphere.linkis.server.Message;
import com.webank.wedatasphere.linkis.server.security.SecurityFilter;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.codehaus.jackson.JsonNode;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -103,7 +104,7 @@ public Response sizeOf(@QueryParam("database") String database, @QueryParam("ta
String userName = SecurityFilter.getLoginUsername(req);
try {
JsonNode sizeNode;
if (partition == null){
if (StringUtils.isBlank(partition)){
sizeNode = dataSourceService.getTableSize(database, table, userName);
} else {
sizeNode = dataSourceService.getPartitionSize(database, table, partition, userName);
Expand Down

0 comments on commit badef8c

Please sign in to comment.