casionone commented on code in PR #4072:
URL: https://github.com/apache/linkis/pull/4072#discussion_r1060233823
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata/src/main/java/org/apache/linkis/metadata/restful/api/DataSourceRestfulApi.java:
##########
@@ -70,6 +70,45 @@ public Message queryDatabaseInfo(HttpServletRequest req) {
}
}
+ @ApiOperation(
+ value = "queryPartitionExists",
+ notes = "query partition exists",
+ response = Message.class)
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "database", dataType = "String", value =
"database"),
+ @ApiImplicitParam(name = "table", dataType = "String", value = "table"),
+ @ApiImplicitParam(name = "partition", dataType = "String", value = "table")
+ })
+ @RequestMapping(path = "partitionExists", method = RequestMethod.GET)
+ public Message partitionExists(
+ @RequestParam(value = "database") String database,
+ @RequestParam(value = "table") String table,
+ @RequestParam(value = "partition") String partition,
+ HttpServletRequest req) {
+ String userName = ModuleUserUtils.getOperationUser(req, "query partition
exists");
+ try {
+ if (StringUtils.isEmpty(database)) {
+ return Message.error("'database' is missing[缺少数据库]");
Review Comment:
Batter to use `StringUtils.isBlank`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]