[fix](proc) fix keyword case sensitive issue for stmt show_frontends_disks (#35919)
This commit is contained in:
@ -52,7 +52,7 @@ public class ShowFrontendsStmt extends ShowStmt {
|
||||
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "ADMIN/OPERATOR");
|
||||
}
|
||||
|
||||
if (detail != null && !detail.equals("disks")) {
|
||||
if (detail != null && !detail.equalsIgnoreCase("disks")) {
|
||||
throw new AnalysisException("Show frontends with extra info only support show frontends disks");
|
||||
}
|
||||
}
|
||||
@ -62,7 +62,7 @@ public class ShowFrontendsStmt extends ShowStmt {
|
||||
ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
|
||||
|
||||
ImmutableList<String> titles = FrontendsProcNode.TITLE_NAMES;
|
||||
if (detail != null && detail.equals("disks")) {
|
||||
if (detail != null && detail.equalsIgnoreCase("disks")) {
|
||||
titles = FrontendsProcNode.DISK_TITLE_NAMES;
|
||||
}
|
||||
for (String title : titles) {
|
||||
|
||||
@ -83,7 +83,7 @@ public class FrontendsProcNode implements ProcNodeInterface {
|
||||
public static void getFrontendsInfo(Env env, String detailType, List<List<String>> infos) {
|
||||
if (detailType == null) {
|
||||
getFrontendsInfo(env, infos);
|
||||
} else if (detailType.equals("disks")) {
|
||||
} else if (detailType.equalsIgnoreCase("disks")) {
|
||||
getFrontendsDiskInfo(env, infos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,4 +39,10 @@ suite("test_frontend") {
|
||||
result = sql """SHOW FRONTENDS;"""
|
||||
logger.debug("result:${result}")
|
||||
}
|
||||
|
||||
def res = sql """SHOW FRONTENDS DISKS"""
|
||||
assertTrue(res.size() != 0)
|
||||
|
||||
def res2 = sql """SHOW FRONTENDS Disks"""
|
||||
assertTrue(res2.size() != 0)
|
||||
}
|
||||
Reference in New Issue
Block a user